ROM-BIOS与实模式1MB常规内存的结构

导读:
ROM-BIOS与实模式1MB常规内存的结构


ROM BIOS and the first MEG of memory

The following is the layout and contents of the first Meg of memory. As I get more information, I will update it accordingly.

Items that are new are marked in the notes column (02 Dec 1999)

Notes*Offset (hex)Size (dec)      Description

00004Interrupt Vector for INT 00h (division by zero)

00044Interrupt Vector for INT 01h (single step)

00084Interrupt Vector for INT 02h (Nonmaskable)

000C4Interrupt Vector for INT 03h (Break point)

00104Interrupt Vector for INT 04h (overflow)

00144Interrupt Vector for INT 05h (print screen)

00184Interrupt Vector for INT 06h (invalid opcode)

001C4Interrupt Vector for INT 07h (processor extension not available)

00204Interrupt Vector for INT 08h (clock tick (hardware))

00244Interrupt Vector for INT 09h (keyboard)

00284Interrupt Vector for INT 0Ah (LPT2)

002C4Interrupt Vector for INT 0Bh (COM2)

00304Interrupt Vector for INT 0Ch (COM1)

00344Interrupt Vector for INT 0Dh (IRQ5)

00384Interrupt Vector for INT 0Eh (floppy disk attention)

003C4Interrupt Vector for INT 0Fh (printer control)

00404Interrupt Vector for INT 10h (video)

00444Interrupt Vector for INT 11h (equipment list)

00484Interrupt Vector for INT 12h (memory size)

004C4Interrupt Vector for INT 13h (disk BIOS)

00504Interrupt Vector for INT 14h (communications BIOS)

00544Interrupt Vector for INT 15h (system BIOS)

00584Interrupt Vector for INT 16h (keyboard BIOS)

005C4Interrupt Vector for INT 17h (printer BIOS)

00604Interrupt Vector for INT 18h (ROM Basic Language)

00644Interrupt Vector for INT 19h (boot-strap)

00684Interrupt Vector for INT 1Ah (Time and Date)

006C4Interrupt Vector for INT 1Bh (Ctrl Break)

00704Interrupt Vector for INT 1Ch (Clock tick)

00744Holds address pointing to control parameters

00784Holds address pointing to floppy disk drive parameter table

007C4Holds address pointing to second half of character table (128 - 255)

00804Interrupt Vector for INT 20h (terminate)

00844Interrupt Vector for INT 21h (MS-DOS function calls)

00884Holds address pointing to MS-DOS program terminate routine

008C4Holds address pointing to MS-DOS keyboard-break handler

00904Holds address pointing to MS-DOS critical-error handler

00944Interrupt Vector for INT 25h (Absolute disk read)

00984Interrupt Vector for INT 26h (Absolute disk write)

009C4Interrupt Vector for INT 27h (MS-DOS TSR)

00A04Interrupt Vector for INT 28h (MS-DOS IDLE)

00A44Interrupt Vector for INT 29h (Fast CON output)

00A84Interrupt Vector for INT 2Ah (NetBIOS)

00A812Interrupt Vector for INT 2Bh-2Dh (reserved)

00B84Interrupt Vector for INT 2Eh (Execute)

00BC4Interrupt Vector for INT 2Fh (Multitask)

00C04(NOT A VECTOR!) - DOS 1+ - FAR JMP instruction

00C44overwritten by CP/M jump instruction in INT 30

00C84Interrupt Vector for INT 32h (user)

00CC4Interrupt Vector for INT 33h (Mouse)

00D044Interrupt Vector for INT 34h-3Eh (FLOATING POINT EMULATION)

00FC4Interrupt Vector for INT 3Fh (Overlay manager)

01004Interrupt Vector for INT 40h (Disk handler)

01044Holds address pointing to Parameter table for first hard drive

01084Interrupt Vector for INT 42h (video)

010C4Holds address pointing to video graphics characters (EGA, PS/2s)

01104Holds address pointing to video graphics characters (PCjr)

01144Z100/Acron

01184Holds address pointing to Parameter table for second hard drive

011C4Z100/Acorn/Western Digital/SQL Base

01204KEYBOARD (PCjr)

01244SYSTEM DATA (PCjr)

01284Interrupt Vector for INT 4Ah (USER ALARM HANDLER)

012C4Interrupt Vector for INT 4Bh (IBM SCSI interface)

01304Interrupt Vector for INT 4Ch (Z100/Acorn/TI)

