INT 16h, 00h (0) Keyboard Read all
Returns the next character in the keyboard buffer; if no character is
available, this service waits until one is available.
On entry: AH 00h
Returns: AL ASCII character code
AH Scan code
--------------------------------------------------------------------------
Notes: The scan codes are the numbers representing the
location of the key on the keyboard. As new keys
have been added and the keyboard layout rearranged,
this numbering scheme has not been consistent with
its original purpose.
If the character is a special character, then AL
will be 0 and the value in AH will be the extended
scan code for the key.
Use the scan codes to differentiate between keys
representing the same ASCII code, such as the plus
key across the top of the keyboard and the gray plus
key.
After the character has been removed from the
keyboard buffer, the keyboard buffer start pointer
(at 0:041Ah) is increased by 2. If the start pointer
is beyond the end of the buffer, the start pointer
is reset to the start of the keyboard buffer.
If no character is available at the keyboard, then
the AT, XT-286, and PC Convertible issue an INT 15h,
Service 90h (Device Busy), for the keyboard,
informing the operating system that there is a
keyboard loop taking place and thereby allowing the
operating system to perform another task.
After every character is typed, the AT, XT-286, and
PC Convertible issue an INT 15h, Service 91h
(Interrupt Complete). This allows the operating
system to switch back to a task that is waiting for
a character at the keyboard.
See Service 10h for an equivalent service that
supports the enhanced (101/102-key) keyboard.
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster