FLC

The wikipedia article gives just about everything you'd need to understand and implement such a system:

Between that, and google searching like oric_dan suggested, there shouldn't be too much of an issue, I would think...?