01344Interrupt Vector for INT 4Dh (Z100)

01384Interrupt Vector for INT 4Eh (Z100/TI)

013C4Interrupt Vector for INT 4Fh (Common Access Method SCSI)

01404Interrupt Vector for INT 50h (IRQ0 relocated by software)

01444Interrupt Vector for INT 51h (IRQ1 relocated by software)

01484Interrupt Vector for INT 52h (IRQ2 relocated by software)

014C4Interrupt Vector for INT 53h (IRQ3 relocated by software)

01504Interrupt Vector for INT 54h (IRQ4 relocated by software)

01544Interrupt Vector for INT 55h (IRQ5 relocated by software)

01584Interrupt Vector for INT 56h (IRQ6 relocated by software)

015C4Interrupt Vector for INT 57h (IRQ7 relocated by software)

01604Interrupt Vector for INT 58h (IRQ8/0 relocated by software)

01644Interrupt Vector for INT 59h (IRQ9/1 relocated by software)

01684Interrupt Vector for INT 5Ah (IRQ10/2 relocated by software)

016C4Interrupt Vector for INT 5Bh (IRQ11/3 relocated by software)

01704Interrupt Vector for INT 5Ch (IRQ12/4 relocated by software)

01744Interrupt Vector for INT 5Dh (IRQ13/5 relocated by software)

01784Interrupt Vector for INT 5Eh (IRQ14/6 relocated by software)

017C4Interrupt Vector for INT 5Fh (IRQ15/7 relocated by software)

018028Interrupt Vector for INT 60h-66h (reserved for user interrupt)

019C4Interrupt Vector for INT 67h (LIM Expanded Memory Manager)

01A016Interrupt Vector for INT 68h-6Bh (reserved for user interrupt)

01B04Interrupt Vector for INT 6Ch (DECnet DOS network scheduler)

01B44Interrupt Vector for INT 6Dh (VGA internal)

01B84Interrupt Vector for INT 6Eh (DECnet DOS)

01BC4Interrupt Vector for INT 6Fh (Novell NetWare, MS Windows 3.0)

01C04Interrupt Vector for INT 70h (CMOS real-time clock)

01C44Interrupt Vector for INT 71h (redirected to int 0A)

01C88Interrupt Vector for INT 72h-73h (IRQ10-11 reserved)

01D04Interrupt Vector for INT 74h (IRQ12 Pointing device)

01D44Interrupt Vector for INT 75h (IRQ13 math coprocessor exception)

01D84Interrupt Vector for INT 76h (IRQ14 Hard disk controller)

01DC4Interrupt Vector for INT 77h (IRQ15 reserved)

01E04Interrupt Vector for INT 78h (DOS extenders?)

01E44Interrupt Vector for INT 79h (reserved for user interrupt)

01E84Interrupt Vector for INT 7Ah (Novell NetWare)

01E820Interrupt Vector for INT 7Bh-7Fh (reserved for user interrupt)

020024Interrupt Vector for INT 80h-85h (reserved for BASIC)

0218420Interrupt Vector for INT 86h-EEh (reserved for BASIC)

03BC4Interrupt Vector for INT EFh (BASIC - orig. INT 09 vector)

03C04Interrupt Vector for INT F0h (BASIC - orig. INT 08 vector)

03C452Interrupt Vector for INT F1h-FDh (reserved for user interrupt)

03F88Interrupt Vector for INT FEh-FFh (AT/XT286/PS50+)
Remember that 0000:0400h = 0040:0000h

04002COM1 I/O base address (set to 0 if none found)

04022COM2 I/O base address (set to 0 if none found)

04042COM3 I/O base address (set to 0 if none found)

04062COM4 I/O base address (set to 0 if none found)

04082LPT1 I/O base address (set to 0 if none found)

040A2LPT2 I/O base address (set to 0 if none found)

040C2LPT3 I/O base address (set to 0 if none found)

040E2LPT4 I/O base address (set to 0 if none found)


2(if extended BIOS on system) Segment address of Extended BIOS Data Area (9FC0:0000h)

04102equipment list reported by interrupt 11h (see figure 1)

04121PCjr - Infrared Keyboard Link Error

04132usable memory size in kilobytes (interrupt 12h)



Usually set to 0280h. If less, then denotes 640k-difference=size of Extended BIOS Data Area at (9FC0:0000h)

04152(AT+) Error codes from the BIOS manufacturer


2(PC,XT) Adapter Memory Size

04172keyboard status bits (see figure 2)

