Sunteți pe pagina 1din 20

3510-2 appA.f.

qc

7/28/00

13:53

Page 685

A P P E N D I X

Memory
Maps and BIOS
Data Areas

ne of the standard elements of PCs running DOS or


using the PC hardware structure for other operating
environments (UNIX, OS/2, and so on) is having the locations
of the many bits of information about the hardware system in
consistent, known places.
Some of this is predetermined by the use of Intel microprocessors, following the design conventions for starting the processor, loading an operating system, and running applications
using standard devices. IBM established the rest in the Bits
71 Reserved design of the original IBM PC.
Although IBM established the initial standard, the least of
which all PCs must follow to be PC-compatible, other vendors, such as COMPAQ, American Megatrends, Phoenix
Technologies, Chips and Technology, and Tandy, have taken
advantage of the information IBM made available and the
remaining holes that IBM left to be filled by enhancements.
Without getting into system architecture and programming
details, the standards are meant to be followed. There are
many ways around the standards, however, such as by replacing or redirecting device-handling program code, device locations, timing, and so on. Presented here are the standard PC
device and parameter locations. Although we dont expect
that everyone will need to use this information, its nice to
have it around just in case.

DOS Memory Map


Table A-1 is a gross memory map of PC systems. Following it
are more detailed maps of specific areas.

3510-2 appA.f.qc

686

7/28/00

13:53

Page 686

Appendixes

Table A-1
DOS Memory Map
Address

Size

Contents/Use

0:00009:FFFFh

640K

System RAM (DOS)

0:00000:01DFh

480K

Interrupt vectors

0:01E00:02FFh

288K

User vectors

0:03000:03FFh

256K

BIOS stack/vectors (see Table A-2 for low memory details)

0:04000:04FFh

256K

BIOS data (see Table A-3 for BIOS data details)

0:05000:05FFh

256K

DOS and BASIC use

0:06009:FFFFh

638K

DOS and user RAM

A:0000B:FFFFh

128K

Video buffer RAM

C:0000E:FFFFh

192K

Adapter ROM/EMS page and/or Upper Memory Block (see


Table A-4 for upper memory details)Au/ed: font OK?

F:0000F:FFFFh

64K

ROM BIOS (Boot, POST)


Also ROM BASIC (IBM)
AMI also includes diagnostics and setup here

10:0000up

Extended memory
14.9MB 80286
30.9MB 80386, 80486

10:000010:FFFFh

64K

Microsoft XMS/HMA using HIMEM.SYS, QEMM, or other


drivers

10:0000FD:FFFFh

14.9MB

Extended memory

FE:0000FF:FFFFh

128K

AT ROM BIOS includes ROM BASIC (IBM only)

Remapping 384K Memory


Some non-IBM systems, such as those using some of the Chips and Technology or other specialized architectures, allow for remapping the 384K memory area above DOS RAM (640K) as
shadow RAM and placing into it all basic input/output system (BIOS) and other information
from the hardware in that region. This speeds certain operations (video, disk, BIOS calls) by
having this information available in faster RAM memory rather than having to rely on the slow
response of ROM chips. Sometimes the use of shadow RAM is optional, which allows other
upper-memory-block memory-management applications to use this memory range, and
sometimes it is forced, precluding its use, depending on the manufacturer. Without shadow
RAM, any free memory blocks not used by other devices or applications may be mapped as
upper-memory-block RAM for use here in loading device drivers and terminate-and-stayresidents (TSRs), providing more DOS RAM for applications and data.

3510-2 appA.f.qc

7/28/00

13:53

Page 687

Appendix A Memory Maps and BIOS Data Areas

Low DOS Memory Locations


The addresses shown in Table A-2 may be inspected for their content or, by careful
programming, written to for direct device control.

Table A-2
DOS Low Memory Locations
Address

Description

0000h

DMA Channel 0 Address Byte 0 (Low)

0001h

DMA Channel 0 Word Count Byte 0 (Low)

0002h

DMA Channel 1 Address Byte 0 (Low)

0003h

DMA Channel 1 Word Count Byte 0 (Low)

0004h

DMA Channel 2 Address Byte 0 (Low)

0005h

