Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Expert Help On-Line Manual v1.30 - <b>reserved memory locations in the ibm pc & compatibles</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
RESERVED MEMORY LOCATIONS IN THE IBM PC & Compatibles

------------------------------------------------------------------------------
 000-3FF  - 1k DOS interrupt vector table, 4 byte vectors for ints 00h-0FFh.
   30:00  - used as a stack area during POST and bootstrap routines. This
to 3F:FF    stack area may be re-vectored by an application program.
------------------------------------------------------------------------------
 ** The BIOS Data Area ** addresses from 400h to 4FFh
------------------------------------------------------------------------------
addr.| size  |           description
-----+-------+----------------------------------------------------------------
40:00|  word | COM1 port address |   These addresses are zeroed out in the
40:02|  word | COM2 port address |   OS/2 DOS Compatibility Box if any of
40:04|  word | COM3 port address |   the OS/2 COM??.SYS drivers are loaded.
40:06|  word | COM4 port address |
40:08|  word | LPT1 port address
40:0A|  word | LPT2 port address
40:0C|  word | LPT3 port address
40:0E|  word | LPT4 port address        (not valid in PS/2 machines)
40:0E|  word | PS/2 pointer to 1k extended BIOS Data Area at top of RAM
40:10|  word | equipment flag (see int 11h)
-------------| bits:
             | 0       1 if floppy drive present (see bits 6&7)  0 if not
             | 1       1 if 80x87 installed  (not valid in PCjr)
             | 2,3     system board RAM   (not used on AT or PS/2)
             |         0,0     16k             0,1     32k
             |         1,0     48k             1,1     64k
             | 4,5     initial video mode
             |         0,0     no video adapter
             |         0,1     40 column color  (PCjr default)
             |         1,0     80 column color
             |         1,1     MDA
             | 6,7     number of diskette drives
             |         0,0     1 drive         0,1     2 drives
             |         1,0     3 drives        1,1     4 drives
             | 8       0       DMA present
             |         1       DMA not present (PCjr, Tandy 1400, Sanyo 55x)
             | 9,A,B   number of RS232 serial ports
             | C       game adapter  (joystick)
             |         0       no game adapter
             |         1       if game adapter
             |         D        serial printer (PCjr only)
             |         0       no printer
             |         1       serial printer present
      +------+ E,F     number of parallel printers installed
      |note 1) The IBM PC and AT store the settings of the system board
      +---+    switches or CMOS RAM setup information (as obtained by the BIOS
          |    in the Power-On Self Test (POST)) at addresses 40:10h and
          |    40:13h. 00000001b indicates "on", 00000000b is "off".
          | 2) CMOS RAM map, PC/AT:
          |    offset          contents
          |    00h         Seconds
          |    01h         Second Alarm
          |    02h         Minutes
          |    03h         Minute Alarm
          |    04h         Hours
          |    05h         Hour Alarm
          |    06h         Day of the Week
          |    07h         Day of the Month
          |    08h         Month
          |    09h         Year
          |    0Ah         Status Register A
          |    0Bh         Status Register B
          |    0Ch         Status Register C
          |    0Dh         Status Register D
          |    0Eh         Diagnostic Status Byte
          |    0Fh         Shutdown Status Byte
          |    10h         Disk Drive Type for Drives A: and B:
          |                The drive-type bytes use bits 0:3 for the first
          |                drive and 4:7 for the other
          |                Disk drive types:
          |                00h         no drive present
          |                01h         double sided 360k
          |                02h         high capacity (1.2 meg)
          |                03h-0Fh     reserved
          |    11h         (AT):Reserved    (PS/2):drive type for hard disk C:
          |    12h         (PS/2):drive type for hard disk D:
          |                (AT, XT/286):hard disk type for drives C: and D:
          |                Format of drive-type entry for AT, XT/286:
          |                0       number of cyls in drive (0-1023 allowed)
          |                2       number of heads per drive (0-15 allowed)
          |                3       starting reduced write compensation (not
          |                        used on AT)
          |                5       starting cylinder for write compensation
          |                7       max. ECC data burst length, XT only
          |                8       control byte
          |                        Bit
          |                        7    disable disk-access retries
          |                        6    disable ECC retries
          |                        5-4  reserved, set to zero
          |                        3    more than 8 heads
          |                        2-0  drive option on XT (not used by AT)
          |                9       timeout value for XT (not used by AT)
          |               12       landing zone cylinder number
          |               14       number of sectors per track (default 17,
          |                        0-17 allowed)
          |    13h         Reserved
          |    14h         Equipment Byte (corresponds to sw. 1 on PC and XT)
          |    15h-16h     Base Memory Size      (low,high)
          |    17h-18h     Expansion Memory Size (low,high)
          |    19h-20h     Reserved
          |                (PS/2) POS information Model 50 (60 and 80 use a 2k
          |                CMOS RAM that is not accessible through software)
          |    21h-2Dh     Reserved (not checksumed)
          |    2Eh-2Fh     Checksum of Bytes 10 Through 20  (low,high)
          |    30h-31h     Exp. Memory Size as Det. by POST (low,high)
          |    32h         Date Century Byte
          |    33h         Information Flags (set during power-on)
          |    34h-3Fh     Reserved
          | 3) The alarm function is used to drive the BIOS WAIT function
          |    (int 15h function 90h).
          | 4) To access the configuration RAM write the byte address (00-3Fh)
          |    you need to access to I/O port 70h, then access the data via
          |    I/O port 71h.
          | 5) CMOS RAM chip is a Motorola 146818
          | 6) The equipment byte is used to determine the configuration for
          |    the POST power-on diagnostics.
          | 7) Bytes 00-0Dh are defined by the chip for timing functions,
          |    bytes 0Eh-3Fh  are defined by IBM.
          | 8) Compaq 386 uses came CMOS chip as IBM AT. Extra functions:
          |    byte 45 (2Dh) store aditional info not maintained by AT
          |    bit 0 indicates is Compaq dual-mode monitor isntalled
          |        1 indicates whether keyclick is enabled
          |        2 not used
