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 00H (decimal 0) reports the next keyboard input character. If a
  character is ready in the ROM BIOS keyboard buffer, it is reported
  immediately. If not, the service waits until one is ready. As described on
  page 134, each keyboard character is reported as a pair of bytes, which
  we call the main and auxiliary bytes. The main byte, returned in AL, is
  either 0 for special characters (such as the function keys) or else an
  ASCII code for ordinary ASCII characters. The auxiliary byte, returned in
  AH, is either the character ID for special characters or the standard
  PC-keyboard scan code that identifies which key was pressed.

  If no character is waiting in the keyboard buffer when service 00H is
  called, the service waits--essentially freezing the program that called
  it--until a character does appear. The service we'll discuss next allows a
  program to test for keyboard input without the risk of suspending program
  execution.

  Contrary to what some versions of the IBM PC Technical Reference Manual
  suggest, services 00H and 01H apply to both ordinary ASCII characters and
  special characters, such as function keys.

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