DMA Channel 2 Word Count Byte 0 (Low)

0006h

DMA Channel 3 Address Byte 0 (Low)

0007h

DMA Channel 3 Word Count Byte 0 (Low)

0008h

DMA Channel 03 Status/Command

0009h

DMA Write Request Register

000Ah

DMA Channel 03 Mask Register

000Bh

DMA Channel 03 Mode Register

000Ch

DMA Clear Byte Pointer

000Dh

DMA Read Temporary Register/Master Clear

000Eh

DMA Clear Mask Register

000Fh

DMA Write Mask Register

0019h

DMA Scratch Register

0020h

Programmable Interrupt Controller Init./Operation Command Word

0021h

PIC Init./Operation Command Word

0022003Fh

8259 Program Interrupt Timer

0040h

Program Int. Timer R/W Center 0/Keyboard Channel 0

0041h

PIT Channel 1

0042h

PIT Channel 2

0043h

PIT Mode Port Control Word Register Channel 0 and 2

0044h

PIT Miscellaneous Register (EISA)


Continued

687

3510-2 appA.f.qc

688

7/28/00

13:53

Page 688

Appendixes

Table A-2 (continued)


Address

Description

0047h

PIT Control Word Register for Channel 0 (EISA)

0048h

For use by PIT

0060h

Keyboard Input Buffer (AT-ISA, EISA)

0060h

Keyboard Output Buffer (XT, AT-ISA, EISA)

0061h

Port B Control/Static Register (AT-ISA, EISA)

0061h

Program Peripheral Interface (XT)

0062h

Program Peripheral Interface (XT)

0063h

Program Peripheral Interface (XT only)

0064h

Keyboard Controller Rd Status (AT-ISA, EISA)

0064h

Keyboard Controller Input Buffer (AT-ISA, EISA)

0066006Fh

Reserved for 8255 (XT)


Reserved for 8042 (AT)

0070h

CMOS RAM Index Register (AT-ISA, EISA)

0071h

CMOS RAM Data Register (AT-ISA, EISA)


00h = Seconds in BCD
01h = Seconds Alarm in BCD
02h = Minutes in BCD
03h = Minutes Alarm in BCD
04h = Hour in BCD
05h = Hour Alarm in BCD
06h = Day of Week in BCD
07h = Day of Month in BCD
08h = Month in BCD
09h = Year in BCD (0099)
0Ah = Status Register A
0Bh = Status Register B
0Ch = Status Register C
0Dh = Status Register D
0Eh = CMOS RAM Diagnostic Status
0Fh = Shutdown/Reboot Code
10h = Type of Diskette Drives
(Bits 74 = Drive 0; Bits 30 = Drive 1)
0000 = None
0001 = 360K
0010 = 1.2MB
0011 = 720K
0100 = 1.44MB
01011111 = Reserved

3510-2 appA.f.qc

7/28/00

13:53

Page 689

Appendix A Memory Maps and BIOS Data Areas

Address

Description

0071h
(continued)

11h = Reserved
12h = Fixed Drive Types
(Bits 74 = Drive 0; Bits 30 = Drive 1)
13h = Reserved
14h = Equipment Byte
15h = Base Memory in K (Low)
16h = Base Memory in K (High)
17h = Extended Memory in K (Low)
18h = Extended Memory in K (High)
19h = Extended Drive Type (16+) 1st Disk
1Ah = Extended Drive Type (16+) 2nd Disk
1B27h = Reserved
2Eh = High Byte, Checksum for 102Dh
2Fh = Low Byte, Checksum for 102Dh
30h = Extended Memory by POST (low byte)
31h = Extended Memory by POST (high byte)
32h = Century in BCD
333Fh = Reserved

0080h

Extra Page Register/Manufacturing Test Port

0081h

DMA Channel 2 Address Byte 2

0082h

DMA Channel 3 Address Byte 3

0083h

DMA Channel 1 Address Byte 2

0084h

Extra Page Register

0085h

Extra Page Register

0086h

Extra Page Register

0087h

DMA Channel 0 Address Byte 2

0088h

Extra Page Register

0089h

DMA Channel 6 Address Byte 2

008Ah

DMA Channel 7 Address Byte 2