-------------+     3 if non-Compaq graphics adapter installed
40:12|  byte | reserved (PC, AT)
-------------| number of errors detected by infrared keyboard link (PCjr)
-------------| POST status (Convertible)
40:13|  word | availible memory size in Kbytes (less display RAM in PCjr)
-----+-------| this is the value returned by int 12h
40:15|  word | reserved
40:17|  byte | keyboard flag byte 0 (see int 9h)
-------------| bit 7  insert mode on      3  alt pressed
             |     6  capslock on         2  ctrl pressed
             |     5  numlock on          1  left shift pressed
-------------|     4  scrollock on        0  right shift pressed
40:18|  byte | keyboard flag byte 1 (see int 9h)
-------------| bit 7  insert pressed      3  ctrl-numlock (pause) toggled
             |     6  capslock pressed    2  PCjr keyboard click active
             |     5  numlock pressed     1  PCjr ctrl-alt-capslock held
-------------|     4  scrollock pressed   0
40:19|  byte | storage for alternate keypad entry (not normally used)
40:1A|  word | pointer to keyboard buffer head character
40:1C|  word | pointer to keyboard buffer tail character
40:1E|32bytes| 16 2-byte entries for keyboard circular buffer, read by int 16h
40:3E|  byte | drive seek status - if bit=0, next seek will recalibrate by
-------------| repositioning to Track 0.
             | bit 3  drive D          bit 2  drive C
-------------|     1  drive B              0  drive A
40:3F|  byte | diskette motor status (bit set to indicate condition)
-------------| bit 7  write in progress    3  motor on (floppy 3)
             |     6                       2  motor on (floppy 2)
             |     5                       1  B: motor on (floppy 1)
-------------|     4                       0  A: motor on (floppy 0)
40:40|  byte | motor off counter
     |       | starts at 37 and is decremented 1 by each system clock tick.
     |       | motor is shut off when count = 0.
40:41|  byte | status of last diskette operation     where:
-------------| bit 7 timeout failure                3 DMA overrun
             |     6 seek failure                   2 sector not found
             |     5 controller failure             1 address not found