04191Alternate Keypad entry

041A2points to current head of keyboard buffer at 0040:001Eh

041C2points to current tail of keyboard buffer at 0040:001Eh

041E32keyboard buffer - used as sixteen 2-byte entries

043E1indicates whether a floppy drive should be re calibrated

043F1floppy drive motor status (bites 0-3)



bit 0 = drive 0, if set - drive motor running



bit 1 = drive 1, if set - drive motor running, etc.

04401floppy drive motor status. The value in this byte is



decremented with every tick of the system clock.



When the value returns 0, the BOIS turns off the motor

04411floppy drive motor status. status code returned by the



ROM BIOS from the most recent disk operation

04427floppy drive controller status

04491current video mode

044A2max number of chars in a row of text

044C2number of bytes needed to display the screen (text=80x25)

044E2offset of current display page

0450168 words, each giving the cursor location of each page

04602size of current cursor

04621current display page

04632port address of the hardware display controller chip

04651current setting of the display mode-register of the MDA and CGA

04661current setting of the CGA's CRT color register

04675cassette tape control

046C4master clock count (long integer) 0 = midnight and increments until a 24 hour equiv.

04701not 0 = passed midnight

04711if bit 7 is set, ctrl-break was pressed

04722set to 1234h after initial power up telling a warm boot to skip mem check

04744floppy and hard disk control

04784contains a time-out value for the respective parallel ports

047C4contains a time-out value for the respective RS-232 serial ports

04802points at the start of the keyboard buffer area

04822points at the end of the keyboard buffer area

04841this value is one less than the number of character rows displayed on the screen

04852height, in scan lines, of characters on the screen

04874Amount of video RAM available



Initial setting of the EGA configuration switches, as well as other misc video status info.

048B11control and status information regarding the floppy and hard disk drives

04962data area used to support the 101-key keyboard

04989real time clock control

04A11LANA DMA channel flags

04A22Status of LANA 0,1

04A44Saved hard disk interrupt vector

04A84(EGA and VGA) contain segmented address of a table of video parameters and overrides

04AC8(reserved)

04B41Keyboard NMI control flags (convertible)

04B54Keyboard Break pending flags (convertible)

04B91Port 60h single byte Queue (convertible)

04BA1Scan code for last key (convertible)

04BB1NMI Buffer head pointer (convertible)

04BC1NMI Buffer tail pointer (convertible)

04BD16NMI scan code Buffer (convertible)

04CD1unknown

04CE2Day Counter (convertible)

04D016unknown

04F016intra-application communications area (ICA)



ie: known area where one app can communicate with another app.



(not used much because of its small size)
Remember that 0000:0500h = 0050:0000h

05001status of a print-screen operation



00h - OK



01h - a print-screen operation currently in progress



FFh - error occurred during a print-screen operation

05013Used by BASIC

05041if only 1 floppy installed, this byte indicates which drive letter it is using (a or b)



00h - acting as drive a:



01h - acting as drive b:

050510POST work area

050F1BASIC shell flag (2 if currently in shell)

05102holds ROM Basics default DS value (DO NOT CHANGE)

05124segment offset address of Basic's clock-tick interrupt handler

05164address for ROM Basic's Break-key-handling routine

051A4address for ROM Basic's floppy disk error-handling routine
new05202DOS Dynamic Storage ???
new052214DOS Diskette Initialization Table ???
new05304MODE command ???

0534206unknown
Remember that 0000:0600h = 0060:0000h

0600256scratch space used during DOS 2+ boot up
Remember that 0000:0700h = 0070:0000h

DOS 2+

0700256IO.SYS LOAD ADDRESS

DOS 5+

070025ORIGINAL INTERRUPT VECTORS 10h,13h,15h,19h,1Bh



Each value is stored as a BYTE for the interrupt number followed by a DWORD for the vector

0719231unknown
Remember that 0000:0800h = 0080:0000h

080010280286 CPU - LOADALL WORKSPACE



On the 80286 (unlike 80386), the state buffer from which the LOADALL instruction loads all internal registers is hardwired to physical address 000800h Several versions 3.x of MS-DOS leave an empty space at offset 100h in IO.SYS (which is loaded at 0070h:0000h) so that HIMEM.SYS can use LOADALL on 80286 machines without having to save/restore the area of memory that LOADALL uses

0866154unknown
Remember that 0000:0900h = 0090:0000h

0900653,056DOS (COMMAND.COM, etc., User Memory)
9FC0h:0000h - If your system has Extended BIOS Data Area (see 0040:000Eh and :0013h above)