008Bh

DMA Channel 5 Address Byte 2

008Ch

Extra Page Register

008Dh

Extra Page Register

008Eh

Extra Page Register

008Fh

DMA Refresh Page Register


Cascade to Channel 57 (AT)

00A0h

NMI Mask Register (XT)

00A0h

Program Interrupt Controller 2 (AT-ISA, EISA)


Continued

689

3510-2 appA.f.qc

690

7/28/00

13:53

Page 690

Appendixes

Table A-2 (continued)


Address

Description

00A1h

PIC 2 Operation Command Word 1

00C0h

DMA Channel 4 Memory Address Bytes 1 and 0

00C2h

DMA Channel 4 Transfer Count Bytes 1 and 0 AT Channel 0

00C4h

DMA Channel 5 Memory Address Bytes 1&0 AT Channel 1

00C6h

DMA Channel 5 Memory Transfer Count Bytes 1 and 0 AT Channel 1

00C8h

DMA Channel 6 Memory Address Bytes 1 and 0 DMA Channel 2 AT

00CAh

DMA Channel 6 Transfer Count Bytes 1 and 0 AT Channel 2

00CCh

DMA Channel 7 Memory Address Bytes 1 and 0 DMA Channel 3 AT

00CEh

DMA Channel 7 Transfer Count Bytes 1 and0 AT Channel 3

00D0h

DMA Channel 47 Status/Command Register (AT only)

00D2h

DMA Channel 47 Write Request Register (AT only)

00D4h

DMA Channel 47 Write Single Mask Register (AT only)

00D6h

DMA Channel 47 Mode Register (AT only)

00D8h

DMA Channel 47 Clear Byte Pointer (AT only)

00DAh

DMA Channel 47 Rd Temporary Register/Master Clear (AT only)

00DCh

DMA Channel 47 Clear Mask Register (AT only)

00DEh

DMA Channel 47 Write Mask Register (AT only)

00DF00EFh

Reserved

00F0h

Math Coprocessor Clear Busy Latch

00F1h

Math Coprocessor Reset

00F2FFh

Math Coprocessor

0100016Fh

Reserved

0170h0177h

AT-ISA and EISA Secondary Fixed Disk Addresses (see 01F001F7h for
information)

01F0h

Fixed Disk 0 Data Register Port

01F1h

Fixed Disk 0 Error Register/WPC Register

01F2h

Fixed Disk 0 Sector Count

01F3h

Fixed Disk 0 Sector Number

01F4h

Fixed Disk 0 Cylinder Byte (Low)

01F5h

Fixed Disk 0 Cylinder Byte (High)

3510-2 appA.f.qc

7/28/00

13:53

Page 691

Appendix A Memory Maps and BIOS Data Areas

Address

Description

01F6h

Fixed Disk 0 Drive/Head Register

01F7h

Fixed Disk 0 Status/Command Register

0200020Fh

Game Port Controller

02100217h

Expansion Unit (XT)

0278h

Parallel Port 3 Data

0279h

Parallel Port 3 Status

027Ah

Parallel Port 3 Control (see Note 1)

02B002DFh

Reserved

02E1h

GPIB (IEEE-488) Adapter 0

02E2h

Data Acquisition Adapter 0

02E3h

Data Acquisition Adapter 0

02E402F7h

Reserved

02F8h

Serial Port 2 Text/Rx Data/Division Latch (Low)

02F9h

Serial Port 2 Interrupt Enable/Division Latch (High)

02FAh

Serial Port 2 Interrupt ID Register

02FBh

Serial Port 2 Line Control Register

02FCh

Serial Port 2 Modem Control Register

02FDh

Serial Port 2 Line Status Register

02FEh

Serial Port 2 Modem Status Register

02FFh

Serial Port 2 Scratch Register

0300031Fh

Prototype Card

0320h

Fixed Disk Adapter (8 or 16 bit)

0322h

Fixed Disk Adapter Control Register

0324h

Fixed Disk Adapter Attention Register

03250347h

Reserved

03480357h

DCA 3278

0360036Fh

PC Network

03720377h

Secondary Diskette Controller (see 3F23F7 for information)

0378h

Parallel Port 2 Data

