📄 appendix-bios_memory_2.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0065)http://www.huihoo.com/gnu_linux/own_os/appendix-bios_memory_2.htm -->
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<P><SPAN lang=EN-US><FONT face="Times New Roman" size=6><SPAN
style="mso-tab-count: 1"><STRONG>A.2 BIOS
Memory</STRONG></SPAN></FONT></SPAN></P><SPAN lang=EN-US><FONT
face="Times New Roman" size=5><SPAN style="mso-tab-count: 1">
<P>
<P tppabs="http://pagoda-ooos.51.net/os_book/appendix.htm"
HREF="appendix.htm"><FONT size=3>[</FONT><A
href="index.htm"
tppabs="http://pagoda-ooos.51.net/os_book/index.htm"><FONT
size=3>Home</FONT></A><FONT size=3>] [</FONT><A
href="appendix.htm"
tppabs="http://pagoda-ooos.51.net/os_book/appendix.htm"><FONT
size=3>Top</FONT></A><FONT size=3>] [</FONT><FONT size=3><A
href="appendix-bios_interrupt_1.htm"
tppabs="http://pagoda-ooos.51.net/os_book/appendix/appendix-bios_interrupt_1.htm">Previous</A></FONT><FONT
size=3>] [</FONT><A
href="appendix-int19_3.htm"
tppabs="http://pagoda-ooos.51.net/os_book/appendix/appendix-int19_3.htm"><FONT
size=3>Next</FONT></A><FONT size=3>]</FONT></P>
<P><STRONG>
<HR width="100%" SIZE=2>
</STRONG></SPAN></FONT></SPAN>
<P>
<P><PRE><FONT face=宋体>[This file was originally provided by Robin Walker. --Ralf]
Last Update: 1/15/95
Format of BIOS Data Segment at segment 40h:
{items in curly braces not documented by IBM}
Offset Size Description
00h WORD Base I/O address of 1st serial I/O port, zero if none
02h WORD Base I/O address of 2nd serial I/O port, zero if none
04h WORD Base I/O address of 3rd serial I/O port, zero if none
06h WORD Base I/O address of 4th serial I/O port, zero if none
Note: Above fields filled in turn by POST as it finds serial
ports. POST never leaves gaps. DOS and BIOS serial device
numbers may be redefined by re-assigning these fields.
08h WORD Base I/O address of 1st parallel I/O port, zero if none
0Ah WORD Base I/O address of 2nd parallel I/O port, zero if none
0Ch WORD Base I/O address of 3rd parallel I/O port, zero if none
0Eh WORD [non-PS] Base I/O address of 4th parallel port, zero if none
[PS] {Segment of Extended BIOS Data Segment}
Note: Above fields filled in turn by POST as it finds
parallel ports. POST never leaves gaps. DOS and BIOS
parallel device numbers may de redefined by re-assigning
these fields.
10h WORD Installed hardware:
bits 15-14: number of parallel devices
bit 13: [Conv, PS/2-55LS] Internal modem
bit 12: reserved
bits 11- 9: number of serial devices
bit 8: reserved
bits 7- 6: number of diskette drives minus one
bits 5- 4: Initial video mode:
00b = EGA,VGA,PGA
01b = 40 x 25 color
10b = 80 x 25 color
11b = 80 x 25 mono
bit 3: reserved
bit 2: [PS] =1 if pointing device
[non-PS] reserved
bit 1: =1 if math co-processor
bit 0: =1 if diskette available for boot
12h BYTE [Conv] POST status
[AT] {Manufacturing test initialisation flags}
bit 0: Manufacturing test mode rather than normal operation
bits 1-7 unused
[MCA] Manufacturing test
bit 7: POST flag, ???
bits 6-5 unused
bit 4: POST flag, slot 4 has adapter identifier EDAFh
bit 3: POST flag, 80x25 color video
bit 2: POST flag, ???
bit 1: unused
bit 0: manufacturing test mode rather than normal operation
[PS/2-25] POST system flag
bit 0: optional memory failed; memory remapped
bit 1: real-time clock installed
13h WORD Base memory size in KBytes (0-640)
15h WORD [PC,XT] adapater memory size in KBytes
15h BYTE [AT] {Manufacturing test scratch pad}
[Compaq Deskpro 386] previous scan code
16h BYTE [AT] {Manufacturing test scratch pad}
[PS/2 Mod 30] {BIOS control flags}
[Compaq Deskpro 386] keyclick loudness (00h-7Fh)
17h BYTE Keyboard status flags 1:
bit 7 =1 INSert active
bit 6 =1 Caps Lock active
bit 5 =1 Num Lock active
bit 4 =1 Scroll Lock active
bit 3 =1 either Alt pressed
bit 2 =1 either Ctrl pressed
bit 1 =1 Left Shift pressed
bit 0 =1 Right Shift pressed
18h BYTE Keyboard status flags 2:
bit 7 =1 INSert pressed
bit 6 =1 Caps Lock pressed
bit 5 =1 Num Lock pressed
bit 4 =1 Scroll Lock pressed
bit 3 =1 Pause state active
bit 2 =1 Sys Req pressed
bit 1 =1 Left Alt pressed
bit 0 =1 Left Ctrl pressed
19h BYTE Keyboard: Alt-nnn keypad workspace
1Ah WORD Keyboard: pointer to next character in keyboard buffer
1Ch WORD Keyboard: pointer to first free slot in keyboard buffer
1Eh 16 WORDs Keyboard circular buffer (but see 80h, 82h for override)
3Eh BYTE Diskette recalibrate status:
bit 7 =1 Diskette hardware interrupt occurred
bits 6-4 reserved
bit 3 =1 Recalibrate diskette 3 (PC,XT only)
bit 2 =1 Recalibrate diskette 2 (PC,XT only)
bit 1 =1 Recalibrate diskette 1
bit 0 =1 Recalibrate diskette 0
3Fh BYTE Diskette motor status:
bit 7 =1 current operation is write or format
=0 current operation is read or verify
bit 6 reserved
(DMA enabled on 82077)
bits 5-4 diskette drive number selected (0-3)
bit 3 =1 diskette 3 motor on (PC,XT only)
bit 2 =1 diskette 2 motor on (PC,XT only)
bit 1 =1 diskette 1 motor on
bit 0 =1 diskette 0 motor on
40h BYTE Diskette motor turn-off time-out count
41h BYTE Diskette last operation status (0 = OK)
bit 7 =1 drive not ready
bit 6 =1 seek error
bit 5 =1 general controller failure
bits 4-0:
00h no error
01h invalid request/parameter
02h address mark not found
03h write-protect error
04h sector not found
06h diskette change line active
08h DMA overrun
09h DMA across 64k boundary
0Ch media type unknown
10h CRC error on read
Note: the following values for this byte differ somewhat
from the bitfield definition above:
30h drive does not support media sense
31h no media in drive
32h drive does not support media type
AAh diskette drive not ready
42h 7 BYTEs Diskette/Fixed disk status/command bytes
42h BYTE XT: command byte to hard disk controller
AT: write precompensation cylinder number / 4
43h BYTE XT: bit 5 = drive number, bits 3-0=head number
AT: sector count
44h BYTE XT: bits 6,7 = high bits of track, bits 5-0 = start sector-1
AT: starting sector
45h BYTE low byte of track number
46h BYTE XT: sector count
AT: high bits of track number
47h BYTE XT: controlbyte from HD parameters (step rate,...)
AT: 101DHHHH, D=drive number, HHHH=head number
48h BYTE XT: INT 13h subfunction number
AT: comand byte to hard disk controller
42h BYTE disk controller status register 0
bits 7-6: interrupt code
00 normal completion
01 abnormal termination during execution
10 invalid command
11 abnormal termination: ready line on/diskette change
bit 5: requested seek complete
bit 4: drive fault
bit 3: drive not ready
bit 2: head state at time of interrupt
bits 1-0: selected drive (drives 2&3 on PC,XT only)
43h BYTE diskette controller status register 1
bit 7: attempted access beyon last cylinder
bit 6: unused
bit 5: CRC error on read
bit 4: DMA overrun
bit 3: unused
bit 2: data error
bit 1: disk write protected
bit 0: missing address mark
44h BYTE diskette controller status register 2
bit 7: unused
bit 6: found deleted data address mark
bit 5: CRC error in data field
bit 4: wrong cylinder number read
bit 3: verify equal
bit 2: can't find sector matching verify condition
bit 1: bad cylinder
bit 0: unable to find address mark
49h BYTE Video current mode
4Ah WORD Video columns on screen
4Ch WORD Video page (regen buffer) size in bytes
4Eh WORD Video current page start address in regen buffer
50h 16 BYTEs Video cursor position (col, row) for eight pages, 0 based
60h WORD Video cursor type, 6845 compatible, hi=startline, lo=endline
62h BYTE Video current page number
63h WORD Video CRT controller base address: color=03D4h, mono=03B4h
65h BYTE Video current setting of mode select register 03D8h/03B8h
bits 7-6 unused
bit 5: attribute bit 7 controls blinking instead of background
bit 4: mode 6 graphics in monochrome
bit 3: video signal enabled
bit 2: monochrome
bit 1: graphics
bit 0: 80x25 text
66h BYTE Video current setting of CGA palette register 03D9h
bits 7-6 unused
bit 5: palette (0/1)
bit 4: intense background colors in text mode
bit 3: intense border color (40x25) / background color (mode 5)
bit 2: red
bit 1: green
bit 0: blue
67h WORD [PC only] cassette time count
67h DWORD {POST real mode re-entry point after certain resets}
[PS except Mod 25,30] pointer to reset code upon system reset
with memory preserved (see offset 72h)
69h WORD [PC only] cassette CRC register
[V20-XT-BIOS] key repeat
bit 7: key repeat disabled
bit 6: Ctrl-Alt pressed instead of just Alt
6Bh BYTE [PC only] last value read from cassette
[XT+] POST last unexpected interrupt
bit 0 = IRQ0 to bit 7 = IRQ7
6Ch DWORD Timer ticks since midnight
70h BYTE Timer overflow, non-zero if has counted past midnight
71h BYTE Ctrl-Break flag: bit 7=1
72h WORD POST reset flag:
1234h to bypass memory test (warm boot)
4321h [PS/2 except Mod 25,30] to preserve memory
5678h [Conv] system suspended
9ABCh [Conv] manufacturing test mode
ABCDh [Conv] POST loop mode
0064h Burn-in mode
74h BYTE Fixed disk last operation status, except ESDI drives:
00h no error
01h invalid function request
02h address mark not found
03h write protect error
04h sector not found
05h reset failed
06h diskette removed
07h drive parameter activity failed
08h DMA overrun
09h DMA data boundary error
0Ah bad sector flag detected
0Bh bad track detected
0Ch requested diskette media type not found
(PS/2 or extended BIOS only)
unsupported track
0Dh invalid number of sectors for Format
0Eh control data address mark detected
0Fh DMA arbitration level out of range
10h uncorrectable ECC or CRC error
11h ECC corrected data error
20h general controller failed
40h seek failed
80h time out
AAh drive not ready
BBh undefined error
CCh write fault on selected drive
E0h status error/error register is zero
FFh sense failed
74h BYTE [WD1002-27X SuperBIOS] total drives, first controller only
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -