[1] Checks whether a character is available from the keyboard.
[2.0+] Checks whether a character is available from the standard input device. Input can be redirected.
Call with:
AH = 0BH
Returns:
AL = 00H if no character is available
FFH if at least one character is available
Notes:
[1] If a Ctrl-C is detected, an Int 23H is executed.
[2.0+] If the standard input is not redirected, and a Ctrl-C is detected at the console, an Int 23H is executed. If the standard input is redirected, a Ctrl-C is detected at the console, and BREAK is ON, an Int 23H is executed.
If a character is waiting, this function will continue to return a true flag until the character is consumed with a call to Int 21H Function 01H, 06H, 07H, 08H, 0AH, or 3FH.
This function is equivalent to IOCTL Int 21H Function 44H Subfunction 06H.
Example:
Test whether a character is available from the standard input.
.
.
.
mov ah,0bh ; function number
int 21h ; transfer to MS-DOS
or al,al ; character waiting?
jnz ready ; jump if char ready
.
.
.