ADDRESS EXPLANATION 41Ah Address of the current head of the buffer (the next position for INT 16h to read a char) 41Ch Address of the current tail of buffer (the next position for INT 16h to store a char) 41Eh Address of the beginning of the keyboard buffer. The buffer contains 16 words (32 bytes), but can be longer.The buffer is empty when the head and tail of buffer coincide. Note we have 16 words in the buffer, but only 15 type ahead characters are allowed. This is because if we have 16 words, then we cannot distinguish between buffer full and buffer empty!
Function Number (in reg AH) | Actions |
---|---|
fcn=00h: wait for keypress and read char | OUTPUT: AH=scan code, AL=ascii character or 0 in non-ascii.
Program is halted until a key with scancode is pressed. |
fcn=01h: get keyboard status | OUTPUT:
|
fcn=02h: read keyboard flags |
OUTPUT: AL=BIOS keyboard flags (in BIOS area 40:17)
|
fcn=03h: set keyboard typematic rate |
INPUT: AL=set rate, BH=repeat delay, BL=typematic rate.
OUTPUT: none. See helppc for details. |
fcn=05: keyboard buffer write | Available on AT, PS/2 with extended keyboard support. |