Function 0Bh Check Keyboard Status

mov ah, 0Bh ;Check Keyboard Status

int 21h

cmp al, 0 ;zero means not ready

je not_ready

Check Keyboard Status (Function 0Bh) determines whether a character is available from standard input.

Parameters

This function has no parameters.

Return Value

If a character is available, the AL register contains 0FFh. Otherwise, the AL register contains 00h.

Comment

This function does not indicate how many characters are available, only that there is at least one.

See Also

Function 01h Read Keyboard with Echo
Function 06h Direct Console I/O
Function 07h Direct Console Input
Function 08h Read Keyboard Without Echo
Function 0Ah Buffered Keyboard Input
Function 3Fh Read File or Device