-------------|     4 CRC failure                    0 bad command
40:42|7 bytes| NEC status
40:49|  byte | current CRT mode (hex value)
-------------|    00h 40x25 BW      (CGA)          01h 40x25 color   (CGA)
             |    02h 80x25 BW      (CGA)          03h 80x25 color   (CGA)
             |    04h 320x200 color (CGA)          05h 320x200 BW    (CGA)
             |    06h 640x200 BW    (CGA)          07h monochrome    (MDA)
             |extended video modes (EGA/MCGA/VGA or other)
             |    08h lores,16 color               09h med res,16 color
             |    0Ah hires,4 color                0Bh n/a
             |    0Ch med res,16 color             0Dh hires,16 color
-------------|    0Eh hires,4 color                0Fh hires,64 color
40:4A|  word | number of columns on screen, coded as hex number of columns
-------------| 20 col = 14h  (video mode 8, low res 160x200 CGA graphics)
             | 40 col = 28h
-------------| 80 col = 46h
40:4C|  word | screen buffer length in bytes
-----+-------|(number of bytes used per screen page, varies with video mode)
40:4E|  word | current screen buffer starting offset (active page)
40:50|8 words| cursor position pages 1-8
-------------| the first byte of each word gives the column (0-19, 39, or 79)
-------------| the second byte gives the row (0-24)
40:60|  byte | end line for cursor   (normally 1)
40:61|  byte | start line for cursor (normally 0)
40:62|  byte | current video page being displayed  (0-7)
40:63|  word | base port address of 6845 CRT controller or equivalent
-----+-------| for active display           3B4h=mono, 3D4h=color
40:65|  byte | current setting of the CRT mode register
40:66|  byte | current palette mask setting  (CGA)
40:67|5 bytes| temporary storage for SS:SP during shutdown(cassette interface)
40:6C|  word | timer counter low word
40:6E|  word | timer counter high word
40:69|  byte | HD_INSTALL (Columbia PCs) (not valid on most clone computers)
-------------| bit  0 = 0  8 inch external floppy drives
             |          1  5-1/4 external floppy drives
             |      1,2 =  highest drive address which int 13 will accept
             |             (since the floppy drives are assigned 0-3, subtract
             |             3 to obtain the number of hard disks installed)
             |      4,5 =  # of hard disks connected to expansion controller
             |      6,7 =  # of hard disks on motherboard controller
             |             (if bit 6 or 7 = 1, no A: floppy is present and
-------------|             the maximum number of floppies from int 11 is 3)
40:70|  byte | 24 hour timer overflow 1 if timer went past midnight
-----+-------| it is reset to 0 each time it is read by int 1Ah
40:71|  byte | BIOS break flag (bit 7 = 1 means break key hit)
40:72|  word | reset flag
-------------| PCjr keeps 1234h here for softboot when a cartridge installed
             | bits 1234h = soft reset, memory check will be bypassed
             |      4321h = preserve memory (PS/2 other only)
             |      5678h = system suspended (Convertible)
             |      9ABCh = manufacturing test mode (Convertible)
-------------|      ABCDh = system POST loop mode (Convertible)
40:74|  byte | status of last hard disk operation; PCjr special disk control
40:75|  byte | # of hard disks attached (0-2)    ; PCjr special disk control
40:76|  byte | HD control byte; temp holding area for 6th param table entry
40:77|  byte | port offset to current hd adapter ; PCjr special disk control
40:78|4 bytes| timeout value for LPT1,LPT2,LPT3,LPT4
40:7C|4 bytes| timeout value for COM1,COM2,COM3,COM4 (0-0FFh secs, default 1)
40:80|  word | pointer to start of circular keyboard buffer, default 03:1E
40:82|  word | pointer to end of circular keyboard buffer, default 03:3E
40:84|  byte | rows on the screen minus 1 (EGA only)
40:84|  byte | PCjr interrupt flag; timer channel 0  (used by POST)
40:85|  word | bytes per character (EGA only)
40:85|2 bytes| (PCjr only) typamatic char to repeat
40:86|2 bytes| (PCjr only) typamatic initial delay
40:87|  byte | mode options (EGA only)
-------------| bit 1   0 = EGA is connected to a color display
             |         1 = EGA is monochrome.
             | bit 3   0 = EGA is the active display,
             |         1 = "other" display is active.
             | mode combinations:
             | bit3  Bit1     Meaning
             |   0     0   EGA is active display and is color
             |   0     1   EGA is active display and is monochrome
             |   1     0   EGA is not active, a mono card is active
