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 09h keyboard</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 09h                 Keyboard

    The keyboard generates an Int 9 every time a key is pushed or
    released.

       Note     This is a hardware interrupt (IRQ 1) activated by
                the make or break of every keystroke.

    The default Int 9 handler in the ROM reads the make and break scan
    codes from the keyboard and converts them into actions or key
    codes as follows:

         .   For ASCII keys, when a make code is encountered, the
             ASCII code and the scan code for the key are placed in
             the 32-byte keyboard buffer, which is located at
             0040h:001Eh. The ASCII code and scan code are placed in
             the buffer at the location addressed by the Keyboard
             Buffer Tail Pointer (0040h:001Ch). The Keyboard Buffer
             Tail Pointer is then incremented by 2, and if it points
             past the end of the buffer, it is adjusted so that it
             points to the beginning of the buffer.

         .   If Ctrl, Alt, or Shift has been pressed, the Shift Status
             (0040h:0017h) and Extended Shift Status (0040h:0018h)
             bytes are updated.

         .   If the Ctrl-Alt-Del combination has been pressed, the
             Reset Flag (0040h:0072h) is set to 1234h and control is
             given to the power-on self test (POST). Because the Reset
             Flag is 1234h, the POST routine bypasses the memory test.

         .   If the Pause key sequence has been entered, this
             interrupt enters an indefinite loop. The loop is broken
             as soon as a valid ASCII keystroke is entered. (The PC
             Convertible issues an Int 15h, Service 41h (Wait on
             External Event), to execute its pause loop.)

         .   If the Print Screen key sequence is entered, an Int 05h
             (Print Screen) is executed.

         .   If the Control-Break key sequence is entered, an Int 1Bh
             (Control-Break) is executed.

         .   For XTs dated 1/10/86 and after, ATs, XT-286s, and PC
             Convertibles, the Int 9h handler generates an Int 15h,
             function 91h (Interrupt Complete) to signal that a
             keystroke is available. Also, on these machines, a make
             or break of the Sys Req key generates an Int 15h,
             function 85h (System Request Key Pressed).

         .   For ATs dated 6/10/85 and after, XT-286s, and PC
             Convertibles, an Int 15h, function 4Fh (Keyboard
             Intercept) is executed after the scan code has been read
             from the keyboard port (60h). This allows the user to
             redefine or remove a keystroke.

    Int 16 provides a standard way to read characters from the
    keyboard buffer that have been placed there by the Int 9 handler
    in ROM.

See Also: Int 16h, 00h Int 1Bh 0040h:0017h 0040h:001Eh

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