00001Size of Extended BIOS Data Area in 1k blocks

000221unknown

00171Number of POST error entries

001810Error Log for above

00224Mouse Driver Device Far Call

00261Mouse Flags 1

00271Mouse Flags 2

00288Mouse Data

00309unknown

00392Watch Dog Timer

003B2unknown

003D16Hard Disk 0 Parameter Table

004D16Hard Disk 1 Parameter Table

005D11unknown

00681Cache Control

00695unknown

006E1Repeat Rate of Keyboard

006F1Delay until Keyboard repeats

00701Number of Hard Drives attached

00711DMA channel Hard Drive

00721Hard Drive interrupt status

00731Hard Drive operation flags

00744Old interrupt 76h vector pointer

00781Hard Drive DMA type

00791(Hard Drive) status of last operation

007A1(Hard Drive) timeout value

007B3unknown

007E16Hard Drive controller return status words

008E89unknown

00E71Diskette Drive type

00E84unknown

00EC1Hard Drive Parameters Loaded

00ED1unknown

00EE1CPU Family ID

00EF1CPU Stepping

00F039unknown

01172Keyboard ID

01191unknown

011A1Non-BIOS Interrupt 18h Flag

011B2unknown

011D4User Interrupt 18h Far Pointer

0121735unknown
A000:0000h

000065,536Graphics Video memory (EGA and above)
B000:0000h

000032,768Graphics area for EGA and up

80004096Page 0 - 80x25 16 color and mono (B800:0000)

90004096Page 1 - 80x25 16 color and mono (B800:1000)

A0004096Page 2 - 80x25 16 color and mono (B800:2000)

B0004096Page 3 - 80x25 16 color and mono (B800:3000)

C0004096Page 4 - 80x25 16 color and mono (B800:4000)

D0004096Page 5 - 80x25 16 color and mono (B800:5000)

E0004096Page 6 - 80x25 16 color and mono (B800:6000)

F0004096Page 7 - 80x25 16 color and mono (B800:7000)
C000:0000h

000065,536additional ROM-BIOS & video memory
D000:0000h

000065,536ROM cartridges
E000:0000h

000065,536ROM cartridges
F000:0000h

000032,768IBM PC ROM BASIC

E0008,192ORIGINAL IBM PC ROM BIOS

FFF05RESET JUMP

FFF58ASCII BIOS DATE

FFFD1OFTEN USED TO ENSURE CORRECT BIOS CHECKSUM

FFFE1MACHINE TYPE CODE

FFFF1unknown
Total memory
0000:0000—F000:FFFF1,048,57616 x 65,536 = 1 meg
*Notes: none at this time





-------------------------- Figures ---------------------------

****************************************************************
bit
FEDCBA98 76543210 Described
XX...... ........ Number of printers installed
..X..... ........ (reserved)
...X.... ........ set if game adapter installed
....XXX. ........ Number of RS-232 serial ports
.......X ........ (reserved)
........ XX...... +1 = number of floppy drives (see bit 0) 00 - 1 drive, 01 - 2 drives, etc.
........ ..XX.... Initial video mode
01 - 40 column color
10 - 80 column color
11 - monochrome
00 - none of the above
........ ....XX.. For PC w/64k motherboard
Amount of system board RAM
00 - 16k,01 - 32k, 10 - 48k, 11 - 64k
For PC/AT: not used
For PS/2:
Bit 3 not used
Bit 2 - pointing device installed
........ ......X. set if math co processor installed
........ .......X set if any floppy drives installed
if set, see bits 6 and 7
****************************************************************
FIGURE 1: equipment list word at 0000:0410h



****************************************************************
bits
76543210 Described
0000:0417h
X....... insert state: (1 = active, 0 = inactive)
.X...... caps lock:
..X..... num lock:
...X.... scroll lock:
....X... set if alt pressed
.....X.. set if ctrl pressed
......X. set if left shift pressed
.......X set if right shift pressed

0000:0418h
X....... set if insert pressed
.X...... set if caps lock pressed
..X..... set if num lock pressed
...X.... set if scroll lock pressed
....X... hold state active (ctrl-num lock or pause pressed)
.....X.. system request pressed
......X. left alt pressed
.......X right alt pressed
****************************************************************
FIGURE 2: Keyboard status bits at 0000:0417h, lo order bits are set
only while a corresponding key is pressed
本文转自

http://www.frontiernet.net/~fys/rombios.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值