Int 16H [PC] [AT] [PS/2] Function 01H Get keyboard status

Determines whether a character is ready for input, returning a flag and also the character itself, if one is waiting.

Call with:

AH = 01H

Returns:

If key waiting to be input

Zero flag = clear

AH = keyboard scan code

AL = character

If no key waiting

Zero flag = set

Note:

The character returned by this function when the zero flag is clear is not removed from the type-ahead buffer. The same character and scan code will be returned by the next call to Int 16H Function 00H.