Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Service 02H (decimal 2) reports the shift status in register AL. The shift
  status is taken bit by bit from the first keyboard status byte, which is
  kept at memory location 0040:0017H. Figure 11-2 describes the settings of
  each bit. (See page 137 for information about the other keyboard status
  byte at 0040:0018H.)

        Bit
  7 6 5 4 3 2 1 0          Meaning
  --------------------------------------------------------------------------
  X . . . . . . .          Insert state: 1 = active
  . X . . . . . .          CapsLock: 1 = active
  . . X . . . . .          NumLock: 1 = active
  . . . X . . . .          ScrollLock: 1 = active
  . . . . X . . .          1 = Alt pressed
  . . . . . X . .          1 = Ctrl pressed
  . . . . . . X .          1 = Left Shift pressed
  . . . . . . . X          1 = Right Shift pressed
  --------------------------------------------------------------------------

  Figure 11-2.  The keyboard status bits returned to register AL using
  keyboard service 02H.

  Generally, service 02H and the status bit information are not particularly
  useful. If you plan to do some fancy keyboard programming, however, they
  can come in handy. You'll frequently see them used in programs that do
  unconventional things, such as differentiating between the left and right
  Shift keys.

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