BDA - BIOS Data Area - PC Memory Map

来源:互联网 发布:阿里云 ssh 连接不上 编辑:程序博客网 时间:2024/06/17 10:32
Address Size   Description
00:00 256dwords Interrupt vector table
30:00 256bytesStack area used during post and bootstrap
40:00wordCOM1 port address
40:02wordCOM2 port address
40:04wordCOM3 port address
40:06wordCOM4 port address
40:08wordLPT1 port address
40:0AwordLPT2 port address
40:0CwordLPT3 port address
40:0EwordLPT4 port address (except PS/2)
Extended BIOS Data Area segment (PS/2, see
EBDA)
40:10  2 bytesEquipment list flags (see
INT 11)
|7|6|5|4|3|2|1|0| 40:10 (value in INT 11 register AL)
| | | | | | | `- IPL diskette installed
| | | | | | `-- math coprocessor
| | | | |-+-- old PC system board RAM < 256K
| | | | | `-- pointing device installed (PS/2)
| | | | `--- not used on PS/2
| | `------ initial video mode
`--------- # of diskette drives, less 1
|7|6|5|4|3|2|1|0| 40:11  (value in INT 11 register AH)
| | | | | | | `- 0 if DMA installed
| | | | `------ number of serial ports
| | | `------- game adapter
| | `-------- not used, internal modem (PS/2)
`----------- number of printer ports
40:12bytePCjr: infrared keyboard link error count
40:13wordMemory size in Kbytes  (see
INT 12)
40:15byteReserved
40:16bytePS/2 BIOS control flags
40:17byteKeyboard flag byte 0 (see
KB FLAGS)
|7|6|5|4|3|2|1|0| keyboard flag byte 0
| | | | | | | `--- right shift key depressed
| | | | | | `---- left shift key depressed
| | | | | `----- CTRL key depressed
| | | | `------ ALT key depressed
| | | `------- scroll-lock is active
| | `-------- num-lock is active
| `--------- caps-lock is active
`---------- insert is active
40:18byteKeyboard flag byte 1 (see
KB FLAGS)
|7|6|5|4|3|2|1|0| keyboard flag byte
| | | | | | | `--- left CTRL key depressed
| | | | | | `---- left ALT key depressed
| | | | | `----- system key depressed and held
| | | | `------ suspend key has been toggled
| | | `------- scroll lock key is depressed
| | `-------- num-lock key is depressed
| `--------- caps-lock key is depressed
`---------- insert key is depressed
40:19byteStorage for alternate keypad entry
40:1AwordOffset from 40:00 to keyboard buffer head
40:1CwordOffset from 40:00 to keyboard buffer tail
40:1E  32bytesKeyboard buffer (circular queue buffer)
40:3EbyteDrive recalibration status
|7|6|5|4|3|2|1|0| drive recalibration status
| | | | | | | `-- 1=recalibrate drive 0
| | | | | | `--- 1=recalibrate drive 1
| | | | | `---- 1=recalibrate drive 2
| | | | `----- 1=recalibrate drive 3
| `---------- unused
`----------- 1=working interrupt flag
40:3FbyteDiskette motor status
|7|6|5|4|3|2|1|0| diskette motor status
| | | | | | | `-- 1=drive 0 motor on
| | | | | | `--- 1=drive 1 motor on
| | | | | `---- 1=drive 2 motor on
| | | | `----- 1=drive 3 motor on
| `---------- unused
`----------- 1=write operation
40:40byteMotor shutoff counter (decremented by
INT 8)
40:41byteStatus of last diskette operation (see
INT 13,1)
|7|6|5|4|3|2|1|0| status of last diskette operation
| | | | | | | `--- invalid diskette command
| | | | | | `---- diskette address mark not found
| | | | | `----- sector not found
| | | | `------ diskette DMA error
| | | `------- CRC check / data error
| | `-------- diskette controller failure
| `--------- seek to track failed
`---------- diskette time-out
40:42  7 bytesNEC diskette controller status (see
FDC)
40:49byteCurrent video mode  (see VIDEO MODE)
40:4AwordNumber of screen columns
40:4CwordSize of current video regen buffer in bytes
40:4EwordOffset of current video page in video regen buffer
40:50  8 wordsCursor position of pages 1-8, high order byte=row
low order byte=column; changing this data isn't
reflected immediately on the display
40:60byteCursor ending (bottom) scan line (don't modify)
40:61byteCursor starting (top) scan line (don't modify)
40:62byteActive display page number
40:63wordBase port address for active
6845 CRT controller
3B4h = mono, 3D4h = color
40:65byte6845 CRT mode control register value (port 3x8h)
EGA/VGA values emulate those of the MDA/CGA
40:66byteCGA current color palette mask setting (port 3d9h)
EGA and VGA values emulate the CGA
40:67dwordCS:IP for 286 return from protected mode
dwordTemp storage for SS:SP during shutdown
dwordDay counter on all products after AT
dwordPS/2 Pointer to reset code with memory preserved
5 bytesCassette tape control (before AT)
40:6CdwordDaily timer counter, equal to zero at midnight;
incremented by INT 8; read/set by
INT 1A
40:70byteClock rollover flag, set when 40:6C exceeds 24hrs
40:71byteBIOS break flag, bit 7 is set if
Ctrl-Break was
*ever* hit; set by
INT 9
40:72wordSoft reset flag via Ctl-Alt-Del or JMP FFFF:0
1234h  Bypass memory tests & CRT initialization
4321h  Preserve memory
5678h  System suspend
9ABCh  Manufacturer test
ABCDh  Convertible POST loop
????h  many other values are used during POST
40:74byteStatus of last hard disk operation (see
INT 13,1)
40:75byteNumber of hard disks attached
40:76byteXT fixed disk drive control byte
40:77bytePort offset to current fixed disk adapter
40:78  4 bytesTime-Out value for LPT1,LPT2,LPT3(,LPT4 except PS/2)
40:7C  4 bytesTime-Out value for COM1,COM2,COM3,COM4
40:80wordKeyboard buffer start offset (seg=40h,BIOS 10-27-82)
40:82wordKeyboard buffer end offset (seg=40h,BIOS 10-27-82)
40:84byteRows on the screen (less 1, EGA)
40:85wordPoint height of character matrix (EGA)
bytePCjr: character to be repeated if the typematic
repeat key takes effect
40:86bytePCjr: initial delay before repeat key action begins
40:87bytePCjr: current Fn function key number
byteVideo mode options (EGA)
|7|6|5|4|3|2|1|0| Video mode options (EGA)
| | | | | | | `-- 1=alphanumeric cursor emulation enabled
| | | | | | `--- 1=video subsystem attached to monochrome
| | | | | `---- reserved
| | | | `----- 1=video subsystem is inactive
| | | `------ reserved
| `--------- video RAM  00-64K  10-192K  01-128K  11-256K
`---------- video mode number passed to
INT 10, function 0
40:88bytePCjr: third keyboard status byte
EGA feature bit switches, emulated on VGA
|7|6|5|4|3|2|1|0| EGA feature bit switches (EGA)
| | | | | | | `-- EGA SW1 config (1=off)
| | | | | | `--- EGA SW2 config (1=off)
| | | | | `---- EGA SW3 config (1=off)
| | | | `----- EGA SW4 config (1=off)
| | | `------ Input FEAT0 (ISR0 bit 5) after output on FCR0
| | `------- Input FEAT0 (ISR0 bit 6) after output on FCR0
| `-------- Input FEAT1 (ISR0 bit 5) after output on FCR1
`--------- Input FEAT1 (ISR0 bit 6) after output on FCR1
40:89byteVideo display data area (MCGA and VGA)
|7|6|5|4|3|2|1|0| Video display data area (MCGA and VGA)
| | | | | | | `-- 1=VGA is active
| | | | | | `--- 1=gray scale is enabled
| | | | | `---- 1=using monochrome monitor
| | | | `----- 1=default palette loading is disabled
| | | `------ see table below
| | `------- reserved
| `--------  1=display switching enabled
`--------- alphanumeric scan lines (see table below)
      Bit7    Bit4Scan Lines
