Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- BIOS ref. - <b>int 16h, 00h keyboard read all</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 16h, 00h            Keyboard Read                                     all

    Returns the next character in the keyboard buffer; if no character
    is available, this service waits until one is available.

        Entry   AH = 00h

        Return  AL = ASCII character code
                AH = Scan code

    ------------------------------------------------------------------

    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 0040h:001Ah) 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.

See Also: Int 16h, 01h Int 16h, 05h Int 16h, 10h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson