{"id":688,"date":"2020-12-05T16:18:15","date_gmt":"2020-12-05T16:18:15","guid":{"rendered":"https:\/\/www.ecsdump.net\/?page_id=688"},"modified":"2020-12-05T16:18:15","modified_gmt":"2020-12-05T16:18:15","slug":"bda-bios-data-area-pc-memory-map","status":"publish","type":"page","link":"https:\/\/www.ecsdump.net\/?page_id=688","title":{"rendered":"BDA &#8211; BIOS Data Area &#8211; PC Memory Map"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\"><strong>                    Address Size       Description<\/strong>\n    00:00 256dwords Interrupt vector table\n    30:00 256bytes  Stack area used during post and bootstrap\n    40:00   word    COM1 port address\n    40:02   word    COM2 port address\n    40:04   word    COM3 port address\n    40:06   word    COM4 port address\n    40:08   word    LPT1 port address\n    40:0A   word    LPT2 port address\n    40:0C   word    LPT3 port address\n    40:0E   word    LPT4 port address (except PS\/2)\n            Extended BIOS Data Area segment (PS\/2, see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/ebda.html\">EBDA<\/a>)\n    40:10  2 bytes  Equipment list flags (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int11.html\">INT 11<\/a>)\n        |7|6|5|4|3|2|1|0| 40:10 (value in INT 11 register AL)\n         | | | | | | | `- IPL diskette installed\n         | | | | | | `-- math coprocessor\n         | | | | |-+--- old PC system board RAM &lt; 256K\n         | | | | | `-- pointing device installed (PS\/2)\n         | | | | `--- not used on PS\/2\n         | | `------ initial video mode\n         `--------- # of diskette drives, less 1\n        |7|6|5|4|3|2|1|0| 40:11  (value in INT 11 register AH)\n         | | | | | | | `- 0 if DMA installed\n         | | | | `------ number of serial ports\n         | | | `------- game adapter\n         | | `-------- not used, internal modem (PS\/2)\n         `----------- number of printer ports\n    40:12   byte    PCjr: infrared keyboard link error count\n    40:13   word    Memory size in Kbytes  (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int12.html\">INT 12<\/a>)\n    40:15   byte    Reserved\n    40:16   byte    PS\/2 BIOS control flags\n    40:17   byte    Keyboard flag byte 0 (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/kbflags.html\">KB FLAGS<\/a>)\n        |7|6|5|4|3|2|1|0| keyboard flag byte 0\n         | | | | | | | `--- right shift key depressed\n         | | | | | | `---- left shift key depressed\n         | | | | | `----- CTRL key depressed\n         | | | | `------ ALT key depressed\n         | | | `------- scroll-lock is active\n         | | `-------- num-lock is active\n         | `--------- caps-lock is active\n         `---------- insert is active\n    40:18   byte    Keyboard flag byte 1 (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/kbflags.html\">KB FLAGS<\/a>)\n        |7|6|5|4|3|2|1|0| keyboard flag byte\n         | | | | | | | `--- left CTRL key depressed\n         | | | | | | `---- left ALT key depressed\n         | | | | | `----- system key depressed and held\n         | | | | `------ suspend key has been toggled\n         | | | `------- scroll lock key is depressed\n         | | `-------- num-lock key is depressed\n         | `--------- caps-lock key is depressed\n         `---------- insert key is depressed\n    40:19   byte    Storage for alternate keypad entry\n    40:1A   word    Offset from 40:00 to keyboard buffer head\n    40:1C   word    Offset from 40:00 to keyboard buffer tail\n    40:1E  32bytes  Keyboard buffer (circular queue buffer)\n    40:3E   byte    Drive recalibration status\n        |7|6|5|4|3|2|1|0| drive recalibration status\n         | | | | | | | `-- 1=recalibrate drive 0\n         | | | | | | `--- 1=recalibrate drive 1\n         | | | | | `---- 1=recalibrate drive 2\n         | | | | `----- 1=recalibrate drive 3\n         | `---------- unused\n         `----------- 1=working interrupt flag\n    40:3F   byte    Diskette motor status\n        |7|6|5|4|3|2|1|0| diskette motor status\n         | | | | | | | `-- 1=drive 0 motor on\n         | | | | | | `--- 1=drive 1 motor on\n         | | | | | `---- 1=drive 2 motor on\n         | | | | `----- 1=drive 3 motor on\n         | `---------- unused\n         `----------- 1=write operation\n    40:40   byte    Motor shutoff counter (decremented by <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int8.html\">INT 8<\/a>)\n    40:41   byte    Status of last diskette operation (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int13-1.html\">INT 13,1<\/a>)\n        |7|6|5|4|3|2|1|0| status of last diskette operation\n         | | | | | | | `--- invalid diskette command\n         | | | | | | `---- diskette address mark not found\n         | | | | | `----- sector not found\n         | | | | `------ diskette DMA error\n         | | | `------- CRC check \/ data error\n         | | `-------- diskette controller failure\n         | `--------- seek to track failed\n         `---------- diskette time-out\n    40:42  7 bytes  NEC diskette controller status (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/765.html\">FDC<\/a>)\n    40:49   byte    Current video mode  (see VIDEO MODE)\n    40:4A   word    Number of screen columns\n    40:4C   word    Size of current video regen buffer in bytes\n    40:4E   word    Offset of current video page in video regen buffer\n    40:50  8 words  Cursor position of pages 1-8, high order byte=row\n            low order byte=column; changing this data isn't\n            reflected immediately on the display\n    40:60   byte    Cursor ending (bottom) scan line (don't modify)\n    40:61   byte    Cursor starting (top) scan line (don't modify)\n    40:62   byte    Active display page number\n    40:63   word    Base port address for active <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/6845.html\">6845<\/a> CRT controller\n            3B4h = mono, 3D4h = color\n    40:65   byte    6845 CRT mode control register value (port 3x8h)\n            EGA\/VGA values emulate those of the MDA\/CGA\n    40:66   byte    CGA current color palette mask setting (port 3d9h)\n            EGA and VGA values emulate the CGA\n    40:67   dword   CS:IP for 286 return from protected mode\n        dword   Temp storage for SS:SP during shutdown\n        dword   Day counter on all products after AT\n        dword   PS\/2 Pointer to reset code with memory preserved\n        5 bytes Cassette tape control (before AT)\n    40:6C   dword   Daily timer counter, equal to zero at midnight;\n            incremented by INT 8; read\/set by <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int1a.html\">INT 1A<\/a>\n    40:70   byte    Clock rollover flag, set when 40:6C exceeds 24hrs\n    40:71   byte    BIOS break flag, bit 7 is set if <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int1b.html\">Ctrl-Break<\/a> was\n            *ever* hit; set by <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int9.html\">INT 9<\/a>\n    40:72   word    Soft reset flag via Ctl-Alt-Del or JMP FFFF:0\n            1234h  Bypass memory tests &amp; CRT initialization\n            4321h  Preserve memory\n            5678h  System suspend\n            9ABCh  Manufacturer test\n            ABCDh  Convertible POST loop\n            ????h  many other values are used during POST\n    40:74   byte    Status of last hard disk operation (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int13-1.html\">INT 13,1<\/a>)\n    40:75   byte    Number of hard disks attached\n    40:76   byte    XT fixed disk drive control byte\n    40:77   byte    Port offset to current fixed disk adapter\n    40:78  4 bytes  Time-Out value for LPT1,LPT2,LPT3(,LPT4 except PS\/2)\n    40:7C  4 bytes  Time-Out value for COM1,COM2,COM3,COM4\n    40:80   word    Keyboard buffer start offset (seg=40h,BIOS 10-27-82)\n    40:82   word    Keyboard buffer end offset (seg=40h,BIOS 10-27-82)\n    40:84   byte    Rows on the screen (less 1, EGA+)\n    40:85   word    Point height of character matrix (EGA+)\n        byte    PCjr: character to be repeated if the typematic\n            repeat key takes effect\n    40:86   byte    PCjr: initial delay before repeat key action begins\n    40:87   byte    PCjr: current Fn function key number\n        byte    Video mode options (EGA+)\n        |7|6|5|4|3|2|1|0| Video mode options (EGA+)\n         | | | | | | | `-- 1=alphanumeric cursor emulation enabled\n         | | | | | | `--- 1=video subsystem attached to monochrome\n         | | | | | `---- reserved\n         | | | | `----- 1=video subsystem is inactive\n         | | | `------ reserved\n         | `--------- video RAM  00-64K  10-192K  01-128K  11-256K\n         `---------- video mode number passed to <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int10.html\">INT 10<\/a>, function 0\n    40:88   byte    PCjr: third keyboard status byte\n            EGA feature bit switches, emulated on VGA\n        |7|6|5|4|3|2|1|0| EGA feature bit switches (EGA+)\n         | | | | | | | `-- EGA SW1 config (1=off)\n         | | | | | | `--- EGA SW2 config (1=off)\n         | | | | | `---- EGA SW3 config (1=off)\n         | | | | `----- EGA SW4 config (1=off)\n         | | | `------ Input FEAT0 (ISR0 bit 5) after output on FCR0\n         | | `------- Input FEAT0 (ISR0 bit 6) after output on FCR0\n         | `-------- Input FEAT1 (ISR0 bit 5) after output on FCR1\n         `--------- Input FEAT1 (ISR0 bit 6) after output on FCR1\n    40:89   byte    Video display data area (MCGA and VGA)\n        |7|6|5|4|3|2|1|0| Video display data area (MCGA and VGA)\n         | | | | | | | `-- 1=VGA is active\n         | | | | | | `--- 1=gray scale is enabled\n         | | | | | `---- 1=using monochrome monitor\n         | | | | `----- 1=default palette loading is disabled\n         | | | `------ see table below\n         | | `------- reserved\n         | `--------  1=display switching enabled\n         `--------- alphanumeric scan lines (see table below)\n<strong>       Bit7    Bit4  Scan Lines<\/strong>\n        0   0   350 line mode\n        0   1   400 line mode\n        1   0   200 line mode\n        1   1   reserved\n    40:8A   byte    Display Combination Code (DCC) table index (EGA+)\n    40:8B   byte    Last diskette data rate selected\n        |7|6|5|4|3|2|1|0| last diskette data rate selected\n         | | | | `--------- reserved\n         | | `------------ last floppy drive step rate selected\n         `-------------- last floppy data rate selected\n<strong>     Data Rate           Step Rate<\/strong>\n        00  500K bps        00  step rate time of 0C\n        01  300K bps        01  step rate time of 0D\n        10  250K bps        10  step rate time of 0A\n        11  reserved        11  reserved\n    40:8C   byte    Hard disk status returned by controller\n    40:8D   byte    Hard disk error returned by controller\n    40:8E   byte    Hard disk interrupt control flag(bit 7=working int)\n    40:8F   byte    Combination hard\/floppy disk card when bit 0 set\n    40:90  4 bytes  Drive 0,1,2,3 media state\n        |7|6|5|4|3|2|1|0| drive media state (4 copies)\n         | | | | | `------- drive\/media state (see below)\n         | | | | `------- reserved\n         | | | `------- 1=media\/drive established\n         | | `------- double stepping required\n         `--------- data rate:  00=500K bps    01=300K bps\n                    10=250K bps    11=reserved\n<strong>     Bits<\/strong>\n<strong>     210  Drive Media State<\/strong>\n        000  360Kb diskette\/360Kb drive not established\n        001  360Kb diskette\/1.2Mb drive not established\n        010  1.2Mb diskette\/1.2Mb drive not established\n        011  360Kb diskette\/360Kb drive established\n        100  360Kb diskette\/1.2Mb drive established\n        101  1.2Mb diskette\/1.2Mb drive established\n        110  Reserved\n        111  None of the above\n    40:94   byte    Track currently seeked to on drive 0\n    40:95   byte    Track currently seeked to on drive 1\n    40:96   byte    Keyboard mode\/type\n        |7|6|5|4|3|2|1|0| Keyboard mode\/type\n         | | | | | | | `--- last code was the E1 hidden code\n         | | | | | | `---- last code was the E0 hidden code\n         | | | | | `----- right CTRL key depressed\n         | | | | `------ right ALT key depressed\n         | | | `------- 101\/102 enhanced keyboard installed\n         | | `-------- force num-lock if Rd ID &amp; KBX\n         | `--------- last char was first ID char\n         `---------- read ID in process\n    40:97   byte    Keyboard LED flags\n        |7|6|5|4|3|2|1|0| Keyboard LED flags\n         | | | | | | | `--- scroll lock indicator\n         | | | | | | `---- num-lock indicator\n         | | | | | `----- caps-lock indicator\n         | | | | `------ circus system indicator\n         | | | `------- ACK received\n         | | `-------- re-send received flag\n         | `--------- mode indicator update\n         `---------- keyboard transmit error flag\n    40:98   dword   Pointer to user wait complete flag\n    40:9C   dword   User wait Time-Out value in microseconds\n    40:A0   byte    RTC wait function flag\n        |7|6|5|4|3|2|1|0| <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int15-86.html\">INT 15,86<\/a> RTC wait function flag\n         | | | | | | | `--- 1= wait pending\n         | `-------------- not used\n         `--------------- 1=INT 15,86 wait time elapsed\n    40:A1   byte    LANA DMA channel flags\n    40:A2  2 bytes  Status of LANA 0,1\n    40:A4   dword   Saved hard disk interrupt vector\n    40:A8   dword   BIOS Video Save\/Override Pointer Table address\n            (see <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/videoinformation.html\">VIDEO TABLES<\/a>)\n    40:AC  8 bytes  Reserved\n    40:B4   byte    Keyboard NMI control flags (convertible)\n    40:B5   dword   Keyboard break pending flags (convertible)\n    40:B9   byte    Port 60 single byte queue (convertible)\n    40:BA   byte    Scan code of last key (convertible)\n    40:BB   byte    NMI buffer head pointer (convertible)\n    40:BC   byte    NMI buffer tail pointer (convertible)\n    40:BD  16bytes  NMI scan code buffer (convertible)\n    40:CE   word    Day counter (convertible and after)\n    40:F0  16bytes  Intra-Applications Communications Area (IBM Technical\n            Reference incorrectly locates this at 50:F0-50:FF)\n<strong> Address Size       Description   (BIOS\/<a href=\"https:\/\/en.wikipedia.org\/wiki\/Disk_operating_system\" data-internallinksmanager029f6b8e52c=\"2\" title=\"DOS\" target=\"_blank\" rel=\"noopener\">DOS<\/a> Data Area)<\/strong>\n    50:00   byte    Print screen status byte\n             00 = PrtSc not active,\n             01 = PrtSc in progress\n             FF = error\n    50:01  3 bytes  Used by BASIC\n    50:04   byte    DOS single diskette mode flag, 0=A:, 1=B:\n    50:05  10bytes  POST work area\n    50:0F   byte    BASIC shell flag; set to 2 if current shell\n    50:10   word    BASICs default DS value (DEF SEG)\n    50:12   dword   Pointer to BASIC <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int1c.html\">INT 1C<\/a> interrupt handler\n    50:16   dword   Pointer to BASIC <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int23.html\">INT 23<\/a> interrupt handler\n    50:1A   dword   Pointer to BASIC <a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int24.html\">INT 24<\/a> disk error handler\n    50:20   word    DOS dynamic storage\n    50:22  14bytes  DOS diskette initialization table (<a href=\"http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/int1e.html\">INT 1E<\/a>)\n    50:30   4bytes  MODE command\n    70:00       I\/O drivers from IO.SYS\/IBMBIO.COM\n<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">The following map varies in size and locus<\/h1>\n\n\n\n<pre class=\"wp-block-preformatted\">   07C0:0      Boot code is loaded here at startup (31k mark)\n    A000:0      EGA\/VGA RAM for graphics display mode 0Dh &amp; above\n    B000:0      MDA RAM, Hercules graphics display RAM\n    B800:0      CGA display RAM\n    C000:0      EGA\/VGA BIOS ROM (thru C7FF)\n    C400:0      Video adapter ROM space\n    C600:0 256bytes PGA communication area\n    C800:0   16K    Hard disk adapter BIOS ROM\n    C800:5      XT Hard disk ROM format, AH=Drive, AL=Interleave\n    D000:0   32K    Cluster adapter BIOS ROM\n    D800:0      PCjr conventionalsoftware cartridge address\n    E000:0   64K    Expansion ROM space (hardwired on AT+)\n         128K   PS\/2 System ROM (thru F000)\n    F000:0      System monitor ROM\n            PCjr: software cartridge override address\n    F400:0      System expansion ROMs\n    F600:0      IBM ROM BASIC (AT)\n    F800:0      PCjr software cartridge override address\n    FC00:0      BIOS ROM\n    FF00:0      System ROM\n    FFA6:E      ROM graphics character table\n    FFFF:0      ROM bootstrap code\n    FFFF:5 8 bytes  ROM date (not applicable for all clones)\n    FFFF:E  byte    ROM machine id  (see MACHINE ID)\nRef: http:\/\/staff.ustc.edu.cn\/~xyfeng\/research\/cos\/resources\/BIOS\/Resources\/assembly\/biosdataarea.html<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Address Size Description 00:00 256dwords Interrupt vector table 30:00 256bytes 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&hellip;<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/www.ecsdump.net\/?page_id=688\" title=\"Continue reading &lsquo;BDA &#8211; BIOS Data Area &#8211; PC Memory Map&rsquo;\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":683,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/full-width.php","meta":{"footnotes":""},"categories":[11,56],"tags":[20,54,53],"wf_page_folders":[69],"class_list":["post-688","page","type-page","status-publish","hentry","category-reference","category-watdos","tag-boot","tag-memory","tag-watdos"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=688"}],"version-history":[{"count":0,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/688\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/683"}],"wp:attachment":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=688"},{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fwf_page_folders&post=688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}