Function 0Ch (12)        Clear Input Buffer, then Invoke Function

Removes any characters in the typeahead buffer, then invokes the
specified keyboard function.

On entry:      AH         0Ch
AL         Function to be invoked (01h, 06h, 07h, 08h,
or 0Ah).

Returns:       AL         Input character (unless function invoked was


This function clears the keyboard buffer, then invokes one of five DOS
services (specified in AL): functions 01h, 06h, 07h, 08h, or 0Ah. The
purpose is to ensure that your program receives new input before it
performs the followup function.

Notes:         Since Function 06h is supported, the followup
function need not be keyboard input; it may be
display output. See specified followup function for

If you just want to clear the keyboard buffer, you
can use this function with AL = 6 and DL = 0FFh,
which will check to see if any characters are
waiting to be read without reading any.

See also: 01h
See also: 06h
See also: 07h
See also: 08h
See also: 0Ah

0Ch (12) Clear Input Buffer, then Invoke Function