0379h

Parallel Port 2 Status

037Ah

Parallel Port 2 Control (see Note 1)


Continued

691

3510-2 appA.f.qc

692

7/28/00

13:53

Page 692

Appendixes

Table A-2 (continued)


Address

Description

0380038Fh

SDLC and BSC Communications Adapter

03900393h

Cluster Adapter 0

03A003AFh

Primary BSC Communications

03B003B3h

Miscellaneous Video Registers

03B4h

MDA, EGA, VGA CRT Controller


Index Register

03B5h

MDA, EGA, VGA CRT Controller Data Register (Index)


00h = Horizontal Total
01h = Horizontal Displayed
02h = Horizontal Sync. Position
03h = Horizontal Sync. Pulse Width
04h = Vertical Total
05h = Vertical Displayed
06h = Vertical Sync. Position
07h = Vertical Sync. Pulse Width
08h = Interlace Mode
09h = Maximum Scan Lines
0Ah = Cursor Start
0Bh = Cursor End
0Ch = Start Address (High)
0Dh = Start Address (Low)
0Eh = Cursor Location (High)
0Fh = Cursor Location (Low)
10h = Light Pen (High)
11h = Light Pen (Low)

03B8h

MDA Mode Control Register (buffer at B0000h)

03BAh

VGA Input Status Register EGA/VGA Feature Control Register

03BCh

Parallel Port 1 Data

03BDh

Parallel Port 1 Status

03BEh

Parallel Port 1 Control (see Note 1)

03BFh

Hercules Configuration Register

03C0h

EGA Index Register

03C2h

CGA, EGA, VGA Input Status Register and Misc. Output Register

03C4h

CGA, EGA, VGA Sequencer Index Register

03C5h

CGA, EGA, VGA Sequencer Data Register

03C6h

VGA Video DAC State Register DAC PEL Mask

3510-2 appA.f.qc

7/28/00

13:53

Page 693

Appendix A Memory Maps and BIOS Data Areas

Address

Description

03C7h

VGA Video DAC State Register

03C8h

VGA PEL Address, Read Mode

03C9h

VGA Video DAC Registers

03CAh

CGA, EGA, VGA Graphics Position Register 2

03CCh

CGA, EGA, VGA Graphics Position Register 1

03CDh

VGA Feature Control Register (color)

03CEh

VGA Control Index Register

03CFh

Other VGA Register (EGA also uses 03B45h, 03BAh, 03D45h, and
03DAh) (buffer at A0000h)

03D4h

Video CRT Controller Index Register

03D5h

Video CRTC Registers (Index)


00h = Horizontal Total
01h = Horizontal Displayed
02h = Horizontal Sync. Position
03h = Horizontal Sync. Pulse Width
04h = Vertical Total
05h = Vertical Displayed
06h = Vertical Sync. Position
07h = Vertical Sync. Pulse Width
08h = Interlace Mode
09h = Maximum Scan Lines
0Ah = Cursor Start
0Bh = Cursor End
0Ch = Start Address (High)
0Dh = Start Address (Low)
0Eh = Cursor Location (High)
0Fh = Cursor Location (Low)
10h = Light Pen (High)
11h = Light Pen (Low)

03D8h

Video Mode Control Register

03D9h

Video Palette Register (buffer at B8000h)

03DAh

CGA, EGA, VGA Register

03DBh

Video Register

03DCh

Video Register

03DDh

Video Register

03DEh

Video Register
Continued

693

3510-2 appA.f.qc

694

7/28/00

13:53

Page 694

Appendixes

Table A-2 (continued)


Address

Description

03DFh

Video Register

03F0h

Disk Controller Status Register A

03F1h

Disk Controller Status Register B

03F2h

Disk Controller Output Register

03F4h

Disk Controller Status Register

03F5h

Disk Controller Data Register

03F6h

Fixed Disk Control Port

03F7h

Disk Input/Data Transfer Rate Register

03F8h

Serial Port 1 Text/Rx Data Divisor Latch (Low Byte)

03F9h

Serial Port 1 Interrupt Enable Divisor Latch (High Byte)

03FAh

Serial Port 1 Interrupt ID Register

03FBh