-------------|   1     1   EGA is not active, a CGA is active
40:87|  byte | (PCjr only) current Fn key code
40:88|  byte | feature bit switches (EGA only) 0=on, 1=off
-------------| bit 3 = switch 4
             | bit 2 = switch 3
             | bit 1 = switch 2
-------------| bit 0 = switch 1
40:88|  byte | (PCjr only) special keyboard status byte
-------------| bit 7 function flag      3 typamatic (0=enable,1=disable)
             |     6 Fn-B break         2 typamatic speed (0=slow,1=fast)
             |     5 Fn pressed         1 extra delay bef.typamatic (0=enable)
-------------|     4 Fn lock            0 write char, typamatic delay elapsed
40:89|  byte | PCjr, current value of 6845 reg 2 (horiz.synch) used by
-----+-------| ctrl-alt-cursor screen positioning routine in ROM
40:8A|  byte | PCjr CRT/CPU Page Register Image, default 3Fh
40:8B|  byte | last diskette data rate selected
40:8C|  byte | hard disk status returned by controller
40:8D|  byte | hard disk error returned by controller
40:8E|  byte | hard disk interrupt (bit 7=working int)
40:90|4 bytes| media state drive 0, 1, 2, 3
40:94|2 bytes| track currently seeked to drive 0, 1
40:96|  byte | keyboard flag byte 3 (see int 9h)
40:97|  byte | keyboard flag byte 2 (see int 9h)
40:98| dword | segment:offset pointer to users wait flag
40:9C| dword | users timeout value in microseconds
40:A0|  byte | real time clock wait function in use
-------------| bits 7    wait time elapsed and posted flag
             |      6-1  reserved
-------------|      0    int 15h, function 86h (WAIT) has occurred
40:A1|  byte | LAN A DMA channel flags
40:A2|2 bytes| status LAN A 0,1
40:A4| dword | saved hard disk interrupt vector
40:A8| dword | EGA pointer to table of 7 parameters. Format of table:
-------------| dword   pointer to 1472 byte table containing 64 video parms
             | dword   reserved
             | dword   reserved
             | dword   reserved
             | dword   reserved
             | dword   reserved
-------------| dword   reserved
40:B4|  byte | keyboard NMI control flags              (Convertible)
40:B5| dword | keyboard break pending flags            (Convertible)
40:B9|  byte | port 60 single byte queue               (Convertible)
40:BA|  byte | scan code of last key                   (Convertible)
40:BB|  byte | pointer to NMI buffer head              (Convertible)
40:BC|  byte | pointer to NMI buffer tail              (Convertible)
40:BD|16bytes| NMI scan code buffer                    (Convertible)
40:CE|  word | day counter                             (Convertible and after)
  to | -04:8F|               end of BIOS Data Area
------------------------------------------------------------------------------
 ** End of BIOS Data Area **
------------------------------------------------------------------------------
40:90|-40:EF | reserved by IBM

04:F0 16 bytes Inter-Application Communications Area (for use by applications
04:FF          to transfer data or parameters to each other)

05:00  byte    DOS print screen status flag
                        00h    not active or successful completion
                        01h    print screen in progress
                        0FFh   error during print screen operation
05:01          Used by BASIC
05:02-03       PCjr POST and diagnostics work area
05:04  byte    Single drive mode status byte
                        00     logical drive A
                        01     logical drive B
05:05-0E       PCjr POST and diagnostics work area
05:0F          BASIC: SHELL flag (set to 02h if there is a current SHELL)
05:10  word    BASIC: segment address storage (set with DEF SEG)
05:12  4 bytes BASIC: int 1Ch clock interrupt vector segment:offset storage
05:16  4 bytes BASIC: int 23h ctrl-break interrupt segment:offset storage
05:1A  4 bytes BASIC: int 24h disk error interrupt vector segment:offset
05:1B-1F       Used by BASIC for dynamic storage
05:20-21       Used by DOS for dynamic storage
05:22-2C       Used by DOS for diskette parameter table. See int 1Eh for vals
05:30-33       Used by MODE command
05:34-FF       Unknown - Reserved for DOS




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