home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / inter43 / memory.lst < prev    next >
File List  |  1994-11-06  |  33KB  |  765 lines

  1. [This file was originally provided by Robin Walker.  --Ralf]
  2. Last Update: 11/6/94
  3.  
  4. Format of BIOS Data Segment at segment 40h:
  5.         {items in curly braces not documented by IBM}
  6. Offset    Size    Description
  7.  00h    WORD    Base I/O address of 1st serial I/O port, zero if none
  8.  02h    WORD    Base I/O address of 2nd serial I/O port, zero if none
  9.  04h    WORD    Base I/O address of 3rd serial I/O port, zero if none
  10.  06h    WORD    Base I/O address of 4th serial I/O port, zero if none
  11.            Note: Above fields filled in turn by POST as it finds serial
  12.             ports. POST never leaves gaps. DOS and BIOS serial device
  13.             numbers may be redefined by re-assigning these fields.
  14.  08h    WORD    Base I/O address of 1st parallel I/O port, zero if none
  15.  0Ah    WORD    Base I/O address of 2nd parallel I/O port, zero if none
  16.  0Ch    WORD    Base I/O address of 3rd parallel I/O port, zero if none
  17.  0Eh    WORD    [non-PS] Base I/O address of 4th parallel port, zero if none
  18.         [PS] {Segment of Extended BIOS Data Segment}
  19.             Note: Above fields filled in turn by POST as it finds
  20.             parallel ports. POST never leaves gaps. DOS and BIOS
  21.             parallel device numbers may de redefined by re-assigning
  22.             these fields.
  23.  10h    WORD    Installed hardware:
  24.             bits 15-14: number of parallel devices
  25.             bit        13: [Conv, PS/2-55LS] Internal modem
  26.             bit        12: reserved
  27.             bits 11- 9: number of serial devices
  28.             bit         8: reserved
  29.             bits  7- 6: number of diskette drives minus one
  30.             bits  5- 4: Initial video mode:
  31.                     00b = EGA,VGA,PGA
  32.                     01b = 40 x 25 color
  33.                     10b = 80 x 25 color
  34.                     11b = 80 x 25 mono
  35.             bit         3: reserved
  36.             bit         2: [PS] =1 if pointing device
  37.                 [non-PS] reserved
  38.             bit         1: =1 if math co-processor
  39.             bit         0: =1 if diskette available for boot
  40.  12h    BYTE    [Conv] POST status
  41.         [AT] {Manufacturing test initialisation flags}
  42.             bit 0: Manufacturing test mode rather than normal operation
  43.             bits 1-7 unused
  44.         [MCA] Manufacturing test
  45.             bit 7: POST flag, ???
  46.             bits 6-5 unused
  47.             bit 4: POST flag, slot 4 has adapter identifier EDAFh
  48.             bit 3: POST flag, 80x25 color video
  49.             bit 2: POST flag, ???
  50.             bit 1: unused
  51.             bit 0: manufacturing test mode rather than normal operation
  52.         [PS/2-25] POST system flag
  53.             bit 0: optional memory failed; memory remapped
  54.             bit 1: real-time clock installed
  55.  13h    WORD    Base memory size in KBytes (0-640)
  56.  15h    WORD    [PC,XT] adapater memory size in KBytes
  57.  15h    BYTE    [AT] {Manufacturing test scratch pad}
  58.         [Compaq Deskpro 386] previous scan code
  59.  16h    BYTE    [AT] {Manufacturing test scratch pad}
  60.         [PS/2 Mod 30] {BIOS control flags}
  61.         [Compaq Deskpro 386] keyclick loudness (00h-7Fh)
  62.  17h    BYTE    Keyboard status flags 1:
  63.             bit 7 =1 INSert active
  64.             bit 6 =1 Caps Lock active
  65.             bit 5 =1 Num Lock active
  66.             bit 4 =1 Scroll Lock active
  67.             bit 3 =1 either Alt pressed
  68.             bit 2 =1 either Ctrl pressed
  69.             bit 1 =1 Left Shift pressed
  70.             bit 0 =1 Right Shift pressed
  71.  18h    BYTE    Keyboard status flags 2:
  72.             bit 7 =1 INSert pressed
  73.             bit 6 =1 Caps Lock pressed
  74.             bit 5 =1 Num Lock pressed
  75.             bit 4 =1 Scroll Lock pressed
  76.             bit 3 =1 Pause state active
  77.             bit 2 =1 Sys Req pressed
  78.             bit 1 =1 Left Alt pressed
  79.             bit 0 =1 Left Ctrl pressed
  80.  19h    BYTE    Keyboard: Alt-nnn keypad workspace
  81.  1Ah    WORD    Keyboard: pointer to next character in keyboard buffer
  82.  1Ch    WORD    Keyboard: pointer to first free slot in keyboard buffer
  83.  1Eh 16 WORDs    Keyboard circular buffer (but see 80h, 82h for override)
  84.  3Eh    BYTE    Diskette recalibrate status:
  85.             bit 7 =1 Diskette hardware interrupt occurred
  86.             bits 6-4 reserved
  87.             bit 3 =1 Recalibrate diskette 3 (PC,XT only)
  88.             bit 2 =1 Recalibrate diskette 2 (PC,XT only)
  89.             bit 1 =1 Recalibrate diskette 1
  90.             bit 0 =1 Recalibrate diskette 0
  91.  3Fh    BYTE    Diskette motor status:
  92.             bit 7 =1 current operation is write or format
  93.               =0 current operation is read or verify
  94.             bit 6    reserved
  95.                 (DMA enabled on 82077)
  96.             bits 5-4 diskette drive number selected (0-3)
  97.             bit 3 =1 diskette 3 motor on (PC,XT only)
  98.             bit 2 =1 diskette 2 motor on (PC,XT only)
  99.             bit 1 =1 diskette 1 motor on
  100.             bit 0 =1 diskette 0 motor on
  101.  40h    BYTE    Diskette motor turn-off time-out count
  102.  41h    BYTE    Diskette last operation status (0 = OK)
  103.             bit 7 =1 drive not ready
  104.             bit 6 =1 seek error
  105.             bit 5 =1 general controller failure
  106.             bits 4-0:
  107.                 00h no error
  108.                 01h invalid request/parameter
  109.                 02h address mark not found
  110.                 03h write-protect error
  111.                 04h sector not found
  112.                 06h diskette change line active
  113.                 08h DMA overrun
  114.                 09h DMA across 64k boundary
  115.                 0Ch media type unknown
  116.                 10h CRC error on read
  117.             Note: the following values for this byte differ somewhat
  118.             from the bitfield definition above:
  119.                 30h drive does not support media sense
  120.                 31h no media in drive
  121.                 32h drive does not support media type
  122.                 AAh diskette drive not ready
  123.  42h  7 BYTEs    Diskette/Fixed disk status/command bytes
  124.     42h BYTE    XT: command byte to hard disk controller
  125.         AT: write precompensation cylinder number / 4
  126.     43h    BYTE    XT: bit 5 = drive number, bits 3-0=head number
  127.         AT: sector count
  128.     44h BYTE    XT: bits 6,7 = high bits of track, bits 5-0 = start sector-1
  129.         AT: starting sector
  130.     45h BYTE    low byte of track number
  131.     46h BYTE    XT: sector count
  132.         AT: high bits of track number
  133.     47h BYTE    XT: controlbyte from HD parameters (step rate,...)
  134.         AT: 101DHHHH, D=drive number, HHHH=head number
  135.     48h BYTE    XT: INT 13h subfunction number
  136.         AT: comand byte to hard disk controller
  137.  42h    BYTE    disk controller status register 0
  138.         bits 7-6: interrupt code
  139.             00 normal completion
  140.             01 abnormal termination during execution
  141.             10 invalid command
  142.             11 abnormal termination: ready line on/diskette change
  143.         bit 5: requested seek complete
  144.         bit 4: drive fault
  145.         bit 3: drive not ready
  146.         bit 2: head state at time of interrupt
  147.         bits 1-0: selected drive (drives 2&3 on PC,XT only)
  148.  43h    BYTE    diskette controller status register 1
  149.         bit 7: attempted access beyon last cylinder
  150.         bit 6: unused
  151.         bit 5: CRC error on read
  152.         bit 4: DMA overrun
  153.         bit 3: unused
  154.         bit 2: data error
  155.         bit 1: disk write protected
  156.         bit 0: missing address mark
  157.  44h    BYTE    diskette controller status register 2
  158.         bit 7: unused
  159.         bit 6: found deleted data address mark
  160.         bit 5: CRC error in data field
  161.         bit 4: wrong cylinder number read
  162.         bit 3: verify equal
  163.         bit 2: can't find sector matching verify condition
  164.         bit 1: bad cylinder
  165.         bit 0: unable to find address mark
  166.  49h    BYTE    Video current mode
  167.  4Ah    WORD    Video columns on screen
  168.  4Ch    WORD    Video page (regen buffer) size in bytes
  169.  4Eh    WORD    Video current page start address in regen buffer
  170.  50h 16 BYTEs    Video cursor position (col, row) for eight pages, 0 based
  171.  60h    WORD    Video cursor type, 6845 compatible, hi=startline, lo=endline
  172.  62h    BYTE    Video current page number
  173.  63h    WORD    Video CRT controller base address: color=03D4h, mono=03B4h
  174.  65h    BYTE    Video current setting of mode select register 03D8h/03B8h
  175.         bits 7-6 unused
  176.         bit 5: attribute bit 7 controls blinking instead of background
  177.         bit 4: mode 6 graphics in monochrome
  178.         bit 3: video signal enabled
  179.         bit 2: monochrome
  180.         bit 1: graphics
  181.         bit 0: 80x25 text
  182.  66h    BYTE    Video current setting of CGA palette register 03D9h
  183.         bits 7-6 unused
  184.         bit 5: palette (0/1)
  185.         bit 4: intense background colors in text mode
  186.         bit 3: intense border color (40x25) / background color (mode 5)
  187.         bit 2: red
  188.         bit 1: green
  189.         bit 0: blue
  190.  67h    WORD    [PC only] cassette time count
  191.  67h    DWORD    {POST real mode re-entry point after certain resets}
  192.         [PS except Mod 25,30] pointer to reset code upon system reset
  193.             with memory preserved (see offset 72h)
  194.  69h    WORD    [PC only] cassette CRC register
  195.  6Bh    BYTE    [PC only] last value read from cassette
  196.         [XT+] POST last unexpected interrupt
  197.         bit 0 = IRQ0 to bit 7 = IRQ7
  198.  6Ch    DWORD    Timer ticks since midnight
  199.  70h    BYTE    Timer overflow, non-zero if has counted past midnight
  200.  71h    BYTE    Ctrl-Break flag: bit 7=1
  201.  72h    WORD    POST reset flag:
  202.             1234h to bypass memory test (warm boot)
  203.             4321h [PS/2 except Mod 25,30] to preserve memory
  204.             5678h [Conv] system suspended
  205.             9ABCh [Conv] manufacturing test mode
  206.             ABCDh [Conv] POST loop mode
  207.             0064h Burn-in mode
  208.  74h    BYTE    Fixed disk last operation status, except ESDI drives:
  209.             00h no error
  210.             01h invalid function request
  211.             02h address mark not found
  212.             03h write protect error
  213.             04h sector not found
  214.             05h reset failed
  215.             06h diskette removed
  216.             07h drive parameter activity failed
  217.             08h DMA overrun
  218.             09h DMA data boundary error
  219.             0Ah bad sector flag detected
  220.             0Bh bad track detected
  221.             0Ch requested diskette media type not found
  222.             (PS/2 or extended BIOS only)
  223.             unsupported track
  224.             0Dh invalid number of sectors for Format
  225.             0Eh control data address mark detected
  226.             0Fh DMA arbitration level out of range
  227.             10h uncorrectable ECC or CRC error
  228.             11h ECC corrected data error
  229.             20h general controller failed
  230.             40h seek failed
  231.             80h time out
  232.             AAh drive not ready
  233.             BBh undefined error
  234.             CCh write fault on selected drive
  235.             E0h status error/error register is zero
  236.             FFh sense failed
  237.  74h    BYTE    [WD1002-27X SuperBIOS] total drives, first controller only
  238.  75h    BYTE    Fixed disk: number of fixed disk drives
  239.         [WD1002-27X SuperBIOS] total fixed drives, both controllers
  240.  76h    BYTE    Fixed disk: control byte    {IBM document only for XT}
  241.         XT: hard disk controller's I/O address (Western Digital)
  242.         [WD1002-27X SuperBIOS] used in track recalculation
  243.  77h    BYTE    Fixed disk: I/O port offset {IBM document only for XT}
  244.         [WD1002-27X SuperBIOS] used in track recalculation
  245.  78h  3 BYTEs    Parallel devices 1-3 time-out counters
  246.  7Bh    BYTE    parallel device 4 time-out counter [non-PS and PS Mod 25,30]
  247.         bit 7-6 reserved
  248.         bit 5 set if Virtual DMA Spec supported [PS] (see INT 4B)
  249.         bit 4 reserved
  250.         bit 3 set if INT 4Bh intercepted and must be chained
  251.         bit 2 reserved
  252.         bit 1 set if Generic SCSI CBIOS services available on INT 4Bh
  253.         bit 0 reserved
  254.  7Ch  4 BYTEs    Serial devices 1-4 time-out counters
  255.  80h    WORD    Keyboard buffer start as offset from segment 40h (normally 1Eh)
  256.  82h    WORD    Keyboard buffer end+1 as offset from segment 40h (normally 3Eh)
  257.         [XT BIOS dated 11/08/82 ends here]
  258.  84h    BYTE    Video EGA/MCGA/VGA rows on screen minus one
  259.  85h    WORD    Video EGA/MCGA/VGA character height in scan-lines
  260.  87h    BYTE    Video EGA/VGA control: [MCGA: =00h]
  261.         bit 7:    =1 if not to clear RAM (see INT 10h, AH=00h)
  262.         bits 6-5: RAM on adapter = (this field + 1) * 64K
  263.         bit 4:    reserved
  264.         bit 3:    =0 if EGA/VGA video system active, =1 if inactive
  265.         bit 2:    =1 if to wait for display enable (what means this?)
  266.         bit 1:    =0 for color or ECD monitor, =1 for mono monitor
  267.         bit 0:    =0 alphanumeric cursor emulation enabled, =1 not.
  268.             When enabled, text mode cursor size (INT 10,AH=01h)
  269.             settings looking like CGA ones are translated to
  270.             equivalent EGA/VGA ones.
  271.  88h    BYTE    Video EGA/VGA switches: [MCGA: reserved]
  272.             bits 7-4: power-on state of feature connector bits 3-0
  273.             bits 3-0: configuration switches 4-1 (=0 on, =1 off)
  274.               Values as read:
  275.             0h Pri MDA,        Sec EGA+old color display 40 x 25
  276.             1h Pri MDA,        Sec EGA+old color display 80 x 25
  277.             2h Pri MDA,        Sec EGA+ECD normal mode (CGA emul)
  278.             3h Pri MDA,        Sec EGA+ECD enhanced mode
  279.             4h Pri CGA 40 x 25, Sec EGA mono display
  280.             5h Pri CGA 80 x 25, Sec EGA mono display
  281.             6h Pri EGA+old color display 40 x 25,  Sec MDA
  282.             7h Pri EGA+old color display 80 x 25,  Sec MDA
  283.             8h Pri EGA+ECD normal mode (CGA emul), Sec MDA
  284.             9h Pri EGA+ECD enhanced mode,           Sec MDA
  285.             Ah Pri EGA mono display,           Sec CGA 40 x 25
  286.             Bh Pri EGA mono display,           Sec CGA 80 x 25
  287.             When bit4 of 40h:89h is 0, VGA emulates 350-line EGA if
  288.             this byte is x3h or x9h, otherwise emulates 200-line CGA in
  289.             400-line double scan. VGA resets this byte to x9h after the
  290.             mode set.
  291.             See also note for next byte.
  292.  89h    BYTE    {Video MCGA/VGA mode-set option control:}
  293.             bits 7 and 4:
  294.             0 0  350-line mode requested
  295.             0 1  400-line mode at next mode set
  296.             1 0  200-line mode requested
  297.             1 1  reserved
  298.             Apparently VGA BIOS mode set disregards bit 7 and uses
  299.             byte 40h:88h to determine 200/350 selection when bit 4
  300.             is zero. Presumably bit 7 is a convenience for other
  301.             purposes. Bit 7 is reset to zero after the mode set.
  302.             bit 6:  =1 if display switching enabled, =0 if disabled
  303.             bit 5:  reserved
  304.             bit 4:  [VGA]  =1 if to use 400-line mode at next mode set
  305.                    =0 if to emulate EGA at next mode set
  306.                       This bit set to 1 after the mode set.
  307.                 [MCGA] =1 use 400-line mode at next mode set
  308.                    =0 emulate CGA, digital monitor, 200 lines,
  309.                       8 x 8 text font at next mode set
  310.                       Bit unchanged by mode set.
  311.             bit 3:  =0 if default palette loading enabled at mode set
  312.             bit 2:  =1 if mono display, =0 if color display
  313.             bit 1:  =1 if gray scale summing enabled, =0 if disabled
  314.             bit 0:  [VGA] =1 if VGA active, =0 if not
  315.                 [MCGA] reserved, zero
  316.         Note: the Tseng ET4000 BIOS v3.00 uses bits 6-4 of 88h and
  317.             bits 6-5 of 89h to specify graphics-mode refresh
  318.             rates as follows
  319.                 88h/6        640x480:  1 for 72Hz,0 for 60Hz
  320.                 88h/5+89h/6    800x600:  00  60Hz
  321.                               01  56Hz
  322.                               11  72Hz
  323.                 88h/4+89h/5    1024x768: 00  interlaced
  324.                               01  60Hz
  325.                               10  72Hz???
  326.                               11  70Hz
  327.  8Ah    BYTE    {Video [MCGA/VGA]: index into Display Combination Code table}
  328.  8Bh 11 BYTEs    reserved [PC, PCjr, PC/XT 11/8/82, and Convertible]
  329.  8Bh    BYTE    Diskette media control [not XT]:
  330.             bits 7-6: Last data rate set by controller:
  331.                   00=500kbps, 01=300kbps, 10=250kbps, 11=1Mbps
  332.             bits 5-4: Last diskette drive step rate selected
  333.                   00=0Ch, 01=0Dh, 10=0Eh, 11=0Ah
  334.             bits 3-2: {Data rate at start of operation}
  335.             bits 1-0: reserved
  336.          Note: EHD BIOS sets this byte to 01h and never reads it back
  337.  8Ch    BYTE    Fixed disk controller status [not XT]
  338.  8Dh    BYTE    Fixed disk controller Error Status [not XT]
  339.  8Eh    BYTE    Fixed disk Interrupt Control [not XT]
  340.         cleared to 00h at start of disk operation, set to FFh by IRQ14
  341.         handler when hard disk controller completes command
  342.  8Fh    BYTE    {Diskette controller information [not XT]:}
  343.             bit 7:  reserved
  344.             bit 6:  =1 drive 1 determined
  345.             bit 5:  =1 drive 1 is multi-rate, valid if drive determined
  346.             bit 4:  =1 drive 1 supports 80 tracks, always valid
  347.             bit 3:  reserved
  348.             bit 2:  =1 drive 0 determined
  349.             bit 1:  =1 drive 0 is multi-rate, valid if drive determined
  350.             bit 0:  =1 drive 0 supports 80 tracks, always valid
  351.          Note: EHD BIOS sets this byte to 01h and never alters it again
  352.  90h    BYTE    Diskette drive 0 media state
  353.  91h    BYTE    Diskette drive 1 media state
  354.         bits 7-6: Data rate
  355.                 00=500kbps, 01=300kbps, 10=250kbps, 11=1Mbps
  356.         bit    5: =1 if double stepping required (e.g. 360kB in 1.2MB)
  357.         bit    4: =1 if media established
  358.         bit    3: =1 if drive capable of supporting 4MB media
  359.         bits 2-0: on exit from BIOS, contain:
  360.             000 trying 360kB in 360kB
  361.             001 trying 360kB in 1.2MB
  362.             010 trying 1.2MB in 1.2MB
  363.             011 360kB in 360kB established
  364.             100 360kB in 1.2MB established
  365.             101 1.2MB in 1.2MB established
  366.             110 reserved
  367.             111 all other formats/drives
  368.  92h    BYTE    {Diskette drive 0 media state at start of operation}
  369.         officially "Drive 2 media state"
  370.         bits 7-3 as above
  371.         bit 2: =1 if multiple data rate capability determined
  372.         bit 1: =1 if multiple data rate capability
  373.         bit 0: =1 if drive has 80 tracks, =0 if 40 tracks
  374.  92h    BYTE    [Olivetti Quaderno] Hard Disk powerdown countdown in clock
  375.         ticks (HD turned off when counter reaches zero)
  376.  93h    BYTE    {Diskette drive 1 media state at start of operation}
  377.         officially "Drive 3 media state"
  378.         bits 7-3 as above
  379.         bit 2: =1 if multiple data rate capability determined
  380.         bit 1: =1 if multiple data rate capability
  381.         bit 0: =1 if drive has 80 tracks, =0 if 40 tracks
  382.  94h    BYTE    Diskette drive 0 current track number
  383.  95h    BYTE    Diskette drive 1 current track number
  384.  96h    BYTE    Keyboard status byte 1
  385.         bit 7 =1 read-ID in progress
  386.         bit 6 =1 last code read was first of two ID codes
  387.         bit 5 =1 force Num Lock if read-ID and enhanced keyboard
  388.         bit 4 =1 enhanced keyboard installed
  389.         bit 3 =1 Right Alt pressed
  390.         bit 2 =1 Right Ctrl pressed
  391.         bit 1 =1 last code read was E0h
  392.         bit 0 =1 last code read was E1h
  393.  97h    BYTE    Keyboard status byte 2
  394.         bit 7 =1 keyboard transmit error flag
  395.         bit 6 =1 LED update in progress
  396.         bit 5 =1 RESEND received from keyboard
  397.         bit 4 =1 ACK received from keyboard
  398.         bit 3 reserved, must be zero
  399.         bit 2 Caps Lock LED
  400.         bit 1 Num Lock LED
  401.         bit 0 Scroll Lock LED
  402.  98h    DWORD    Timer2: [AT, PS exc Mod 30] ptr to user wait-complete flag
  403.                         (see INT 15, AX=8300h)
  404.  9Ch    DWORD    Timer2: [AT, PS exc Mod 30] user wait count in microseconds
  405.  A0h    BYTE    Timer2: [AT, PS exc Mod 30] Wait active flag:
  406.             bit 7 =1 wait time elapsed
  407.             bits 6-1 reserved
  408.             bit 0 =1 INT 15h, AH=86h has occurred
  409.  A1h    BYTE    bit 5 set if LAN Support Program Interrupt Arbitrator present
  410.         (DEVICE=DXMA0MOD.SYS)
  411.  A2h  6 BYTEs    reserved for network adapters
  412.  A4h    DWORD    [PS/2 Mod 30] Saved Fixed Disk Interrupt Vector
  413.  A8h    DWORD    Video: EGA/MCGA/VGA ptr to Video Save Pointer Table (see below)
  414.  ACh-AFh    reserved
  415.  B0h    BYTE    (Phoenix 386 BIOS 1.10 10a) loop count for hard disk timeout
  416.           and delaying when beeping due to full keyboard buffer
  417.  B0h    DWORD    ptr to 3363 Optical disk driver or BIOS entry point.
  418.             When 3363 BIOS present, the signature "OPTIC ",00h occurs 3
  419.             bytes beyond this entry point.
  420.             When 3363 BIOS and 3363 File System Driver present, the
  421.             signature "FILE SYSTEM DRIVER",00h occurs 3 bytes beyond
  422.             this entry point.
  423.  B0h 16 BYTEs    (1988 Phoenix 386 BIOS 1.10 03) drive parameters for hard disk
  424.         type 48 (see INT 41,INT 46)
  425.  B4h    WORD    reserved
  426.  B5h    BYTE    (Dell 4xxDE)
  427.         bit 2: ??? (related to disk drives)
  428.         bit 5: page tables set to allow Weitek addressing in real mode
  429.         bit 6: Weitek math coprocessor present
  430.  B6h  3 BYTEs    reserved for POST?
  431.  B9h  7 BYTEs    ???
  432.  C0h 16 BYTEs    (1988 Phoenix 386 BIOS 1.10 03) drive parameters for hard disk
  433.         type 49 (see INT 41,INT 46)
  434.  C0h 14 BYTEs    reserved
  435.  CEh    WORD    count of days since last boot
  436.  D0h-EFh    reserved
  437.  D0h    BYTE    [Digiboard MV/4] length of data table
  438.  D0h    BYTE    [EHD floppy]
  439.              bit 4: installation completed
  440.              bits 3-0: drives 0-3
  441.  D1h    BYTE    [Digiboard MV/4] product ID
  442.  D2h    WORD    [Digiboard MV/4] base address found
  443.  D4h    BYTE    [Digiboard MV/4] ports
  444.  D5h    BYTE    [Digiboard MV/4] IRQ
  445.  D5h    BYTE    [EHD floppy] total number of floppy disk controllers in system
  446.  D6h    BYTE    [EHD floppy] AND-bits for DL to adjust port address (FFh if
  447.           at 03Fxh and 7Fh if at 037xh)
  448.  D6h    WORD    [Digiboard MV/4] keyboards found
  449.  D7h    BYTE    [EHD floppy] drive 0 diskette media status
  450.             bits 7-6: Data rate: 00=500kbps,01=300kbps,10=250k,11=1M/S
  451.             bit    5: =1 if double stepping reqd (e.g. 360kB in 1.2MB)
  452.             bit    4: =1 if media established
  453.             bit    3: reserved
  454.             bits 2-0: on exit from BIOS, contain:
  455.                 000 trying 360kB in 360kB
  456.                 001 trying 360kB in 1.2MB
  457.                 010 trying 1.2MB in 1.2MB
  458.                 011 360kB in 360kB established
  459.                 100 360kB in 1.2MB established
  460.                 101 1.2MB in 1.2MB established
  461.                 110 reserved (2M8?)
  462.                 111 all other formats/drives
  463.         the value in 4D7 gets sent to 490 (diskette0 media state)
  464.  D8h    BYTE    [EHD floppy] drive 1 diskette media state
  465.  D8h    WORD    [Digiboard MV/4] mice found
  466.  D9h    BYTE    [EHD floppy] drive 2 diskette media state
  467.  DAh    BYTE    [Digiboard MV/4] current port (used by VGA initialization only)
  468.  DAh    BYTE    [EHD floppy] drive 3 diskette media state
  469.  DBh    BYTE    [Digiboard MV/4] master 8259 mask (used by VGA init only)
  470.  DBh    BYTE    [EHD floppy] drive 0 needs recalibaration
  471.  DCh    BYTE    [Digiboard MV/4] slave 8259 mask (used by VGA init only)
  472.  DCh    BYTE    [EHD floppy] drive 1 needs recalibaration
  473.  DDh    BYTE    [EHD floppy] drive 2 needs recalibaration
  474.  DEh    BYTE    [EHD floppy] drive 3 needs recalibaration
  475.  E0h-EFh    [Phoenix 386 BIOS] drive parameter table for first hard disk
  476.           if configurable "type 47"
  477.  E3h    BYTE    [EHD floppy] drive 0 diskette type (from jumpers)
  478.             01h undefined by diskette change (360K)
  479.             02h 1.2M
  480.             03h 720K
  481.             04h 1.44M
  482.             05h 2.88M
  483.  E4h    BYTE    [EHD floppy] drive 1 diskette type (from jumpers)
  484.  E5h    BYTE    [EHD floppy] drive 2 diskette type (from jumpers)
  485.  E6h    BYTE    [EHD floppy] drive 3 diskette type (from jumpers)
  486.  EAh    WORD    [Omti controller] segment of extended BIOS data area???
  487.         drive parameter tables stored in specified segment
  488.  ECh    WORD    (Dell 4xxDE BIOS A11) loop count for delays
  489.  F0h-FFh    reserved for user
  490. 100h    BYTE    Print Screen Status byte
  491. 10Eh    BYTE    state of BREAK at start of BASICA.COM execution
  492. 10Fh    BYTE    flag: 02h if BASICA v2.10 running
  493. 116h    DWORD    INT 1Bh at start of BASICA.COM execution
  494. 11Ah    DWORD    INT 24h at start of BASICA.COM execution
  495.  
  496. Format of Interrupt Vector Table data storage (from 0000h:0000h):
  497. Offset    Size    Description
  498.  31Dh 16 BYTEs    user-definable hard disk parameters for drive type 47
  499.         (1989 AMI 386sx BIOS) (see INT 41,INT 46)
  500.  32Dh 16 BYTEs    user-definable hard disk parameters for drive type 48
  501.         (1989 AMI 386sx BIOS) (see INT 41,INT 46)
  502. Note:    these fields are used is the AMI BIOS setup is set to use the top of
  503.       the interrupt table for the extended BIOS data area
  504.  
  505. Format of Extended BIOS Data Area (see 40:0Eh for ptr) [PS only]
  506. Offset    Size    Description
  507.  00h    BYTE    Length of EBDA in kilobytes
  508.  01h 15 BYTEs    reserved
  509.  17h    BYTE    Number of entries in POST error log (0-5)
  510.  18h  5 WORDs    POST error log (each word is a POST error number)
  511.  22h    DWORD    Pointing Device Driver entry point
  512.  26h    BYTE    Pointing Device Flags 1
  513.            bit 7:    command in progress
  514.            bit 6:    resend byte (FAh) received
  515.            bit 5:    acknowledge byte (FEh) received
  516.            bit 4:    error byte (FCh) received
  517.            bit 3:    unexpected value received
  518.            bits 2-0: index count for auxiliary device data at 28h
  519.  27h    BYTE    Pointing Device Flags 2
  520.            bit 7:    device driver far call flag
  521.            bits 6-3: reserved
  522.            bits 2-0: package size (number of bytes received) - 1
  523.  28h  8 BYTEs    Pointing Device Auxiliary Device Data
  524.  30h    DWORD    Vector for INT 07h stored here during 80387 interrupt
  525.  34h    DWORD    Vector for INT 01h stored here during INT 07h emulation
  526.  38h    BYTE    Scratchpad for 80287/80387 interrupt code
  527.  39h    WORD    Timer3: Watchdog timer initial count
  528.  3Bh    BYTE    ??? seen non-zero on Model 30
  529.  3Ch    BYTE    ???
  530.  3Dh 16 BYTEs    Fixed Disk parameter table for drive 0 (for older machines
  531.           which don't directly support the installed drive)
  532.  4Dh 16 BYTEs    Fixed Disk parameter table for drive 1 (for older machines
  533.           which don't directly support the installed drive)
  534.  5Dh-67h    ???
  535.  68h    BYTE    cache control
  536.         bits 7-2 unused (0)
  537.         bit 1: CPU cache failed test
  538.         bit 0: CPU cache disabled
  539.  69h-6Bh    ???
  540.  6Ch    BYTE    Fixed disk: (=FFh on ESDI systems)
  541.             bits 7-4: Channel number 00-0Fh
  542.             bits 3-0: DMA arbitration level 00-0Eh
  543.  6Dh    BYTE    ???
  544.  6Eh    WORD    current typematic setting (see INT 16/AH=03h)
  545.  70h    BYTE    number of attached hard drives
  546.  71h    BYTE    hard disk 16-bit DMA channel
  547.  72h    BYTE    interrupt status for hard disk controller (1Fh on timeout)
  548.  73h    BYTE    hard disk operation flags
  549.         bit 7: controller issued operation-complete INT 76h
  550.         bit 6: controller has been reset
  551.         bits 5-0: unused (0)
  552.  74h    DWORD    old INT 76h vector
  553.  78h    BYTE    hard disk DMA type
  554.         typically 44h for reads and 4Ch for writes
  555.  79h    BYTE    status of last hard disk operation
  556.  7Ah    BYTE    hard disk timeout counter
  557.  7Bh-7Dh
  558.  7Eh  8 WORDs    storage for hard disk controller status
  559.  8Eh-E6h
  560.  E7h    BYTE    floppy drive type
  561.         bit 7: drive(s) present
  562.         bits 6-2: unused (0)
  563.         bit 1: drive 1 is 5.25" instead of 3.5"
  564.         bit 0: drive 0 is 5.25"
  565.  E8h-EBh
  566.  ECh    BYTE    hard disk parameters flag
  567.         bit 7: parameters loaded into EBDA
  568.         bits 6-0: unused (0)
  569.  EDh    BYTE    ???
  570.  EEh    BYTE    CPU family ID (03h = 386, 04h = 486, etc.) (see INT 15/AH=C9h)
  571.  EFh    BYTE    CPU stepping (see INT 15/AH=C9h)
  572.  F0h 39 BYTEs  ???
  573. 117h    WORD    keyboard ID (see INT 16/AH=0Ah)
  574.         (most commonly 41ABh)
  575. 119h    BYTE    ???
  576. 11Ah    BYTE    non-BIOS INT 18h flag
  577.         bits 7-1: unused (0)
  578.         bit 0: set by BIOS before calling user INT 18h at offset 11Dh
  579. 11Bh  2 BYTE    ???
  580. 11Dh    DWORD    user INT 18h vector if BIOS has re-hooked INT 18h
  581. 121h and up:    ??? seen non-zero on Model 60
  582. 3F0h    BYTE    Fixed disk buffer (???!!!)
  583.  
  584. Format of Video Save Pointer Table [EGA/VGA/MCGA only]:
  585. Offset    Size    Description
  586.  00h    DWORD    ptr to Video Parameter Table
  587.  04h    DWORD    ptr to Parameter Dynamic Save Area, else 0 [EGA/VGA only]
  588.  08h    DWORD    ptr to Alphanumeric Character Set Override, else 0
  589.  0Ch    DWORD    ptr to Graphics Character Set Override, else 0
  590.  10h    DWORD    [VGA only] ptr to Secondary Save Pointer Table, must be valid
  591.  14h    DWORD    reserved, zero
  592.  18h    DWORD    reserved, zero
  593. Note: table initially in ROM, copy to RAM to alter, then update 40h:A8h.
  594.  
  595. Format of Secondary Video Save Pointer Table [VGA only]:
  596. Offset    Size    Description
  597.  00h    WORD    Length of this table in bytes, including this word (1Ah)
  598.  02h    DWORD    ptr to Display Combination Code Table, must be valid
  599.  06h    DWORD    ptr to second Alphanumeric Character Set Override, else 0
  600.  0Ah    DWORD    ptr to User Palette Profile Table, else 0
  601.  0Eh    DWORD    reserved, zero
  602.  12h    DWORD    reserved, zero
  603.  16h    DWORD    reserved, zero
  604. Note: table initially in ROM, copy to RAM to alter, then alter Save Ptr Table.
  605.  
  606. Format of Video Parameter Table [EGA, VGA only]:
  607. An array of 23 [EGA] or 29 [VGA] elements, each element being 64 bytes long.
  608. Elements appear in the order:
  609.  00h-03h    Modes 00h-03h in 200-line CGA emulation mode
  610.  04h-0Eh    Modes 04h-0Eh
  611.  0Fh-10h    Modes 0Fh-10h when only 64kB RAM on adapter
  612.  11h-12h    Modes 0Fh-10h when >64kB RAM on adapter
  613.  13h-16h    Modes 00h-03h in 350-line mode
  614.  17h        VGA Modes 00h or 01h in 400-line mode
  615.  18h        VGA Modes 02h or 03h in 400-line mode
  616.  19h        VGA Mode  07h in 400-line mode
  617.  1Ah-1Ch    VGA Modes 11h-13h
  618.  
  619. Format of Video Parameter Table element [EGA, VGA only]:
  620. Offset    Size    Description
  621.  00h    BYTE    Columns on screen          (see 40h:4Ah)
  622.  01h    BYTE    Rows on screen minus one      (see 40h:84h)
  623.  02h    BYTE    Height of character in scan lines (see 40h:85h)
  624.  03h    WORD    Size of video buffer          (see 40h:4Ch)
  625.  05h  4 BYTEs    Values for Sequencer Registers 1-4
  626.  09h    BYTE    Value for Miscellaneous Output Register
  627.  0Ah 25 BYTEs    Values for CRTC Registers 00h-18h
  628.  23h 20 BYTEs    Values for Attribute Controller Registers 00h-13h
  629.  37h  9 BYTEs    Values for Graphics Controller Registers 00h-08h
  630.  
  631. Format of Video Parameter Table [MCGA only] {guesswork from inspection}:
  632.     - 16 triplet BYTEs of R,G,B DAC info for 16 colors;
  633.     - An array of 11 elements, each element being 32 bytes long.
  634.       Elements appear in the order:
  635.         Modes 00h,01h in 200-line mode for digital displays
  636.         Modes 00h,01h in 400-line mode for analog displays
  637.         Modes 02h,03h in 200-line mode for digital displays
  638.         Modes 02h,03h in 400-line mode for analog displays
  639.         Modes 04h,05h in 200-line mode for digital displays
  640.         Modes 04h,05h in 400-line mode for analog displays
  641.         Mode  06h in 200-line mode for digital displays
  642.         Mode  06h in 400-line mode for analog displays
  643.         Mode  11h
  644.         Mode  13h in 200-line mode for digital displays
  645.         Mode  13h in 400-line mode for analog displays
  646.  
  647. Format of Video Parameter Table element [MCGA only]:
  648. Offset    Size    Description
  649.  00h    BYTE    Columns on screen          (see 40h:4Ah)
  650.  01h    BYTE    Rows on screen minus one      (see 40h:84h)
  651.  02h    BYTE    Height of character in scan lines (see 40h:85h)
  652.  03h    WORD    Size of video buffer          (see 40h:4Ch)
  653.  05h    WORD    ??? always zero
  654.  07h 21 BYTEs    Video data registers 00h-14h to port 3D5h indexed by 3D4h
  655.  1Ch    BYTE    PEL Mask to port 3C6h
  656.  1Dh    BYTE    CGA Mode Control to port 3D8h
  657.  1Eh    BYTE    CGA Border Control to port 3D9h
  658.  1Fh    BYTE    Extended Mode Control to port 3DDh
  659.  
  660. Format of Video Parameter Dynamic Save Area [EGA, VGA only]:
  661. Offset    Size    Description
  662.  00h 16 BYTEs    Last data written to Attribute Contr. Palette Registers 0-15
  663.  10h    BYTE    Last data written to Attribute Controller Overscan Register
  664.  11h-FFh    Reserved
  665.         Note: Need for table was that EGA registers were write-only.
  666.         Note: If default values (from the Video Parameter Table) are
  667.               over-ridden at a mode set by the VGA User Palette Profile
  668.               Table, then the Dynamic Save Area is updated with the
  669.               default values, not the User Profile ones.
  670.  
  671. Format of Alphanumeric Character Set Override:
  672. Offset    Size    Description
  673.  00h    BYTE    Length in bytes of each character in font table
  674.  01h    BYTE    Character generator RAM bank to load, 0=normal
  675.  02h    WORD    Number of characters in font table, normally 256
  676.  04h    WORD    Code of first character in font table, normally 0
  677.  06h    DWORD    ptr to font table
  678.  0Ah    BYTE    Displayable rows (FFh=use maximum calculated value)
  679.  0Bh    BYTEs    Array of mode values to which this font is to pertain
  680.     BYTE    FFh end of array
  681.  
  682. Format of Second Alphanumeric Character Set Override:
  683. Authorities differ, some say same as first override above, but IBM say:
  684. Offset    Size    Description
  685.  00h    BYTE    Length in bytes of each character in font table
  686.  01h    BYTE    Character generator RAM bank to load, normally non-zero
  687.  02h    BYTE    reserved
  688.  03h    DWORD    ptr to font table
  689.  07h    BYTEs    Array of mode values to which this font is to pertain
  690.     BYTE    FFh end of array
  691.  
  692. Format of Graphics Character Set Override:
  693. Offset    Size    Description
  694.  00h    BYTE    Number of displayable character rows
  695.  01h    WORD    Length in bytes of each character in font table
  696.  03h    DWORD    ptr to font table
  697.  07h    BYTEs    Array of mode values to which this font is to pertain
  698.     BYTE    FFh end of array
  699.  
  700. Format of Display Combination Code Table [VGA only]:
  701. Offset    Size    Description
  702.  00h    BYTE    Number of entries in the DCC table at offset 04h
  703.  01h    BYTE    Version number
  704.  02h    BYTE    Maximum display type code that can appear in DCC table
  705.  03h    BYTE    reserved
  706.  04h 2N BYTEs    Each pair of bytes gives a valid display combination
  707.         Meaning of each byte:
  708.          00h     no display
  709.          01h     MDA with mono display
  710.          02h     CGA with color display
  711.          03h     reserved
  712.          04h     EGA with color display
  713.          05h     EGA with mono display
  714.          06h     Professional Graphics Controller
  715.          07h     VGA with mono display
  716.          08h     VGA with color display
  717.          09h     reserved
  718.          0Ah     MCGA with digital color display
  719.          0Bh     MCGA with analog mono display
  720.          0Ch     MCGA with analog color display
  721.          FFh     unrecognised video system
  722.  
  723. Format of User Palette Profile Table [VGA only]:
  724. Offset    Size    Description
  725.  00h    BYTE    Underlining: 01h=enable in all alphanumeric modes
  726.                  00h=enable in monochrome alphanumeric modes only
  727.                  FFh=disable in all alphanumeric modes
  728.  01h    BYTE    reserved
  729.  02h    WORD    reserved
  730.  04h    WORD    Number (0-17) of Attribute Controller registers in table
  731.  06h    WORD    Index (0-16) of first Attribute Controller register in table
  732.  08h    DWORD    ptr to table of Attribute Controller registers to override
  733.             Table is an array of BYTEs.
  734.  0Ch    WORD    Number (0-256) of video DAC Color registers in table
  735.  0Eh    WORD    Index (0-255) of first video DAC Color register in table
  736.  10h    DWORD    ptr to table of video DAC Color registers to override
  737.             Table is ??? triplets ??? of BYTEs???
  738.  14h    BYTEs    array of mode values to which this profile is to pertain
  739.     BYTE    FFh end of array
  740.  
  741. Format of System ROM:
  742.  Address     ByteSize    Description
  743.  F000h:6000h  32768    IBM PC ROM BASIC
  744.  F000h:E000h   8192    original IBM PC ROM BIOS
  745.  F000h:E739h    .    original IBM PC INT 14 handler
  746.  F000h:E82Eh    .    original IBM PC INT 16 handler
  747.  F000h:EC59h    .    original IBM PC INT 13 handler
  748.  F000h:EFD2h    .    original IBM PC INT 17 handler
  749.  F000h:F065h    .    original IBM PC INT 10 handler
  750.  F000h:F841h    .    original IBM PC INT 12 handler
  751.  F000h:F84Dh    .    original IBM PC INT 11 handler
  752.  F000h:F859h    .    original IBM PC INT 15 handler
  753.  F000h:FE6Eh    .    original IBM PC INT 1A handler
  754.  FFFFh:0000h      5    reset jump 
  755.  FFFFh:0005h      8    ASCII BIOS date
  756.  FFFFh:000Dh      1    ??? (generally unused or used to fix ROM checksum)
  757.  FFFFh:000Eh      1    machine type code (see INT 15h/AH=C0h)
  758.  FFFFh:0010h  65520    HMA (when A20 enabled)
  759.  
  760. -----------CONTRIBUTORS----------------------
  761. Wim Osterholt    <wim@djo.wtm.tudelft.nl> or Wim Osterholt 2:512/56
  762.     EHD floppy = 'KEGAN 4.0M Floppy Drive Controller.',
  763.              'ACME FX4-K7tb2 v:2.5 11/5/91'
  764. Stanley Appel   <appel@stack.urc.tue.nl>
  765.