Serial Port 1 Line Control Register

03FCh

Serial Port 1 Modem Control Register

03FDh

Serial Port 1 Line Status Register

03FEh

Serial Port 1 Modem Status Register

03FFh

Serial Port 1 Scratch Register (reserved)


040104D6h (Used in EISA Systems Only)

0401h

DMA Channel 0 Word Count Byte (High)

0403h

DMA Channel 1 Word Count Byte (High)

0405h

DMA Channel 2 Word Count Byte (High)

0407h

DMA Channel 3 Word Count Byte (High)

040Ah

DMA 03 Channel Mode Register/IRQ 13 Status

040Bh

DMA Channel 03 Extended Mode Register

0461h

Ext. NMI Status/Control Register

0462h

Software NMI Register

0464h

Bus Master Status Register (Slots 18)

0465h

Bus Master Status Register (Slots 916)

0481h

DMA Channel 2 Address Byte 3 (High)

0482h

DMA Channel 3 Address Byte 3 (High)

0483h

DMA Channel 1 Address Byte 3 (High)

3510-2 appA.f.qc

7/28/00

13:53

Page 695

Appendix A Memory Maps and BIOS Data Areas

Address

Description

0487h

DMA Channel 0 Address Byte 3 (High)

0489h

DMA Channel 6 Address Byte 3 (High)

048Ah

DMA Channel 7 Address Byte 3 (High)

048Bh

DMA Channel 5 Address Byte 3 (High)

04C6h

DMA Channel 5 Word Count Byte 2 (High)

04CAh

DMA Channel 6 Word Count Byte 2 (High)

04CEh

DMA Channel 7 Word Count Byte 2 (High)

04D0h

IRQ 07 Interrupt Edge/Level Registers

04D1h

IRQ 815 Interrupt Edge/Level Registers

04D4h

Ext. DMA 47 Chain. Mode/Status Register

04D6h

Ext. DMA 47 Mode Register

06E206E3h

Data Acquisition Adapter 1

07900793h

Cluster Adapter 1

080008FFh

I/O Port Register for External CMOS RAM

0AE20AE3h

Cluster Adapter 2

0B900B93h

Cluster Adapter 2

0C00h

Page Register for I/O or SRAM

0C800C83h

System Board ID Registers

13901393h

Cluster Adapter 3

23902393h

Cluster Adapter 4

3220h

Serial Port 3 Text/Rx Data Divisor Latch (Low Byte)

3221h

Serial Port 3 Interrupt Enable Divisor Latch (High Byte)

3222h

Serial Port 3 Interrupt ID Register

3223h

Serial Port 3 Line Control Register

3224h

Serial Port 3 Modem Control Register

3225h

Serial Port 3 Line Status Register

3226h

Serial Port 3 Modem Status Register

3227h

Serial Port 3 Scratch Register

3228h

Serial Port 4 Text/Rx Data Divisor Latch (Low Byte)

3229h

Serial Port 4 Interrupt Enable. Divisor Latch (High Byte)

322Ah

Serial Port 4 Interrupt ID Register


Continued

695

3510-2 appA.f.qc

696

7/28/00

13:53

Page 696

Appendixes

Table A-2 (continued)

Note

Address

Description

322Bh

Serial Port 4 Line Control Register

322Ch

Serial Port 4 Modem Control Register

322Dh

Serial Port 4 Line Status Register

322Eh

Serial Port 4 Modem Status Register

322Fh

Serial Port 4 Scratch Register

323042E0h

Reserved

42E1h

GPIB (IEEE-488) Adapter 2

42E262E0h

Reserved

62E1h

GPIB (IEEE-488) Adapter 3

62E282E0h

Reserved

82E1h

GPIB (IEEE-488) Adapter 4

82E2A2E0h

Reserved

A2E1h

GPIB (IEEE-488) Adapter 5

A2E2AFFEh

Reserved

AFFFh

Video Plane 03 System Latch

B000C2E0h

Reserved

C2E1h

GPIB (IEEE-488) Adapter 6

C2E2E2E0h

Reserved

E2E1h

GPIB (IEEE-488) Adapter 7

E2E2FFFFh

Reserved