00350 line mode
01400 line mode
10200 line mode
11reserved
40:8AbyteDisplay Combination Code (DCC) table index (EGA)
40:8BbyteLast diskette data rate selected
|7|6|5|4|3|2|1|0| last diskette data rate selected
| | | | `--------- reserved
| | `------------ last floppy drive step rate selected
`-------------- last floppy data rate selected
Data Rate Step Rate
00  500K bps00  step rate time of 0C
01  300K bps01  step rate time of 0D
10  250K bps10  step rate time of 0A
11  reserved11  reserved
40:8CbyteHard disk status returned by controller
40:8DbyteHard disk error returned by controller
40:8EbyteHard disk interrupt control flag(bit 7=working int)
40:8FbyteCombination hard/floppy disk card when bit 0 set
40:90  4 bytesDrive 0,1,2,3 media state
|7|6|5|4|3|2|1|0| drive media state (4 copies)
| | | | | `------- drive/media state (see below)
| | | | `------- reserved
| | | `------- 1=media/drive established
| | `------- double stepping required
`--------- data rate:00=500K bps    01=300K bps
10=250K bps    11=reserved
Bits
210  Drive Media State
000  360Kb diskette/360Kb drive not established
001  360Kb diskette/1.2Mb drive not established
010  1.2Mb diskette/1.2Mb drive not established
011  360Kb diskette/360Kb drive established
100  360Kb diskette/1.2Mb drive established
101  1.2Mb diskette/1.2Mb drive established
110  Reserved
111  None of the above
40:94byteTrack currently seeked to on drive 0
40:95byteTrack currently seeked to on drive 1
40:96byteKeyboard mode/type
|7|6|5|4|3|2|1|0| Keyboard mode/type
| | | | | | | `--- last code was the E1 hidden code
| | | | | | `---- last code was the E0 hidden code
| | | | | `----- right CTRL key depressed
| | | | `------ right ALT key depressed
| | | `------- 101/102 enhanced keyboard installed
| | `-------- force num-lock if Rd ID & KBX
| `--------- last char was first ID char
`---------- read ID in process
40:97byteKeyboard LED flags
|7|6|5|4|3|2|1|0| Keyboard LED flags
| | | | | | | `--- scroll lock indicator
| | | | | | `---- num-lock indicator
| | | | | `----- caps-lock indicator
| | | | `------ circus system indicator
| | | `------- ACK received
| | `-------- re-send received flag
| `--------- mode indicator update
`---------- keyboard transmit error flag
40:98dwordPointer to user wait complete flag
40:9CdwordUser wait Time-Out value in microseconds
40:A0byteRTC wait function flag
|7|6|5|4|3|2|1|0|
INT 15,86 RTC wait function flag
| | | | | | | `--- 1= wait pending
| `-------------- not used
`--------------- 1=INT 15,86 wait time elapsed
40:A1byteLANA DMA channel flags
40:A2  2 bytesStatus of LANA 0,1
40:A4dwordSaved hard disk interrupt vector
40:A8dwordBIOS Video Save/Override Pointer Table address
(see
VIDEO TABLES)
40:AC  8 bytesReserved
40:B4byteKeyboard NMI control flags (convertible)
40:B5dwordKeyboard break pending flags (convertible)
40:B9bytePort 60 single byte queue (convertible)
40:BAbyteScan code of last key (convertible)
40:BBbyteNMI buffer head pointer (convertible)
40:BCbyteNMI buffer tail pointer (convertible)
40:BD  16bytesNMI scan code buffer (convertible)
40:CEwordDay counter (convertible and after)
40:F0  16bytesIntra-Applications Communications Area (IBM Technical
Reference incorrectly locates this at 50:F0-50:FF)
Address Size   Description (BIOS/DOS Data Area)
50:00bytePrint screen status byte
00 = PrtSc not active,
01 = PrtSc in progress
FF = error
50:01  3 bytesUsed by BASIC
50:04byteDOS single diskette mode flag, 0=A:, 1=B:
50:05  10bytesPOST work area
50:0FbyteBASIC shell flag; set to 2 if current shell
50:10wordBASICs default DS value (DEF SEG)
50:12dwordPointer to BASIC
INT 1C interrupt handler
50:16dwordPointer to BASIC
INT 23 interrupt handler
50:1AdwordPointer to BASIC
INT 24 disk error handler
50:20wordDOS dynamic storage
50:22  14bytesDOS diskette initialization table (
INT 1E)
50:304bytesMODE command
70:00I/O drivers from IO.SYS/IBMBIO.COM

The following map varies in size and locus

07C0:0Boot code is loaded here at startup (31k mark)A000:0EGA/VGA RAM for graphics display mode 0Dh & aboveB000:0MDA RAM, Hercules graphics display RAMB800:0CGA display RAMC000:0EGA/VGA BIOS ROM (thru C7FF)C400:0Video adapter ROM spaceC600:0 256bytes PGA communication areaC800:0 16KHard disk adapter BIOS ROMC800:5XT Hard disk ROM format, AH=Drive, AL=InterleaveD000:0 32KCluster adapter BIOS ROMD800:0PCjr conventionalsoftware cartridge addressE000:0 64KExpansion ROM space (hardwired on AT) 128KPS/2 System ROM (thru F000)F000:0System monitor ROMPCjr: software cartridge override addressF400:0System expansion ROMsF600:0IBM ROM BASIC (AT)F800:0PCjr software cartridge override addressFC00:0BIOS ROMFF00:0System ROMFFA6:EROM graphics character tableFFFF:0ROM bootstrap codeFFFF:5 8 bytesROM date (not applicable for all clones)FFFF:EbyteROM machine id(see MACHINE ID)
原创粉丝点击