
8-30
x86 MICROPROCESSORS
With no shift, alt or control keys pressed, AL = 0.
With CAPSLOCK on, NUMSLOCK on, and the left shift key kept pressed, the value in
AL = 62H, i.e., 0110 0010B.
Keep the left shift key pressed, and check the content of the BIOS data area
0040:0017.
-d0040:0017
0040:0010 62-00
We find the first keyboard status flag saved there.
Example 8.11
The following program fills up the screen with the key pressed. If no key is pressed, it
keeps waiting for a key press.
.MODEL TINY
.CODE
.STARTUP
NO_KEY: MOV AH, 11H ;function for waiting for key
INT 16H
JZ NO_KEY ;if ZF = 1, no key press, keep waiting
KEY: MOV AH, 10H ;function ...