Although the listed addresses of 3BCh for Port 1, 378h for Port 2, and 278h for
Port 3 are common in many BIOS and programming references, most parallel port
cards address Port 1 as 378h, Port 2 as 278h, and Port 3 (rarely used) as 3BCh. A
function of BIOS, if only one port card exists, is to direct it as Port 1, despite the
actual hardware address. This enables printing to a default device (PRN: or LPT:),
if any port exists.

3510-2 appA.f.qc

7/28/00

13:53

Page 697

Appendix A Memory Maps and BIOS Data Areas

PC BIOS data area


As we mentioned, normal PC operations expect certain information about the system and interfaces to be located in specific places in memory. The BIOS data area,
listed in Table A-3, is one such place.
This area of lower DOS RAM memory, at Offset 0, Location 400h, will contain information about serial and parallel ports (if they exist or were found at bootup) and
other features of your system as listed in Table A-3.
This information may be viewed or changed with the DOS DEBUG program or other
memory viewing/editing tools. To display this information, invoke DEBUG at a DOS
prompt, type d0:400, and then press Enter. To view more addresses, type d and
then press Enter until the address area of interest appears. Type q and press Enter
to exit DEBUG.

Table A-3
BIOS Data Area
Address

Size

Contents

0:400h

I/O address of 1st serial port

0:402h

I/O address of 2nd serial port

0:404h

I/O address of 3rd serial port

0:406h

I/O address of 4th serial port

0:408h

I/O address of 1st parallel port

0:40Ah

I/O address of 2nd parallel port

0:40Ch

I/O address of 3rd parallel port

0:40Eh

I/O address of 4th parallel port or segment address of extended


data area

0:410h

Number of devices installed:


Bits 1514 Number of printers
Bits 1312 Reserved
Bits 119 Number of serial ports
Bit 8 Reserved
Bits 76 Number of drives
00 = 1 Drive
01 = 2 Drives
Bits 45 Bootup video mode
00 = PGA or EGA
01 = Color 40 25
Continued

697

3510-2 appA.f.qc

698

7/28/00

13:53

Page 698

Appendixes

Table A-3 (continued)


Address

Size

Contents
10 = Color 80 25
11 = B&W 80 25
Bit 3 Reserved
Bit 2 Pointing device
Bit 1 Math coprocessor
Bit 0 Disk for boot

0:410h
(continued)

0:412h

Bits 71 Reserved
Bit 01 = Mfg. test mode
0 = Nontest mode

0:413h

Size of memory in kilobytes

0:417h

Keyboard flags:
Bit 7 Insert on
Bit 6 Caps Lock on
Bit 5 Num Lock on
Bit 4 Scroll Lock on
Bit 3 Alt pressed
Bit 2 Ctrl pressed
Bit 1 Left Shift pressed
Bit 0 Right Shift pressed

0:418h

Keyboard flags:
Bit 7 Insert on
Bit 6 Caps Lock on
Bit 5 Num Lock on
Bit 4 Scroll Lock on
Bit 3 Ctrl+Num Lock on
Bit 2 SysRq pressed
Bit 1 Left Alt pressed
Bit 0 Right Alt pressed

0:419h

Alt and Numeric keypad area

0:41Ah

Points to next character in keyboard buffer

0:41Ch

Points to 1st free spot in keyboard buffer

0:41Eh

32

Keyboard buffer area

0:43Eh

Disk drive recalibrate status:


Bit 7 Disk hardware interrupt
Bits 64 Not used
Bits 32 Reserved
Bit 1 Recalibrate drive 1
Bit 0 Recalibrate drive 0

3510-2 appA.f.qc

7/28/00

13:53

Page 699

Appendix A Memory Maps and BIOS Data Areas

Address

Size

Contents

0:43Fh

Disk motor status:


Bit 7 Writing or formatting
Bit 6 Reading or verifying
00 = Drive 0
01 = Drive 1
10 = Reserved
11 = Reserved
Bits 32 Reserved
Bit 1 If 1 = Drive 1 motor on
Bit 0 If 1 = Drive 0 motor on

0:440h

Disk motor timeout count

0:441h

Disk status code:


