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]

  0040:0010H (a 2-byte word). This word holds the equipment-list data that
  is reported by the equipment-list service, interrupt 11H (decimal 17). The
  format of this word, shown in Figure 3-2, was established for the PC and
  XT; certain parts may appear in a different format in later models.

  0040:0013H (a 2-byte word). This word contains the usable memory size in
  KB. BIOS interrupt service 12H (decimal 18) is responsible for reporting
  the value in this word.

  0040:0017H (2 bytes of keyboard status bits). These bytes are actively
  used to control the interpretation of keyboard actions by the ROM BIOS
  routines. Changing these bytes actually changes the meaning of keystrokes.
  You can freely change the first byte, at address 0040:0017H, but it is not
  a good idea to change the second byte. See pages 137 and 138 for the bit
  settings of these 2 bytes.


                 Bit
  F E D C B A 9 8    7 6 5 4 3 2 1 0   Meaning
  --------------------------------------------------------------------------
  X X . . . . . .    . . . . . . . .   Number of printers installed
  . . X . . . . .    . . . . . . . .   (Reserved)
  . . . X . . . .    . . . . . . . .   1 if game adapter installed
  . . . . X X X .    . . . . . . . .   Number of RS-232 serial ports
  . . . . . . . X    . . . . . . . .   (Reserved)
  . . . . . . . .    X X . . . . . .   +1 = number of diskette drives:
                                         00 = 1 drive; 01 = 2 drives;
                                         10 = 3 drives;
                                         11 = 4 drives (see bit 0)
  . . . . . . . .    . . X X . . . .   Initial video mode:
                                         01 = 40-column color;
                                         10 = 80-column color,
                                         11 = 80-column monochrome;
                                         00 = none of the above
  . . . . . . . .    . . . . X X . .   For PC with 64 KB motherboard:
                                         Amount of system board RAM
                                         (11 = 64 KB, 10 = 48 KB,
                                         01 = 32 KB, 00 = 16 KB)
                                       For PC/AT: Not used
                                       For PS/2s: Bit 3: Not used;
                                         Bit 2: 1 = pointing device
                                       installed
  . . . . . . . .    . . . . . . X .   1 if math coprocessor installed
  . . . . . . . .    . . . . . . . X   1 if any diskette drives present (if
                                       so, see bits 7 and 6)
  --------------------------------------------------------------------------


  Figure 3-2.  The coding of the equipment-list word at address 0040:0010H.

  0040:001AH (a 2-byte word). This word points to the current head of the
  BIOS keyboard buffer at 0040:001EH, where keystrokes are stored until they
  are used.

  0040:001CH (a 2-byte word). This word points to the current tail of the
  BIOS keyboard buffer.

  0040:001EH (32 bytes, used as sixteen 2-byte entries). This keyboard
  buffer holds up to 16 keystrokes until they are read via the BIOS services
  through interrupt 16H (decimal 22). As this is a circular queue buffer,
  two pointers indicate the head and tail. It is not wise to manipulate this
  data.

  0040:003EH (1 byte). This byte indicates if a diskette drive needs to be
  recalibrated before seeking to a track. Bits 0 through 3 correspond to
  drives 0 through 3. If a bit is clear, recalibration is needed. Generally,
  you will find that a bit is clear if there was any problem with the most
  recent use of a drive. For example, the recalibration bit will be clear if
  you try to request a directory (DIR) on a drive with no diskette, and then
  type A in response to the following display:

  Not ready reading drive A
  Abort, Retry, Fail?

  0040:003FH (1 byte). This byte returns the diskette motor status. Bits 0
  through 3 correspond to drives 0 through 3. If the bit is set, the
  diskette motor is running.

  0040:0040H (1 byte). This byte is used by the ROM BIOS to ensure that the
  diskette drive motor is turned off. The value in this byte is decremented
  with every tick of the system clock (that is, about 18.2 times per
  second). When the value reaches 0, the BIOS turns off the drive motor.

  0040:0041H (1 byte). This byte contains the status code reported by the
  ROM BIOS after the most recent diskette operation. (See Figure 3-3.)

  0040:0042H (7 bytes). These 7 bytes hold diskette controller status
  information.

  Beginning at 0040:0049H is a 30-byte area used for video control. This is
  the first of two areas in segment 40H that the ROM BIOS uses to track
  critical video information.

  Value              Meaning
  --------------------------------------------------------------------------
  00H                No error
  01H                Invalid diskette command requested
  02H                Address mark on diskette not found
  03H                Write-protect error
  04H                Sector not found; diskette damaged or not formatted
  06H                Diskette change line active
  08H                DMA diskette error
  09H                Attempt to DMA across 64 KB boundary
  0CH                Media type not found
  10H                Cyclical redundancy check (CRC) error in data
  20H                Diskette controller failed
  40H                Seek operation failed
  80H                Diskette timed out (drive not ready)
  --------------------------------------------------------------------------

  Figure 3-3.  Diskette status codes in the ROM BIOS data area at
  0040:0041H.

  Although programs can safely inspect any of this data, you should modify
  the data only when you bypass the ROM BIOS video services and program the
  video hardware directly. In such cases, you should update the video
  control data to reflect the true status of the video hardware.

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