Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:hardware:informations:bios_data_area

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
back2root:ibm-pc-ms-dos:hardware:informations:bios_data_area [2023/01/16 17:54] – supprimée - modification externe (Unknown date) 127.0.0.1back2root:ibm-pc-ms-dos:hardware:informations:bios_data_area [2024/04/07 11:00] (Version actuelle) – ↷ Liens modifiés en raison d'un déplacement. 47.128.26.228
Ligne 1: Ligne 1:
 +====== BDA - BIOS Data Area - PC Memory Map - WIP ======
  
 +===== The following map varies in size and locus =====
 +{{tablelayout?rowsHeaderSource=Auto&colwidth="95px"}}
 +| 07C0: |             | Boot code is loaded here at startup (31k mark)                                                |
 +| A000: |             | EGA/VGA RAM for graphics display mode 0Dh & above                                             |
 +| B000: |             | MDA RAM, Hercules graphics display RAM                                                        |
 +| B800: |             | CGA display RAM                                                                               |
 +| C000: |             | EGA/VGA BIOS ROM (thru C7FF)                                                                  |
 +| C400: |             | Video adapter ROM space                                                                       |
 +| C600: |  256 bytes  | PGA communication area                                                                        |
 +| C800: |  16K        | Hard disk adapter BIOS ROM                                                                    |
 +| C800: |             | XT Hard disk ROM format, AH=Drive, AL=Interleave                                              |
 +| D000: |  32K        | Cluster adapter BIOS ROM                                                                      |
 +| D800: |             | PCjr conventionalsoftware cartridge address                                                   |
 +| E000: |  64K        | Expansion ROM space (hardwired on AT+)                                                        |
 +|          128K       | PS/2 System ROM (thru F000)                                                                   |
 +| F000: |             | System monitor ROM                                                                            |
 +|                     | PCjr: software cartridge override address                                                     |
 +| F400: |             | System expansion ROMs                                                                         |
 +| F600: |             | IBM ROM BASIC (AT)                                                                            |
 +| F800: |             | PCjr software cartridge override address                                                      |
 +| FC00: |             | BIOS ROM                                                                                      |
 +| FF00: |             | System ROM                                                                                    |
 +| FFA6: |             | ROM graphics character table                                                                  |
 +| FFFF: |             | ROM bootstrap code                                                                            |
 +| FFFF: |  8 bytes    | ROM date (not applicable for all clones)                                                      |
 +| FFFF: |  byte       | ROM machine id (see [[back2root:ibm-pc-ms-dos:hardware:informations:machine-id|MACHINE ID]])  |
 +
 +
 +===== Bios Memory Maps =====
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  Address              ^  Size        ^ Description                                                                                                                                                                             ^
 +| 00:00                  256 dwords  | Interrupt vector table                                                                                                                                                                  |
 +| 30:00                  256 bytes   | Stack area used during post and bootstrap                                                                                                                                               |
 +| 40:00                  word        | COM1 port address                                                                                                                                                                       |
 +| 40:02                  word        | COM2 port address                                                                                                                                                                       |
 +| 40:04                  word        | COM3 port address                                                                                                                                                                       |
 +| 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 (except PS/2)\\ Extended BIOS Data Area segment (PS/2, see [[back2root:ibm-pc-ms-dos:hardware:informations:edba|EBDA]])                                               |
 +| **Equipement**                                                                                                                                                                                                               |||
 +| 40:10                  2 bytes     | Equipment list flags (see [[back2root:ibm-pc-ms-dos:interrupts:int_11:start|INT 11]] - [[#m_40_10|below]])                                                                                    |
 +| 40:12                  byte        | PCjr: infrared keyboard link error count                                                                                                                                                |
 +| 40:13                  word        | Memory size in Kbytes  (see [[back2root:ibm-pc-ms-dos:interrupts:int_12:start|INT 12]])                                                                                                       |
 +| 40:15                  byte        | Reserved                                                                                                                                                                                |
 +| 40:16                  byte        | PS/2 BIOS control flags                                                                                                                                                                 |
 +| **Keyboard**                                                                                                                                                                                                                 |||
 +| 40:17                  byte        | Keyboard flag byte 0 (see [[back2root:ibm-pc-ms-dos:hardware:informations:kb_flags|KB FLAGS]] - [[#m_40_17|below]])                                                                     |
 +| 40:18                  byte        | Keyboard flag byte 1 (see [[back2root:ibm-pc-ms-dos:hardware:informations:kb_flags|KB FLAGS]] - [[#m_40_18|below]])                                                                     |
 +| 40:19                  byte        | Storage for alternate keypad entry                                                                                                                                                      |
 +| 40:1A                  word        | Offset from 40:00 to keyboard buffer head                                                                                                                                               |
 +| 40:1C                  word        | Offset from 40:00 to keyboard buffer tail                                                                                                                                               |
 +| 40:1E                  32 bytes    | Keyboard buffer (circular queue buffer)                                                                                                                                                 |
 +| **Drive & Diskette**                                                                                                                                                                                                         |||
 +| 40:3E                  byte        | Drive recalibration status (see [[#m_40_3e|below]])                                                                                                                                     |
 +| 40:3F                  byte        | Diskette motor status (see [[#m_40_3f|below]])                                                                                                                                          |
 +| 40:40                  byte        | Motor shutoff counter (decremented by [[back2root:ibm-pc-ms-dos:interrupts:int_08|INT 8]])                                                                                              |
 +| 40:41                  byte        | Status of last diskette operation (see [[back2root:ibm-pc-ms-dos:interrupts:int_13:int_13_01|INT 13,1]] - [[#m_40_41|below]])                                                                  |
 +| 40:42                  7 bytes     | NEC diskette controller status (see FDC)                                                                                                                                                |
 +| **Videos**                                                                                                                                                                                                                   |||
 +| 40:49                  byte        | Current video mode  (see [[back2root:ibm-pc-ms-dos:interrupts:int_10:int_10_00|VIDEO MODE]])                                                                                            |
 +| 40:4A                  word        | Number of screen columns                                                                                                                                                                |
 +| 40:4C                  word        | Size of current video regen buffer in bytes                                                                                                                                             |
 +| 40:4E                  word        | Offset of current video page in video regen buffer                                                                                                                                      |
 +| 40:50                  8 words     | Cursor position of pages 1-8, high order byte=row low order byte=column; changing this data isn't reflected immediately on the display                                                  |
 +| 40:60                  byte        | Cursor ending (bottom) scan line (don't modify)                                                                                                                                         |
 +| 40:61                  byte        | Cursor starting (top) scan line (don't modify)                                                                                                                                          |
 +| 40:62                  byte        | Active display page number                                                                                                                                                              |
 +| 40:63                  word        | Base port address for active [[back2root:ibm-pc-ms-dos:hardware:6845|6845]] CRT controller 3B4h = mono, 3D4h = color                                                                    |
 +| 40:65                  byte        | [[back2root:ibm-pc-ms-dos:hardware:6845|6845]] CRT mode control register value (port 3x8h)\\ EGA/VGA values emulate those of the MDA/CGA                                                |
 +| 40:66                  byte        | CGA current color palette mask setting (port 3d9h)\\ EGA and VGA values emulate the CGA                                                                                                 |
 +| **PS/2 - 286+**                                                                                                                                                                                                              |||
 +| 40:67                  dword       | CS:IP for 286 return from protected mode                                                                                                                                                |
 +|                        dword       | Temp storage for SS:SP during shutdown                                                                                                                                                  |
 +|                        dword       | Day counter on all products after AT                                                                                                                                                    |
 +|                        dword       | PS/2 Pointer to reset code with memory preserved                                                                                                                                        |
 +| **RTC**                                                                                                                                                                                                                      |||
 +|                        5 bytes     | Cassette tape control (before AT)                                                                                                                                                       |
 +| 40:6C                  dword       | Daily timer counter, equal to zero at midnight;\\ incremented by [[back2root:ibm-pc-ms-dos:interrupts:int_08|INT 8]]; read/set by [[back2root:ibm-pc-ms-dos:interrupts:int_1a:start|INT 1A]]  |
 +| 40:70                  byte        | Clock rollover flag, set when 40:6C exceeds 24hrs                                                                                                                                       |
 +| 40:71                  byte        | BIOS break flag, bit 7 is set if Ctrl-Break was *ever* hit; set by [[back2root:ibm-pc-ms-dos:interrupts:int_09:start|INT 9]]                                                                  |
 +| 40:72                  word        | Soft reset flag via Ctl-Alt-Del or JMP FFFF:0 (see [[#m_40_72|below]])                                                                                                                  |
 +| 40:74                  byte        | Status of last hard disk operation (see [[back2root:ibm-pc-ms-dos:interrupts:int_13_01|INT 13,1]])                                                                                      |
 +| 40:75                  byte        | Number of hard disks attached                                                                                                                                                           |
 +| 40:76                  byte        | XT fixed disk drive control byte                                                                                                                                                        |
 +| 40:77                  byte        | Port offset to current fixed disk adapter                                                                                                                                               |
 +| 40:78                  4 bytes     | Time-Out value for LPT1,LPT2,LPT3(,LPT4 except PS/2)                                                                                                                                    |
 +| 40:7C                  4 bytes     | Time-Out value for COM1,COM2,COM3,COM4                                                                                                                                                  |
 +| 40:80                  word        | Keyboard buffer start offset (seg=40h,BIOS 10-27-82)                                                                                                                                    |
 +| 40:82                  word        | Keyboard buffer end offset (seg=40h,BIOS 10-27-82)                                                                                                                                      |
 +| 40:84                  byte        | Rows on the screen (less 1, EGA+)                                                                                                                                                       |
 +| 40:85                  word        | Point height of character matrix (EGA+)                                                                                                                                                 |
 +|                        byte        | PCjr: character to be repeated if the typematic repeat key takes effect                                                                                                                 |
 +| 40:86                  byte        | PCjr: initial delay before repeat key action begins                                                                                                                                     |
 +| **EGA+**                                                                                                                                                                                                                     |||
 +| 40:87                  byte        | PCjr: current Fn function key number                                                                                                                                                    |
 +| :::                   | :::          | Video mode options (EGA+) (see [[#m_40_87|below]])                                                                                                                                      |
 +| 40:88                  byte        | PCjr: third keyboard status byte\\ EGA feature bit switches, emulated on VGA (see [[#m_40_88|below]])                                                                                   |
 +| 40:89                  byte        | Video display data area (MCGA and VGA) (see [[#m_40_89|below]])                                                                                                                         |
 +| 40:8A                  byte        | Display Combination Code (DCC) table index (EGA+)                                                                                                                                       |
 +| **Drives**                                                                                                                                                                                                                   |||
 +| 40:8B                  byte        | Last diskette data rate selected (see [[#m_40_8b|below]])                                                                                                                               |
 +| 40:8C                  byte        | Hard disk status returned by controller                                                                                                                                                 |
 +| 40:8D                  byte        | Hard disk error returned by controller                                                                                                                                                  |
 +| 40:8E                  byte        | Hard disk interrupt control flag(bit 7=working int)                                                                                                                                     |
 +| 40:8F                  byte        | Combination hard/floppy disk card when bit 0 set                                                                                                                                        |
 +| 40:90                  4 bytes     | Drive 0,1,2,3 media state (see [[#m_40_90|below]])                                                                                                                                      |
 +| 40:94                  byte        | Track currently seeked to on drive 0                                                                                                                                                    |
 +| 40:95                  byte        | Track currently seeked to on drive 1                                                                                                                                                    |
 +| **Keyboard**                                                                                                                                                                                                                 |||
 +| 40:96                  byte        | Keyboard mode/type (see [[#m_40_96|below]])                                                                                                                                             |
 +| 40:97                  byte        | Keyboard LED flags (see [[#m_40_97|below]])                                                                                                                                             |
 +| 40:98                  dword       | Pointer to user wait complete flag                                                                                                                                                      |
 +| 40:9C                  dword       | User wait Time-Out value in microseconds                                                                                                                                                |
 +| 40:A0                  byte        | RTC wait function flag (see [[#m_40_a0|below]])                                                                                                                                         |
 +| 40:A1                  byte        | LANA DMA channel flags                                                                                                                                                                  |
 +| 40:A2                  2 bytes     | Status of LANA 0,1                                                                                                                                                                      |
 +| 40:A4                  dword       | Saved hard disk interrupt vector                                                                                                                                                        |
 +| 40:A8                  dword       | BIOS Video Save/Override Pointer Table address (see [[back2root:ibm-pc-ms-dos:hardware:informations:video_bios_informations|VIDEO TABLES]])                                                  |
 +| 40:AC                  8 bytes     | 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        | NMI buffer head pointer (convertible)                                                                                                                                                   |
 +| 40:BC                  byte        | NMI buffer tail pointer (convertible)                                                                                                                                                   |
 +| 40:BD                  16bytes     | NMI scan code buffer (convertible)                                                                                                                                                      |
 +| 40:CE                  word        | Day counter (convertible and after)                                                                                                                                                     |
 +| 40:F0                  16bytes     | Intra-Applications Communications Area (IBM Technical Reference incorrectly locates this at 50:F0-50:FF)                                                                                |
 +| **Misc**                                                                                                                                                                                                                     |||
 +| 50:00                  byte        | Print screen status byte\\ 00 = PrtSc not active,\\ 01 = PrtSc in progress\\ FF = error                                                                                                 |
 +| 50:01                  3 bytes     | Used by BASIC                                                                                                                                                                           |
 +| 50:04                  byte        | DOS single diskette mode flag, 0=A:, 1=B:                                                                                                                                               |
 +| 50:05                  10bytes     | POST work area                                                                                                                                                                          |
 +| 50:0F                  byte        | BASIC shell flag; set to 2 if current shell                                                                                                                                             |
 +| 50:10                  word        | BASICs default DS value (DEF SEG)                                                                                                                                                       |
 +| 50:12                  dword       | Pointer to BASIC [[back2root:ibm-pc-ms-dos:interrupts:int_1c|INT 1C]] interrupt handler                                                                                                 |
 +| 50:16                  dword       | Pointer to BASIC [[back2root:ibm-pc-ms-dos:interrupts:int_23|INT 23]] interrupt handler                                                                                                 |
 +| 50:1A                  dword       | Pointer to BASIC [[back2root:ibm-pc-ms-dos:interrupts:int_24|INT 24]] disk error handler                                                                                                |
 +| 50:20                  word        | DOS dynamic storage                                                                                                                                                                     |
 +| 50:22                  14bytes     | DOS diskette initialization table ([[back2root:ibm-pc-ms-dos:interrupts:int_1e|INT 1E]])                                                                                                |
 +| 50:30                  4bytes      | MODE command                                                                                                                                                                            |
 +| 70:00                              | I/O drivers from IO.SYS/IBMBIO.COM                                                                                                                                                      |
 +==== 40:10 - INT 11 registers ====
 +{{anchor:m_40_10}}
 +
 +{{tablelayout?rowsHeaderSource=Auto&colwidth=",,"}}
 +^  bit  ^ 40:10 (value in INT 11 register AL)                                                      ^
 +|  0    | IPL diskette installed                                                                   |
 +|  1    | math coprocessor                                                                         |
 +|  2-3  | old PC system board RAM < 256K\\ PS/2 bit 2: pointing device installed; bit 3 :not used  |
 +|  4-5  | initial video mode                                                                       |
 +|  6-7  | # of diskette drives, less 1                                                             |
 +
 +==== 40:11 - INT 11 registers ====
 +^  bit  ^ 40:11  (value in INT 11 register AH)  ^
 +|  0    | 0 if DMA installed                    |
 +|  1-3  | number of serial ports                |
 +|  4    | game adapter                          |
 +|  5    | not used, internal modem (PS/2)       |
 +|  6-7  | number of printer ports               |
 +
 +
 +==== 40:17 - Keyboard flag 0 ====
 +{{anchor:m_40_17}}
 +{{tablelayout?rowsHeaderSource=Auto&colwidth=",,"}}
 +^  bit  ^ description                |      ^  bit  ^ description                    ^
 +|  0    | right shift key depressed  | :::  |  0    | left CTRL key depressed        |
 +|  1    | left shift key depressed   | :::  |  1    | left ALT key depressed         |
 +|  2    | CTRL key depressed         | :::  |  2    | system key depressed and held  |
 +|  3    | ALT key depressed          | :::  |  3    | suspend key has been toggled   |
 +|  4    | scroll-lock is active      | :::  |  4    | scroll lock key is depressed   |
 +|  5    | num-lock is active         | :::  |  5    | num-lock key is depressed      |
 +|  6    | caps-lock is active        | :::  |  6    | caps-lock key is depressed     |
 +|  7    | insert is active           | :::  |  7    | insert key is depressed        |
 +
 +==== 40:18 - Keyboard flag 1 ====
 +{{anchor:m_40_18}}
 +
 +^  bit  ^ description                    ^
 +|  0    | left CTRL key depressed        |
 +|  1    | left ALT key depressed         |
 +|  2    | system key depressed and held  |
 +|  3    | suspend key has been toggled   |
 +|  4    | scroll lock key is depressed   |
 +|  5    | num-lock key is depressed      |
 +|  6    | caps-lock key is depressed     |
 +|  7    | insert key is depressed        |
 +
 +===== Floppy/drive Information Table =====
 +
 +==== 40:3e - Drive Recalibration status ====
 +{{anchor:m_40_3e}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description               ^
 +|  0    | 1=recalibrate drive 0     |
 +|  1    | 1=recalibrate drive 1     |
 +|  2    | 1=recalibrate drive 2     |
 +|  3    | 1=recalibrate drive 3     |
 +|  4-6  | unused                    |
 +|  7    | 1=working interrupt flag  |
 +
 +==== 40:3f - Floppy motor status =====
 +{{anchor:m_40_3f}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description         ^
 +|  0    | 1=drive 0 motor on  |
 +|  1    | 1=drive 1 motor on  |
 +|  2    | 1=drive 2 motor on  |
 +|  3    | 1=drive 3 motor on  |
 +|  4-6  | unused              |
 +|  7    | 1=write operation   |
 +
 +==== 40:41 - status of last diskette operation ====
 +{{anchor:m_40_41}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description                      ^
 +|  0    | invalid diskette command         |
 +|  1    | diskette address mark not found  |
 +|  2    | sector not found                 |
 +|  3    | diskette DMA error               |
 +|  4    | CRC check / data error           |
 +|  5    | diskette controller failure      |
 +|  6    | seek to track failed             |
 +|  7    | diskette time-out                |
 +
 +===== Soft reset flag =====
 +
 +==== 40:72 - Soft reset flag ====
 +{{anchor:m_40_72}}
 +
 +^ value ^ description ^
 +| 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|
 +
 +===== Floppy disk controller =====
 +
 +==== 40:8B - Last diskette data rate selected ====
 +{{anchor:m_40_8b}}
 +^  bit  ^ description  ^
 +| 0-3 | reserved |
 +| 4-5 | last floppy drive step rate selected|
 +| 6-7 | last floppy data rate selected |
 +
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  Data  ^  Rate          ^  Step Rate            ^
 +| 00     | 500K bps  |  00  | step rate time of 0C  |
 +| 01     | 300K bps  |  01  | step rate time of 0D  |
 +| 10     | 250K bps  |  10  | step rate time of 0A  |
 +| 11     | reserved  |  11  | reserved              |
 +
 +==== 40:90 -  Drive 0,1,2,3 media state ====
 +{{anchor:m_40_90}}
 +^  bit  ^ description  ^
 +| 0-2 | drive/media state (see [[#media_state|below]])  |
 +| 3 | reserved |
 +| 4 | 1=media/drive established |
 +| 5 | double stepping required |
 +| 6-7 | data rate:\\   * 00=500K bps\\    * 01=300K bps\\   * 10=250K bps\\  * 11=reserved |
 +
 +{{anchor:media_state}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  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                           |
 +
 +===== Keyboard =====
 +
 +==== 40:96 - Keyboard mode/type ====
 +{{anchor:m_40_96}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description                          ^
 +|  0    | last code was the E1 hidden code     |
 +|  1    | last code was the E0 hidden code     |
 +|  2    | right CTRL key depressed             |
 +|  3    | right ALT key depressed              |
 +|  4    | 101/102 enhanced keyboard installed  |
 +|  5    | force num-lock if Rd ID & KBX        |
 +|  6    | last char was first ID char          |
 +|  7    | read ID in process                   |
 +
 +
 +==== 40:97 - Keyboard LED flags ====
 +{{anchor:m_40_97}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description                   ^
 +|  0    | scroll lock indicator         |
 +|  1    | um-lock indicator             |
 +|  2    | caps-lock indicator           |
 +|  3    | circus system indicator       |
 +|  4    | ACK received                  |
 +|  5    | re-send received flag         |
 +|  6    | mode indicator update         |
 +|  7    | keyboard transmit error flag  |
 +
 +
 +
 +===== Real Time Clock ====
 +
 +==== 40:A0 - RTC wait function flag ====
 +{{anchor:m_40_a0}}
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  bit  ^ description                    ^
 +|  0    | 1= wait pending                |
 +|  1-6  | not used                       |
 +|  7    | 1=[[back2root:ibm-pc-ms-dos:interrupts:int_15:int_15_86|INT 15,86]] wait time elapsed  |
 +
 +see  [[back2root:ibm-pc-ms-dos:interrupts:int_15:int_15_86|INT 15,86]]