Bit 71 = Drive not ready
Bit 61 = Seek error
Bit 5 Disk controller failed
Bits 40 Error codes
01h = Illegal function
02h = Address mark not found
03h = Write protect error
04h = Sector not found
06h = Change line active
08h = DMA overrun
09h = Data boundary error
0Ch = Media type not found
10h = Uncorrectable error
20h = General controller error
40h = Seek failed
80h = Timeout

0:442h

Disk controller status bytes

0:449h

Video mode

0:44Ah

Number of screen columns

0:44Ch

Page size in bytes

0:44Eh

Page address

0:450h

16

Cursor position on video page


(2 bytes/page, 1st byte = column/2nd = row)

0:460h

Cursor size (start/end scan line)

0:462h

Current display page

0:463h

I/O port for current video mode


(Mono = 3B4h/Color = 3D4h)

0:465h

Current mode select register


Continued

699

3510-2 appA.f.qc

700

7/28/00

13:53

Page 700

Appendixes

Table A-3 (continued)


Address

Size

Contents

0:466h

Current video palette

0:467h

Option ROM address offset (used by POST and XT)

0:469h

Option ROM address segment

0:46Bh

Last interrupt

0:46Ch

Timer count least significant

0:46Eh

Timer count most significant

0:470h

24-hour RTC rollover

0:471h

Control-Break flag

0:472h

RESET flag:
1234h = Bypass memory test
4321h = Preserve memory
64h = Special mode

0:474h

Last fixed-disk status:


00h = No error
01h = Invalid function request
02h = Address mark not found
04h = Sector not found
05h = Reset failed
07h = Parameter activity failed
08h = DMA overrun
09h = Data boundary error
0Ah = Bad sector flag detected
0Bh = Bad track detected
0Dh = Invalid no. sectors
0Eh = Control data address mark
0Fh = DMA arbitrate out of range
10h = Uncorrectable data error
11h = Corrected data error
20h = General controller failure
40h = Seek failed
80h = Timeout
AAh = Drive not ready
BBh = Undefined error
CCh = Write fault on drive
E0h = Status error
FFh = Sense operation failed

0:475h

Number of fixed disk drives

0:476h

Fixed disk control byte

0:477h

Fixed disk port offset

3510-2 appA.f.qc

7/28/00

13:53

Page 701

Appendix A Memory Maps and BIOS Data Areas

Address

Size

Contents

0:478h

Parallel port timeout table

0:47Ch

Serial port timeout table

0:480h

Offset to start of keyboard buffer

0:482h

Offset to end of keyboard buffer

0:48Bh

Disk data transfer rate:


Bits 76 = Last rate set by controller
00 = 500 kbs
01 = 300 kbs
10 = 250 kbs
11 = Reserved
Bits 54 = Last drive step rate
Bits 32 = Data transfer rate at start
00 = 500 kbs
01 = 300 kbs
10 = 250 kbs
Bits 10 = Reserved

0:48Ch

Fixed disk status register (duplicate)

0:48Dh

Fixed disk error register (duplicate)

0:48Eh

Fixed disk interrupt flag

0:48Fh

Disk controller information:


Bit 7 = Reserved
Bit 6 = Drive 1 determined
Bit 5 = Drive 1 is multi-rate
Bit 4 = Drive 1 has change line
Bit 3 = Reserved
Bit 2 = Drive 0 determined
Bit 1 = Drive 0 is multi-rate
Bit 0 = Drive 0 has change line

0:490h

Drive 0 media type:


Bits 76 = Transfer rate
00 = 500 kbs
01 = 300 kbs
10 = 250 kbs
Bit 5 = Double step required
Bit 4 = Known media in drive
Bit 3 = Reserved
Bits 20 = Media/drive
111 = OK 720K in 720K drive or OK 1.44 in 1.44MB drive
101 = OK 1.2 in 1.2MB drive
100 = OK 360K in 360K drive
011 = 360K in 1.2MB drive
Continued

701

3510-2 appA.f.qc

702

7/28/00

13:53

Page 702

Appendixes

Table A-3 (continued)


Address

Size

0:490h
(continued)

Contents
010 = Try 1.2 in 1.2MB drive
001 = Try 360K in 1.2MB drive
000 = Try 360K in 360K drive

0:491h

Drive 1 media type:


Bits 76 = Transfer rate
00 = 500 kbs
01 = 300 kbs
10 = 250 kbs
Bit 5 = Double step required
Bit 4 = Known media in drive
Bit 3 = Reserved
Bits 20 = Media/drive
111 = OK 720K in 720K drive or OK 1.44 in
1.44MB drive
101 = OK 1.2 in 1.2MB drive
100 = OK 360K in 360K drive
011 = 360K in 1.2 drive
010 = Try 1.2 in 1.2 drive
001 = Try 360K in 1.2 drive
000 = Try 360K in 360K drive

0:492h

Disk work area

0:494h

Current track for drive 0

0:495h

Current track for drive 1

0:496h

Keyboard status:
Bit 7 = Read ID in progress
Bit 6 = Last code was first ID
Bit 5 = Forced Num Lock
Bit 4 = Enhanced keyboard
Bit 3 = Right Alt pressed
Bit 2 = Right Ctrl pressed
Bit 1 = Last code was E0h
Bit 0 = Last code was E1h

0:497h

Status byte:
Bit 7= Error flag for keyboard command
Bit 6 = LED update
Bit 5 = RESEND received from keyboard
Bit 4 = ACK received from keyboard
Bit 3 = Reserved
Bit 2 = Caps Lock LED On
Bit 1 = Num Lock LED On
Bit 0 = Scroll Lock LED On

3510-2 appA.f.qc

7/28/00

13:53

Page 703

Appendix A Memory Maps and BIOS Data Areas

Address

Size

Contents

0:498h

User wait flag offset address

0:49Ah

User wait flag segment address

0:49Ch

Wait count (low word)

0:49Eh

Wait count (high word)

0:4A0h

Wait active flag:


Bit 7 = Wait time elapsed
Bits 61 = Reserved
Bit 0 = INT 15h, AH = 86h

0:4B0h

Reserved

As shown in Tables A-4 and A-5, the memory above the standard 640K program
memory in the first megabyte of a PCs memory is used to provide access to the
video memory and to provide access to places to store and run adapter ROMs, as
well as to provide access to the ROM BIOS, which provides the PC with its basic
connections to the outside world.

Table A-4
PC High Memory Area Map
Address

Size

Contents

A:0000B:FFFFh

128K

Video buffer RAM

A:0000A:FFFFh

64K

Poss. extra DOS RAM (with MDA/CGA only)

A:0000B:FFFFh

128K

EGA/VGA video buffer

B:0000B:7FFFh

32K

MDA video buffer

B:8000B:FFFFh

32K

CGA video buffer

C:0000E:FFFFh

192K

Adapter ROM/EMS page; Upper Memory Block

C:0000C:3FFFh

16k

EGA video BIOS

C:6000C:63FFh

1K

PGA area

C:8000C:BFFFh

16K

Hard disk BIOS (XT or non-IBM)

D:0000D:FFFFh

64K

EMS page frame

D:0000D:7FFFh

32K

Cluster adapter

E:0000E:FFFFh

64K

ROM expanded/EMS page

703

3510-2 appA.f.qc

704

7/28/00

13:53

Page 704

Appendixes

The address range from E:0000FFFF provides for many options, adapters, and
application program use, depending on the chips used, installed devices, manufacturer, and other variables.
Note

The Lotus/Intel/Microsoft Expanded Memory Specification (LIM-EMS) provides for


up to 32MB of paged-RAM use through the EMS Page Frame.

Table A-5
BIOS and Extended Memory Area
Address

Size

Contents

F:0000F:FFFFh

64K

ROM BIOS (Boot, POST); also ROM


BASIC (IBM), AMI (also includes
diagnostics and CMOS SETUP here)

10:0000up

Extended Memory:
14.9MB 80286
30.9MB 80386,80486

10:000010:FFFFh

64K

Microsoft XMS/HMA using


HIMEM.SYS, QEMM, or other drivers

10:0000FD:FFFFh

14.9MB

Extended memoryl

FE:0000FF:FFFFh

128K

AT ROM BIOS includes ROM BASIC


(IBM only)

S-ar putea să vă placă și