home *** CD-ROM | disk | FTP | other *** search
/ Software Collection (I) / TOOLS.iso / f30 / source / bios.rem next >
Encoding:
Text File  |  1993-02-23  |  78.6 KB  |  1,681 lines

  1.  
  2.  
  3.                    ===========================================
  4.                        SOURCER REMARKS FILE - BIOS REMARKS
  5.                    ===========================================
  6.  
  7.  
  8.  :::::::::::::::::::::::::::::::: DATA REMARKS ::::::::::::::::::::::::::::::::
  9.  
  10.     --------- Data Remarks -----------  -------- comments ignored here --------
  11.  
  12. 001 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  13.     █    PRIMARY BIOS DATA AREA     █
  14.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  15.     RS-232 port addresses                     rs232_1
  16. 002 Printer port addresses                    prn_1
  17. 003 Equipment installed info bits             equip_install
  18.      15  14  13   12   11  10   9   8
  19.      \    /      game  \       /
  20.      # of print  port  # of RS-232
  21.      ports 0-3   used   ports 0-4
  22.  
  23.      7   6    5    4    3   2   1   0
  24.      \   /    \    /    \   / Math  |
  25.      # of   video mode  RAM    uP  no
  26.      disk-  at boot up  00=16K    dsk
  27.      ettes  00=EGA/VGA  01=32K   driv
  28.       1-4   01=CGA-40   10=48K   if 0
  29.      if bit 10=CGA-80   11=64K
  30.      0 = 1  11=MDA-80   (old PCs)
  31.  
  32.     Note: bit 13=modem on PC lap-tops
  33.           bit 2=mouse on MCA & others
  34.       
  35. 004 Manufacturing Test Byte                   manufactr_test
  36.      bit 0 = 1 while in test mode
  37.      MCA systems use other bits
  38.        during POST operations
  39. 005 Base memory size 0-1Meg, 1K steps         main_ram_size
  40. 006 Manufacturing test error codes            error_codes
  41. 007 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  42.     █         KEYBOARD DATA         █
  43.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  44.     Keyboard flag bits                        keybd_flags_1
  45.       7   6   5   4    3   2   1   0
  46.     ins- cap num scrl alt ctl lef rig
  47.     sert --toggles--- --shifts down--
  48.  
  49. 008 Keyboard flag bits                        keybd_flags_2
  50.        7     6     5     4     
  51.     insert  caps  num  scroll
  52.     ------now depressed------
  53.  
  54.        3     2     1     0
  55.      pause  sys   left right
  56.      lock request -alt-down-
  57.        
  58. 009 Alt & digit pad number buffr area         keybd_alt_num
  59. 00A Head ptr of circular key queue            keybd_q_head
  60.       empty if head ptr = tail ptr
  61. 00B Tail ptr of circular key queue            keybd_q_tail
  62.       empty if head ptr = tail ptr
  63. 00C 15 key queue for keyboard                 keybd_queue
  64. 00D                                           unused
  65. 00E █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  66.     █          DISK DATA            █
  67.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  68.      Recalibrate floppy drive bits             dsk_seek_stat
  69.         3       2       1       0
  70.      drive-3 drive-2 drive-1 drive-0
  71.  
  72.      bit 7 = interrupt flag
  73.      
  74. 00F Motor running status & disk write         dsk_motor_stat
  75.      bit 7=1 disk write in progress
  76.      bits 6&5 = drive selected 0 to 3
  77.         3       2       1       0
  78.      drive-3 drive-2 drive-1 drive-0
  79.      --------- 1=motor on-----------
  80.  
  81. 010 Motor timer, at 0, turn off motor         dsk_motor_tmr
  82. 011 Controller return code                    dsk_ret_code
  83.      00h = ok
  84.      01h = bad command or parameter
  85.      02h = can't find address mark
  86.      03h = can't write, protected dsk
  87.      04h = sector not found
  88.      08h = DMA overrun
  89.      09h = DMA attempt over 64K bound
  90.      10h = bad CRC on disk read
  91.      20h = controller failure
  92.      40h = seek failure
  93.      80h = timeout, no response
  94.  
  95. 012 Status bytes-disk controller chip         dsk_ctrl_stat
  96.      Note: 7 info bytes returned from
  97.      controller are saved here. Refer
  98.      to the NEC uPD 765 chip manual
  99.      for the specific info, depending
  100.      on the previous command issued.
  101. 013                                           unused
  102. 014 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  103.     █          VIDEO DATA           █
  104.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  105.     Present display mode(see int 10h)         video_mode
  106. 015 Number of columns                         video_columns
  107. 016 Video buffer size in bytes                video_buf_size
  108.       Note: size may be rounded up to
  109.       the nearest 2K boundary.  For
  110.       example, 80x25 mode=4000 bytes,
  111.       but value may be 4096.
  112. 017 Video page offset of the active           video_pag_off
  113.       page, from start of current 
  114.       video segment.
  115. 018 Cursor position page 0                   video_cur_pos0
  116.       bits 15-8=row, bits 7-0=column
  117. 019 Cursor position page 1                   video_cur_pos1
  118.       bits 15-8=row, bits 7-0=column
  119. 01A Cursor position page 2                   video_cur_pos2
  120.       bits 15-8=row, bits 7-0=column
  121. 01B Cursor position page 3                   video_cur_pos3
  122.       bits 15-8=row, bits 7-0=column
  123. 01C Cursor position page 4                   video_cur_pos4
  124.       bits 15-8=row, bits 7-0=column
  125. 01D Cursor position page 5                   video_cur_pos5
  126.       bits 15-8=row, bits 7-0=column
  127. 01E Cursor position page 6                   video_cur_pos6
  128.       bits 15-8=row, bits 7-0=column
  129. 01F Cursor position page 7                   video_cur_pos7
  130.       bits 15-8=row, bits 7-0=column
  131.  
  132. 020 Active cursor, start & end lines         video_cur_mode
  133.       bits 12 to 8 for starting line
  134.       bits 4  to 0 for ending line
  135. 021 Present page                             video_page
  136. 022 Video controller base I/O address        video_port
  137. 023 Hardware mode register bits              video_mode_reg
  138. 024 Color set in CGA modes                   video_color
  139. 025 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  140.     █         GENERAL DATA          █
  141.     █ Note: next 5 bytes also used  █
  142.     █    for cassette interface in  █
  143.     █    the original PC.           █
  144.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  145.     General use offset pointer               @gen_use_ptr
  146. 026 General use segment                      gen_use_seg
  147. 027 Unused interrupt occurred                gen_int_occurd
  148.       value holds the IRQ bit 7-0 of
  149.       the interrupt that occurred
  150. 028 Timer, low word, cnts every 55 ms        timer_low
  151. 029 Timer, high word                         timer_hi
  152. 02A Timer overflowed, set to 1 when          timer_rolled
  153.      more than 24 hours have elapsed
  154. 02B Bit 7 set if break key depressed         keybd_break
  155. 02C Boot (reset) type                        gen_warm_boot
  156.       1234h=warm boot, no memory test       
  157.       4321h=boot & save memory
  158.             (PS/2 with MCA only)
  159. 02D █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  160.     █        HARD DISK DATA         █
  161.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  162.     Hard disk status                         hdsk_status_1
  163.      00h = ok
  164.      01h = bad command or parameter
  165.      02h = can't find address mark
  166.      03h = can't write, protected dsk
  167.      04h = sector not found
  168.      05h = reset failure
  169.      07h = activity failure
  170.      08h = DMA overrun
  171.      09h = DMA attempt over 64K bound
  172.      0Ah = bad sector flag
  173.      0Bh = removed bad track
  174.      0Dh = wrong # of sectors, format
  175.      0Eh = removed control data addr
  176.             mark
  177.      0Fh = out of limit DMA
  178.             arbitration level
  179.      10h = bad CRC or ECC, disk read
  180.      11h = bad ECC corrected data
  181.      20h = controller failure
  182.      40h = seek failure
  183.      80h = timeout, no response
  184.      AAh = not ready
  185.      BBh = error occurred, undefined
  186.      CCh = write error, selected dsk
  187.      E0h = error register = 0
  188.      FFh = disk sense failure
  189.        
  190. 02E Number of hard disk drives               hdsk_count
  191. 02F Head control (XT only)                   hdsk_head_ctrl
  192. 030 Hard disk control port (XT only)         hdsk_ctrl_port
  193. 031 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  194.     █ I/O PORT TIMER, KEYBOARD DATA █
  195.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  196.     Countdown timer waits for printer        prn_timeout_1
  197.       to respond (printer 1)
  198. 032 Countdown timer waits for printer        prn_timeout_2
  199.       to respond 
  200. 033 Countdown timer waits for RS-232         rs232_timout_1
  201.       port to respond (port 1)        
  202. 034 Countdown timer waits for RS-232         rs232_timout_2
  203.       port to respond                  
  204. 035 Ptr to beginning of keybd queue          @keybd_begin
  205. 036 Ptr to end of keyboard queue             @keybd_end
  206. 037 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  207.     █  ADVANCED VIDEO DATA, EGA/VGA █
  208.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  209.     Rows of characters on display - 1        video_rows
  210. 038 Number of pixels per charactr * 8        video_pixels
  211. 039 Display adapter options                  video_options
  212.       bit 7 = clear RAM
  213.       bits 6,5 = memory on adapter
  214.                   00 - 64K
  215.                   01 - 128K
  216.                   10 - 192K
  217.                   11 - 256K
  218.       bit 4 = unused
  219.       bit 3 = 0 if EGA/VGA active
  220.       bit 2 = wait for display enable
  221.       bit 1 = 1 - mono monitor
  222.             = 0 - color monitor
  223.       bit 0 = 0 - handle cursor, CGA
  224. 03A Switch setting bits from adapter         video_switches
  225.       bits 7-4 = feature connector
  226.       bits 3-0 = option switches
  227. 03B Video save area 1-EGA/VGA control        video_1_save
  228.       bit 7 = 200 line mode
  229.       bits 6,5 = unused
  230.       bit 4 = 400 line mode
  231.       bit 3 = no palette load
  232.       bit 2 = mono monitor
  233.       bit 1 = gray scale
  234.       bit 0 = unused
  235. 03C Video save area 2                        video_2_save
  236. 03D █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  237.     █ OTHER FLOPPY & HARD DISK DATA █
  238.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  239.     Last data rate for diskette              dsk_data_rate
  240.      bits 7 & 6 = 00 for 500K bit/sec
  241.                 = 01 for 300K bit/sec
  242.                 = 10 for 250K bit/sec
  243.      bits 5 & 4 = step rate
  244.     Rate at start of operation
  245.      bits 3 & 2 = 00 for 500K bit/sec
  246.                 = 01 for 300K bit/sec
  247.                 = 10 for 250K bit/sec
  248. 03E Hard disk status                         hdsk_status_2
  249. 03F Hard disk error                          hdsk_error
  250. 040 When the hard disk controller's          hdsk_complete
  251.      task is complete, this byte is
  252.      set to FFh (from interrupt 76h)
  253. 041 Diskette controller information          dsk_options
  254.      bit 6 = 1 Drv 1 type determined
  255.          5 = 1 Drv 1 is multi-rate
  256.          4 = 1 Drv 1 change detect
  257.          2 = 1 Drv 0 type determined
  258.          1 = 1 Drv 0 is multi-rate
  259.          0 = 1 Drv 0 change detect
  260. 042 Media state for diskette drive 0         dsk_media_st0
  261.         7      6      5      4
  262.      data xfer rate  two   media
  263.       00=500K bit/s  step  known
  264.       01=300K bit/s
  265.       10=250K bit/s
  266.         3      2      1      0
  267.      unused  -----state of drive-----
  268.              bits floppy  drive state
  269.              000=  360K in 360K, ?
  270.              001=  360K in 1.2M, ?
  271.              010=  1.2M in 1.2M, ?
  272.              011=  360K in 360K, ok
  273.              100=  360K in 1.2M, ok
  274.              101=  1.2M in 1.2M, ok
  275.              111=  720K in 720K, ok
  276.                or 1.44M in 1.44M
  277. 043 Media state for diskette drive 1         dsk_media_st1
  278.      (see dsk_media_st0)
  279. 044 Starting state for drive 0               dsk_start_st0
  280. 045 Starting state for drive 1               dsk_start_st1
  281. 046 Current track number for drive 0         dsk_track_0
  282. 047 Current track number for drive 1         dsk_track_1
  283. 048 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  284.     █    ADVANCED KEYBOARD DATA     █
  285.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  286.     Special keyboard type and mode           keybd_flags_3
  287.      bit 7 Reading ID of keyboard
  288.          6 last char is 1st ID char
  289.          5 force num lock
  290.          4 101/102 key keyboard
  291.          3 right alt key down
  292.          2 right ctrl key down
  293.          1 E0h hidden code last
  294.          0 E1h hidden code last
  295.        
  296. 049 Keyboard Flags (advanced keybd)          keybd_flags_4
  297.       7      6       5     4  3 2 1 0
  298.     xmit   char   Resend  Ack   \   /
  299.     error was ID  Rec'd  Rec'd   LEDs
  300.  
  301. 04A █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  302.     █  REAL-TIME CLOCK & LAN DATA   █
  303.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  304.     Ptr offset to wait done flag             @timer_wait_off
  305. 04B Ptr segment to wait done flag            @timer_wait_seg
  306. 04C Timer low word, 1 microsecond clk        timer_clk_low
  307. 04D Timer high word                          timer_clk_hi
  308. 04E Timer flag 00h = post acknowledgd        timer_clk_flag
  309.                01h = busy
  310.                80h = posted
  311. 04F Local area network bytes (7)             lan_1
  312. 050                                          unused
  313. 051 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  314.     █   MORE ADVANCED VIDEO DATA    █
  315.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  316.     Pointer to a save table of more          @video_sav_tbl
  317.     pointers for the video system 
  318.                SAVE TABLE
  319.      offset type    pointer to
  320.      ────── ──── ────────────────────
  321.        0     dd  Video parameters
  322.        4     dd  Parms save area
  323.        8     dd  Alpha char set
  324.       0Ch    dd  Graphics char set
  325.       10h    dd  2nd save ptr table
  326.       14h    dd  reserved (0:0)
  327.       18h    dd  reserved (0:0)
  328.      
  329.      2ND SAVE TABLE (from ptr above)
  330.      offset type functions & pointers
  331.      ────── ──── ────────────────────
  332.        0     dw  Bytes in this table
  333.        2     dd  Combination code tbl
  334.        6     dd  2nd alpha char set
  335.       0Ah    dd  user palette tbl
  336.       0Eh    dd  reserved (0:0)
  337.       12h    dd  reserved (0:0)
  338.       16h    dd  reserved (0:0)
  339.  
  340. 052 unused
  341. 053 unused
  342. 054 unused
  343. 055 unused
  344. 056 Days since 1-Jan-1980 counter
  345. 057 Print screen status                      prn_scrn_stat
  346.        00h = Print screen ready
  347.        01h = Print screen in progress
  348.        FFh = Error occurred
  349. 058                                          unused
  350. 059                                          unused
  351. 05A                                          unused
  352. 05B                                          unused
  353. 05C                                          unused
  354. 05D █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  355.     █     Floppy Disk Parameters    █
  356.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  357.      hi nibble = stepping rate in ms
  358.      lo nibble = head unload time, ms
  359. 05E  2nd info byte bit 0 = 0 for DMA
  360. 05F  Delay after use for motor off
  361. 060  Bytes per sector  0 =  128 bytes
  362.                        1 =  256 bytes
  363.                        2 =  512 bytes
  364.                        3 = 1024 bytes
  365. 061  Number of sectors per track
  366. 062  Gap Length
  367. 063  Data Length
  368. 064  Format Gap Length
  369. 065  Format write byte
  370. 066  Head load time, in milliseconds
  371. 067  Motor startup wait time * .125ms
  372. 068 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  373.     █    Video Hardware Registers   █
  374.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  375.       mode CGA 40 columns x 25 lines
  376. 069   mode CGA 80 columns x 25 lines
  377. 06A   mode CGA graphics
  378. 06B   mode MDA 80 columns x 25 lines
  379. 06C Video buffer bytes CGA 40x25
  380. 06D Video buffer bytes CGA 80x25
  381. 06E Video buffer bytes CGA Graphics
  382. 06F Video buffer bytes CGA Graphics
  383. 070 Video columns per modes 0-7
  384. 071 Video hardware modes (0-7)
  385. 072 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█        dsk_info_table
  386.     █ Hard Disk Information Tables  █
  387.     █                               █
  388.     █   Each sub-table contains a   █
  389.     █   a set of 16 bytes for each  █
  390.     █   particular disk type.       █
  391.     █                               █
  392.     █   Type number specified may   █
  393.     █   differ with manufactures    █
  394.     █   specification.  The hard    █
  395.     █   disk table shown here       █
  396.     █   assumes the first entry     █
  397.     █   is type 0.                  █
  398.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  399.      Number of cylinders, hdsk_type_0
  400. 073  Number of heads
  401. 074  Low write current cyl begin *
  402. 075  Write pre-compensation cylinder
  403. 076  Error correction burst length *
  404. 077  Miscellaneous bit functions:
  405.        bits 0-2 disk option, XT only*
  406.             0-2 unused, all others
  407.             3 = 1 if > 8 heads
  408.             4   unused
  409.             5 = 1 for bad map at last
  410.                  cylinder + 1
  411.             6 or 7 = 1 no retries
  412. 078  Normal timeout *
  413. 079  Format timeout *
  414. 07A  Check timeout  *
  415. 07B  Parking cylinder number
  416. 07C  Number of sectors per track
  417. 07D  Unused
  418.         * indicates XT machines only
  419. 07E Unused
  420. 07F Video characters in graphic modes        video_char_table
  421. 080 Characters, EGA  8x14 font
  422. 081 Characters, EGA  8x8 font (0-7F)
  423. 082 Characters, EGA  8x8 font (80-FF)
  424. 083 Character changes, EGA  8x14 font
  425. 084 Characters, VGA  8x16 font
  426. 085 Character changes, VGA  9x16 font
  427. 086 Video VGA parameter table ptr
  428. 087 Initial interrupt vectors                int_vec_table
  429. 088 BIOS version date code                   rom_versn_date
  430. 089 Model  FFh = PC                          model_type
  431.            FEh = 1st XT
  432.            FBh = later XTs
  433.            FCh = AT type (286-486)
  434.            FAh = models 25/30
  435.            F9h = IBM lap-tops
  436.            F8h = models 70/80 (80386)
  437. 08A Extended BIOS data (PS/2)or printer 4    BIOS_data_seg
  438.       Printer 4 (PC,XT,AT & compatibles)
  439. 08B █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█        VGA_parm_tbl
  440.     █   Video VGA Parameter Tables  █
  441.     █                               █
  442.     █   64 byte sub-table per mode  █
  443.     █  offset/size     function     █
  444.     █  -- --------  --------------  █
  445.     █   0  1 byte   # of columns    █
  446.     █   1  1 byte   # of rows       █
  447.     █   2  1 byte   # bytes/char    █
  448.     █   3  1 word   # bytes/page    █
  449.     █   5  5 bytes  sequencer regs  █
  450.     █  10 25 bytes  display regs    █
  451.     █  35 20 bytes  attribute regs  █
  452.     █  55  9 bytes  graphics regs   █
  453.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  454. 08C █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█        baud_rate_tbl
  455.     █        Baud Rate Table        █
  456.     █                               █
  457.     █   Table of hex divisors for   █
  458.     █   the serial ports.   Table   █
  459.     █   divisors for bauds 110 to   █
  460.     █   9600, and 19,200 on some.   █
  461.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  462.     110 Baud rate divisor
  463. 08D █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█        Config_tbl_size
  464.     █   System Configuration Table  █
  465.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  466.     Size of table in bytes
  467. 08E Model type
  468.       0F8h = 80386 model 70-80 types
  469.       0FCh = 80286 model 50-60 types
  470.              also most 80286-80486
  471.              compatibles
  472.       0FAh = 8088/86 model 25-30 type
  473. 08F Sub-Model type 
  474. 090 BIOS revision number
  475. 091 Feature information
  476.       bit 7=1, hard disk uses DMA 3
  477.       bit 6=1, dual interrupt chips
  478.       bit 5=1, has real-time-clock
  479.       bit 4=1, int 15h, ah=4Fh is
  480.                supported (keyboard)
  481.       bit 3=1, external wait support
  482.       bit 2=1, has extended BIOS RAM
  483.       bit 1=1, micro-channel
  484.       bit 0=1, unused
  485. 092 Information bytes (future use)
  486. 093 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  487.     █       Interrupt Vectors       █
  488.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  489.     Divide error
  490. 094 Single Step
  491. 095 NMI
  492. 096 Debug
  493. 097 Overflow
  494. 098 Print Screen
  495. 099 Timer Ticks
  496. 09A Keyboard
  497. 09B Serial
  498. 09C Serial
  499. 09D Disk
  500. 09E Diskette
  501. 09F Bad Interrupt
  502. 0A0 Video
  503. 0A1 Equipment
  504. 0A2 Memory Size
  505. 0A3 Disk Services
  506. 0A4 General Services
  507. 0A5 ROM Basic
  508. 0A6 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  509.     █         ROM BEGINNING         █
  510.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  511.     ROM signature word
  512. 0A7 Number of 512 byte pages
  513. 0A8 unused
  514. 0A9 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  515.     █     FONT - 8 wide, 14 high    █
  516.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  517.     Video character font
  518. 0AA █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  519.     █     FONT - 8 wide, 8 high     █
  520.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  521.     Video characters 0-127
  522. 0AB █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  523.     █     FONT - 8 wide, 8 high     █
  524.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  525.     Video characters 128-255
  526. 0AC █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  527.     █     FONT - 9 wide, 14 high    █
  528.     █                               █
  529.     █  First byte indicates the     █
  530.     █    character to replace       █
  531.     █  Followed by 14 bytes of data █
  532.     █    (the 9th bit is provided   █
  533.     █    by the EGA/VGA adapter     █
  534.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  535.     Video character font
  536. 0AD █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  537.     █     FONT - 8 wide, 16 high    █
  538.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  539.     Video character font
  540. 0AE █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  541.     █     FONT - 9 wide, 16 high    █
  542.     █                               █
  543.     █  First byte indicates the     █
  544.     █    character to replace       █
  545.     █  Followed by 16 bytes of data █
  546.     █    (the 9th bit is provided   █
  547.     █    by the EGA/VGA adapter     █
  548.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  549.     Video character font
  550. 0AF █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  551.     █       VIDEO MODE TABLES       █
  552.     █                               █
  553.     █ Note: The following structure █
  554.     █       is based on most EGA/   █
  555.     █       VGA adapters.  Since    █
  556.     █       they are used only      █
  557.     █       internally the table    █
  558.     █       may not follow the      █
  559.     █       standard shown.         █
  560.     █                               █
  561.     █  EGA Cards - Mode order       █
  562.     █       0-0Fh, 10h normal       █
  563.     █       0Fh, 10h  16K RAM EGA   █
  564.     █       0-3, high res emulate   █
  565.     █  VGA Cards - Mode order       █
  566.     █       0-Fh, 10-13h normal     █
  567.     █       0-3, high res emulate   █
  568.     █                               █
  569.     █  THIS IS A GUIDELINE AND MAY  █
  570.     █  VARY DEPENDING ON THE CARD   █
  571.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  572.     Number of columns on display
  573. 0B0 Number of rows on display
  574. 0B1 Pixels per character
  575. 0B2 Bytes per page
  576. 0B3 Sequencer register values
  577. 0B4 Miscellaneous register value
  578. 0B5 CRT controller register values
  579. 0B6 Attribute register values
  580. 0B7 Graphics register values
  581. 0B8 System boot 
  582. 0B9 Key Scan-Code Translate Table
  583. end
  584.  
  585.  
  586.  
  587.  :::::::::::::::::::::::::::::: LOCATION REMARKS ::::::::::::::::::::::::::::::
  588.  
  589.     ----------------------- Location Reference Remarks ------------------------
  590.  
  591. 01
  592.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1 ▒▒▒▒▒▒▒
  593.      
  594.        SINGLE STEP
  595.  
  596.  
  597. 02
  598.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 2 ▒▒▒▒▒▒▒
  599.      
  600.       NON-MASKABLE HARDWARE INTERRUPT
  601.      
  602.          This function is called in the event of a memory parity error or may
  603.          occur in the event of other hardware problems or failures (depends on
  604.          the specific manufacturer's hardware).  Displays the appropriate
  605.          error message and halts the processor.
  606.  
  607. 03
  608.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 3 ▒▒▒▒▒▒▒
  609.      
  610.       DEBUG BREAKPOINT
  611.  
  612. 04
  613.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 4 ▒▒▒▒▒▒▒
  614.      
  615.       OVERFLOW
  616.  
  617. 05
  618.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 5 ▒▒▒▒▒▒▒
  619.      
  620.       PRINT SCREEN
  621.      
  622.          Send the present active display screen contents to the printer if
  623.          the printer is idle and not out of paper.  The status of the print
  624.          screen function is in prn_screen_stat at 0050:0000.  Control-Break
  625.          will terminate an active print screen operation.
  626.  
  627. 06
  628.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 6 ▒▒▒▒▒▒▒
  629.      
  630.       BAD OPCODE DETECTED
  631.  
  632. 07
  633.  
  634. 08
  635.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 8 ▒▒▒▒▒▒▒
  636.      
  637.       TIMER TICKS  (called by hardware 8259-1, IRQ 0)
  638.           
  639.          This is the primary timer used to control the clock and other key
  640.          system resources.  It is called indirectly by channel A of the 8253
  641.          timer every 18.2 milliseconds.  Every timer tick also calls int 1Ch
  642.          for user needs (int 1Ch points to an iret instruction unless changed
  643.          by a resident program).  The timer interrupt is given the highest
  644.          maskable interrupt priority upon power up.
  645.      
  646.          The main timing functions of int 8 include increment of a 32-bit
  647.          time since powered on counter, timer_hi and timer_low, and after 24
  648.          hours since powered on, timer_rolled is incremented.
  649.      
  650.          The last task of int 8 is turning off the floppy drive motor after
  651.          2 seconds of non-use.  The counter dsk_motor_tmr is decremented upon
  652.          each occurrence of int 8.  When the count reaches zero, the motor is
  653.          set off, and the motor running flags are cleared in dsk_motor_stat.
  654.  
  655. 09
  656.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 9 ▒▒▒▒▒▒▒
  657.      
  658.       KEYBOARD I/O  (called by hardware 8259-1, IRQ 1)
  659.      
  660.          When any key is pressed on the keyboard, the hardware calls this
  661.          interrupt to service the pressed key or key combination.   The
  662.          hardware provides the key pressed in a non-ASCII scan code format
  663.          read at i/o port 60h.  The servicer acknowledges receipt of the key
  664.          by toggling bit 7 of port 61h.  (Port 61h should be read first, then
  665.          bit 7 ored on, output to port 61h, then anded off, and resent to
  666.          port 61h).
  667.      
  668.          The read key is decoded to yield an ASCII character, special function
  669.          key (such as F1) or a control function like Left Shift Key down.
  670.          The converted ASCII character is placed into the next available
  671.          position in the circular queue keybd_queue to keybd_q_end.  It is
  672.          put in the position indicated by keydb_q_tail when it will not
  673.          cause the loss of earlier entered data.  The value keybd_q_head
  674.          points to the oldest key pressed in the buffer which has not been
  675.          removed from the queue (the normal process uses int 16h to remove
  676.          keys from the queue and return the key value to the int 16h caller).
  677.      
  678.          The 16 word queue holds up to 16 keys.  If keybd_q_head equals the
  679.          keybd_q_tail, the queue is empty.  Valid keys in the queue comprise
  680.          the upper byte scan code and the lower byte ASCII character.  If the
  681.          key pressed has no ASCII equivalent (i.e F1 to F12), the lower byte
  682.          is zero.
  683.      
  684.          Toggle and shift keys are not placed in the buffer, but appear in 2
  685.          status registers keybd_flags_1 and keybd_flags_2.
  686.      
  687.          Special key combinations will cause other events to occur:
  688.             Ctrl-Alt_Del  -  Reset computer by jumping to power_on_reset
  689.             Print screen  -  Call int_5_prn_scrn to print the current screen
  690.             Ctrl-Break    -  Call int_1Bh control break key processor (DOS)
  691.             Pause         -  Wait until an ASCII key is pressed, without
  692.                                placing the key in the queue
  693.             Ctrl-Num Lock -  Wait until an ASCII key is pressed, without
  694.                                placing the key in the queue
  695.             Ctrl-Prt Scn  -  Toggle keyboard echo to printer
  696.             Sys Req       -  Issue an interrupt 15h, ax=8500h when pressed, 
  697.                                and  interrupt 15h, ax=8501h when released
  698.             Alt-Keypad    -  Convert decimal and insert into the BIOS 
  699.                                keyboard buffer
  700.             Shift keys    -  Save the new shift state (Ctrl, Alt, Shift, 
  701.                                Insert, Caps Lock, Num Lock, Scroll Lock)
  702.  
  703. 0A
  704.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Ah ▒▒▒▒▒
  705.      
  706.       General Adapter Use (called by hardware 8259-1, IRQ 2 - see below)
  707.      
  708.          On systems equipped with 2 interrupt controller chips (8259), IRQ 2
  709.          is used to support the second interrupt controller.  In this case,
  710.          int 71h (IRQ 9) is used to replace IRQ 2.  Hardware calls to int 71h
  711.          are redirected to this interrupt to maintain compatibility.
  712.  
  713. 0B
  714.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Bh ▒▒▒▒▒
  715.      
  716.       RS-232 SERIAL HANDLER (called by hardware 8259-1, IRQ 3)
  717.      
  718.          Called by the secondary serial port chip.
  719.  
  720. 0C
  721.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Ch ▒▒▒▒▒
  722.      
  723.       RS-232 SERIAL HANDLER (called by hardware 8259-1, IRQ 4)
  724.      
  725.          Called by the primary serial port chip.
  726.  
  727. 0D
  728.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Dh ▒▒▒▒▒
  729.      
  730.       XT HARD DISK CONTROLLER (called by hardware 8259-1, IRQ 5)
  731.  
  732. 0E
  733.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Eh ▒▒▒▒▒
  734.      
  735.       FLOPPY DISK CONTROLLER (called by hardware 8259-1, IRQ 6)
  736.  
  737. 0F
  738.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Fh ▒▒▒▒▒
  739.      
  740.       PRINTER CONTROLLER (called by hardware 8259-1, IRQ 7)
  741.      
  742.          This interrupt is normally avoided.  If a bad interrupt occurs,
  743.          it will vector to this spot (when caused by a misprogrammed 8259
  744.          interrupt controller)
  745.  
  746. 10
  747.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 10h ▒▒▒▒▒
  748.      
  749.       VIDEO DISPLAY SERVICES
  750.      
  751.          Called with:  ah = primary function number
  752.      
  753.          Returns: (unless otherwise indicated)
  754.                        ax - altered (some systems may not alter ax)
  755.      
  756.          Functions:
  757.            ah = 0     Set video display mode in al.
  758.            ah = 1     Set cursor size
  759.                         Call with:  ch = top line, 0-32
  760.                                     cl = bottom line, 0-32
  761.            ah = 2     Set cursor location
  762.                         Call with:  bh = page number, 0 = 1st page
  763.                                     dh = row (0 for top row)
  764.                                     dl = column (0 for leftmost)
  765.            ah = 3     Get cursor location
  766.                         Call with:  bh = page number, 0 = 1st page
  767.                         Returns:    ch/cl = cursor size (top & bottom)
  768.                                     dh/dl = row and column of cursor
  769.            ah = 4     Get light pen location
  770.                         Returns:    ah = 0 not on/unsupported & bx,cx,dx changed
  771.                                          1 status valid
  772.                                     bx = pixel column
  773.                                     cx = horizontal line number
  774.                                     dh/dl = row and column
  775.            ah = 5     Set Page number al, 0 = 1st page
  776.            ah = 6     Up scroll screen
  777.                         Call with:  al = # bottom lines to clear, set 0 for all
  778.                                     bh = attribute to fill cleared lines
  779.                                     ch/cl = row/column of top left scroll corner
  780.                                     dh/dl = row/column of bottom right scroll corner
  781.            ah = 7     Down scroll screen
  782.                         Call with:  al = # top lines to clear, set 0 for all
  783.                                     bh = attribute to fill cleared lines
  784.                                     ch/cl = row/column of top left scroll corner
  785.                                     dh/dl = row/column of bottom right scroll corner
  786.            ah = 8     Get character & attribute at cursor
  787.                         Call with:  bh = page number, 0 = 1st page
  788.                         Returns:    ah/al = attribute/character
  789.            ah = 9     Write character & attribute at cursor (graphics modes)
  790.                         Call with:  al = character
  791.                                     bh = page number, 0 = 1st page
  792.                                     bl = attribute, bit 7 = 1 to xor with old color
  793.                                     cx = Number of same characters to write
  794.            ah = 0Ah   Write character at cursor (graphics modes)
  795.                         Call with:  al = character
  796.                                     bh = page number, 0 = 1st page
  797.                                     cx = Number of same characters to write
  798.            ah = 0Bh   Set colors (typically in low res modes)
  799.                         Call with:  bh = 0, bl = color low res background, border
  800.                                     bh = 1, bl = 0/1 for low res color group 0/1
  801.            ah = 0Ch   Write graphics dot
  802.                         Call with:  al = color, bit 7 = 1 to xor bit with old color
  803.                                     cx/dx = pixel row/pixel column
  804.            ah = 0Dh   Read graphics dot
  805.                         Call with:  cx/dx = pixel row/pixel column
  806.            ah = 0Eh   Write in ASCII mode (cr, lf, bell, and bs as operators)
  807.                         Call with:  al/bl = character/color
  808.            ah = 0Fh   Get video info
  809.                         Returns:    ah = columns active
  810.                                     al = active video mode
  811.                                     bh = active page, 0 = 1st page
  812.            ah = 10h   Colors  (EGA/VGA)   Called with al = subfunction
  813.                         al = 1    bl = color register (0-15)  bh = color to set
  814.                         al = 2    es:dx = ptr to change all 16 colors & overscan #
  815.                         al = 3    bl = color high bit as: 0-intensity, 1-blink
  816.                       For VGA equipped systems only
  817.                         al = 7    bl = color register to get in bh
  818.                         al = 8    bh = returned overscan value
  819.                         al = 9    es:dx = ptr where to put all 16 colors & overscan
  820.                         al = 10h  bx = color register to set; ch/cl/dl = grn/blu/red
  821.                         al = 12h  es:dx = ptr to change color registers
  822.                                   bx = 1st register to set, cx = # of registers
  823.                         al = 13h  bl = 0, set color page mode in bh
  824.                                   bl = 1, set page;  bh = page number
  825.                         al = 15h  bx = color reg to read; ch/cl/dl = grn/blu/red
  826.                         al = 17h  es:dx = ptr where to load color regs
  827.                                   bx = 1st register to get, cx = # of registers
  828.                         al = 1Ah  get color page info; bl = mode; bh = page #
  829.            ah = 11h   Reset mode with new character set (leave memory as-is)
  830.                         al = 0    Character set load
  831.                                   es:bp = ptr to table of chars
  832.                                   bl/bh = which block/bytes per char
  833.                                   cx/dx = # of characters/where to start in block
  834.                         al = 1    bl = block to load the mono character set
  835.                         al = 2    bl = block to load the double wide character set
  836.                         al = 3    bl = block select related to attribute
  837.                         al = 4    bl = block to load the 8 by 16 set (VGA)
  838.                         al = 10h - 14h same as 0 - 4, must occur after setting mode
  839.                         al = 20h  es:bp = ptr to table of char, using int 1Fh ptr
  840.                         al = 21h  es:bp = ptr to table of char, using int 43h ptr
  841.                                   bl = 0-dl=# rows; 1-14 rows; 2-25 rows; 3-43 rows
  842.                                   cx = number of bytes per character in table
  843.                         al = 22h  use 8 by 14 char set, bl=rows (see al=21h)
  844.                         al = 23h  use double wide char set, bl=rows (see al=21h)
  845.                         al = 24h  use 8 by 16 char set, bl=rows (see al=21h)
  846.                       Get table pointer and info
  847.                         al = 30h  es:bp = ptr returned; cx=bytes per char; dl=rows
  848.                                   bh = 0, get int 1Fh      bh = 4, get double wide
  849.                                   bh = 1, get int 43h      bh = 5, get mono 9 by 14
  850.                                   bh = 2, get 8 by 14      bh = 6, get 8 by 16 (VGA)
  851.                                   bh = 3, get double wide  bh = 7, get 9 by 16 (VGA)
  852.            ah = 12h   Miscellaneous functions, bl = sub-function
  853.                         bl = 10h  Get info,  bh = 0-now color, 1-now mono
  854.                                   ch/cl = info bits/switches
  855.                         bl = 20h  Set print screen to work with EGA/VGA
  856.                       Functions for VGA only (bl = 30-34h return al = 12h)
  857.                         bl = 30h  Set # of scan lines, 0-200, 1-350, 2-400
  858.                                     activates after mode change
  859.                         bl = 31h  ax = 0/1  allow/prevent palette load with new mode
  860.                         bl = 32h  al = 0/1  video off/on
  861.                         bl = 33h  al = 0/1  gray scale summing off/on
  862.                         bl = 34h  al = 0/1  scale cursor size to font off/on
  863.                         bl = 35h  switch between adapter and motherboard video
  864.                                   al = 0, adapter off, es:dx = save state area
  865.                                   al = 1, motherboard on
  866.                                   al = 2, active video off, es:dx = save area
  867.                                   al = 3, inactive video on, es:dx = save area
  868.                         bl = 36h  al = 0/1  screen off/on
  869.            ah = 13h   Write character string (cr, lf, bell, and bs as operators)
  870.                         Call with:  al = 0/1 write characters, cursor not/is moved
  871.                                           bl = attribute of all characters
  872.                                        = 2/3 write characters, cursor not/is moved
  873.                                           string alternates character & attribute
  874.                                     bh = page number, 0 = 1st page
  875.                                     cx = number of characters
  876.                                     dh/dl = row and column to start
  877.                                     es:bp = ptr to character string
  878.            ah = 14h   LCD display support, al = sub-function
  879.                          al = 0,    es:di = ptr to font table to load
  880.                                     bl/bh = which block/bytes per char
  881.                                     cx/dx = # of characters/where to start in block
  882.                          al = 1,    bl = block # of ROM font to load
  883.                          al = 2,    bl = how to support high intensity
  884.            ah = 15h   LCD info table ptr returned in es:di
  885.                          ax = 0      there is no alternate adapter
  886.                          ax = 5140h  LCD is the alternate
  887.                          ax = 5153h  CGA is alternate
  888.                          ax = 5151h  MDA is alternate
  889.      
  890.                               **** VGA SUPPORT ONLY ****
  891.            ah = 1Ah   Get/Set types of displays which are operating
  892.                          al = 0, get displays, returns al = 1Ah
  893.                                  bl = in use display code
  894.                                  bh = alternate display code
  895.                          al = 1, set codes, returns al = 1Ah
  896.                                  bl = in use display code
  897.                                  bh = alternate display code
  898.                          codes:   0 = no display
  899.                                   1 = mono display
  900.                                   2 = CGA
  901.                                   4 = EGA, color
  902.                                   5 = EGA, mono
  903.                                   6 = PGA
  904.                                   7 = VGA, mono  (PS/2 MCA only)
  905.                                   8 = VGA, color (PS/2 MCA only)
  906.                                  Bh = VGA, mono  (PS/2 non MCA)
  907.                                  Ch = VGA, color (PS/2 non MCA)
  908.                                 FFh = display type not known
  909.            ah = 1Bh   Get video system information
  910.                          call with:  bx = 0
  911.                                      es:di = ptr to buffer where to put info
  912.            ah = 1Ch   Video system save & restore, al = sub-function
  913.                          call with:  al = 0, get buffer size
  914.                                         = 1, save system, buffer at es:bx
  915.                                         = 2, restore system, buffer at es:bx
  916.                                      cx bit 0 = 1 for hardware registers
  917.                                         bit 1 = 1 for software states
  918.                                         bit 2 = 1 for colors & DAC registers
  919.  
  920. 11
  921.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 11h ▒▒▒▒▒
  922.      
  923.       EQUIPMENT INSTALLED
  924.      
  925.          Returns:   ax = equip_install word
  926.      
  927.                          15   14   13   12   11   10    9    8
  928.                           \    /       game  \          /
  929.                          # of printer  port   # of RS-232
  930.                           ports 0-3    used    ports 0-4
  931.      
  932.                           7    6    5    4    3    2    1    0
  933.                           \    /    \    /    \    /  Math   |
  934.                            # of   video mode   RAM     uP    no
  935.                           floppy  at boot up  00=16K       floppy
  936.                           drives  00=EGA      01=32K       drive
  937.                             1-4   01=CGA-40   10=48K       if 0
  938.                           if bit  10=CGA-80   11=64K
  939.                            0 = 1  11=MDA-80   (old PCs)
  940.       
  941.                          Note: bit 13 = modem on some PC lap-tops
  942.                                bit  2 = mouse on MCA and some others
  943.          
  944.          Regs used: ax
  945.  
  946. 12
  947.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 12h ▒▒▒▒▒
  948.      
  949.       SYSTEM MEMORY SIZE
  950.      
  951.          Returns:   ax = number of contiguous 1K bytes blocks of memory
  952.                          from 0 to 640 K.
  953.      
  954.          Regs used: ax
  955.  
  956. 13
  957.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 13h ▒▒▒▒▒
  958.      
  959.       FLOPPY DISK SERVICES
  960.      
  961.          Note: Floppy disk services may be vectored to this routine from int 40h
  962.                on newer systems with hard disk support inside the BIOS.
  963.      
  964.          Call with: ah = sub-function number
  965.                     dl = drive number (unless otherwise noted), drive a: = 0
  966.      
  967.          Returns:   carry = 0 if function ok
  968.                     ah = status (unless otherwise noted)
  969.                       ah = 0    Function ok
  970.                       ah = 1    Invalid value passed or unsupported function
  971.                       ah = 2    Can not locate address mark
  972.                       ah = 3    Floppy write protected
  973.                       ah = 4    Sector not found
  974.                       ah = 6    Floppy changed line on (1.2 meg drives)
  975.                       ah = 8    DMA overrun occurred
  976.                       ah = 9    DMA attempted across 64K byte boundary
  977.                       ah = 0Ch  Media type not found
  978.                       ah = 10h  CRC read error
  979.                       ah = 20h  Floppy controller failure
  980.                       ah = 40h  Seek operation failed
  981.                       ah = 80h  Floppy drive not ready
  982.      
  983.          Functions:
  984.            ah = 0     Floppy disk controller reset
  985.            ah = 1     Get last status
  986.            ah = 2     Read sectors
  987.                         Call with:  al = number of sectors to read
  988.                                     ch/cl = starting track/starting sector
  989.                                     dh = head number, head 0 = 0
  990.                                     es:bx = ptr to buffer where to put data
  991.            ah = 3     Write sectors
  992.                         Call with:  al = number of sectors to write
  993.                                     ch/cl = starting track/starting sector
  994.                                     dh = head number, head 0 = 0
  995.                                     es:bx = ptr to buffer where to get data
  996.                         Return:     al = number of sectors written
  997.            ah = 4     Verify sectors
  998.                         Call with:  al = number of sectors to compare
  999.                                     ch/cl = starting track/starting sector
  1000.                                     dh = head number, head 0 = 0
  1001.                                     es:bx = ptr to buffer where to compare data
  1002.                         Return:     al = number of sectors checked
  1003.            ah = 5     Format track
  1004.                         Call with:  al = number of sectors to format
  1005.                                     ch/cl = starting track/starting sector
  1006.                                     dh = head number, head 0 = 0
  1007.                                     es:bx = ptr to table of address fields
  1008.            ah = 8     Get drive information (not supported by all systems)
  1009.                         Returns:    ax/bh = 0          size dia.     size dia.
  1010.                                     bl = drive type: 1=360K 5.25   3=720K 3.5
  1011.                                                      2=1.2M 5.25   4=1.4M 3.5
  1012.                                     cx bits 7&6, 15-8 = number of tracks, 0=1 track
  1013.                                        bits 5-0 = number of sectors per track
  1014.                                     dh/dl = # of heads/number of floppy drives
  1015.                                     es:di = ptr to floppy parameter table
  1016.            ah = 15h   Get drive type (not supported by all systems)
  1017.                         Returns:    ah = 0 no drive
  1018.                                     ah = 1/2  floppy changed line not/is available
  1019.            ah = 16h   Get changed floppy status (not supported by all systems)
  1020.                         Returns:    ah = 0   floppy in drive,     carry = 0
  1021.                                     ah = 1   bad drive number,    carry = 1
  1022.                                     ah = 6   floppy out of drive, carry = 1
  1023.                                     ah = 80h drive not ready,     carry = 1
  1024.            ah = 17h   Specify media type for a drive
  1025.                         Call with:  al = 1  use a 320/360K floppy in 360k drive
  1026.                                     al = 2  use a 360K floppy in a 1.2M drive
  1027.                                     al = 3  use a 1.2M floppy in a 1.2M drive
  1028.                                     al = 4  use a 720K disk in a 720K drive
  1029.            ah = 18h   Prepare for format (not supported by all systems)
  1030.                         Call with:  cx bits 7&6, 15-8 = number of tracks, 0=1 track
  1031.                                        bits 5-0 = number of sectors per track
  1032.                         Returns:    es:di = ptr to floppy parameter table
  1033.  
  1034. 14
  1035.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 14h ▒▒▒▒▒
  1036.      
  1037.       RS-232 SERIAL PORTS SERVICES
  1038.      
  1039.          Call with: ah = sub-function number
  1040.                     dx = communications number, com1 = 0
  1041.      
  1042.          Returns:   ah = line status,  bit 0 = Data ready
  1043.                                        bit 1 = Overrun error
  1044.                                        bit 2 = Parity error
  1045.                                        bit 3 = CRC framing error
  1046.                                        bit 4 = Break detect
  1047.                                        bit 5 = Xmit buffer register empty
  1048.                                        bit 6 = Xmit shift out register empty
  1049.                                        bit 7 = No response, ignore bits 0-6
  1050.      
  1051.                     al = modem status, bit 0 = Change in Clear To Send
  1052.                                        bit 1 = Change in Data Set Ready
  1053.                                        bit 2 = Falling edge ring detect
  1054.                                        bit 3 = Change in receive detect line
  1055.                                        bit 4 = Clear to Send (CTS)
  1056.                                        bit 5 = Data Set Ready (DTS)
  1057.                                        bit 6 = Ring detected
  1058.                                        bit 7 = Receive detect line
  1059.      
  1060.          Functions:
  1061.            ah = 0     Reset the specified port
  1062.                         Call with:  al serial port register values
  1063.                                        bits  7    6    5    4    3    2    1    0
  1064.                                             --baud-rate--  -Parity- Stop  --Word--
  1065.                                              000 =  110      bits    bit    size
  1066.                                              001 =  150                    (bits)
  1067.                                              010 =  300    00 = off  0=1
  1068.                                              011 =  600    01 = odd  1=2   10 = 7
  1069.                                              100 = 1200    10 = off        11 = 8
  1070.                                              101 = 2400    11 = even
  1071.                                              110 = 4800
  1072.                                              111 = 9600
  1073.           ah = 1      Transmit a character
  1074.                         Call with:  al = character to send (not changed on exit)
  1075.           ah = 2      Received a character
  1076.                         Returns:    al = character received
  1077.           ah = 3      Get status
  1078.           ah = 4      Advanced Initialization (not supported on all systems)
  1079.                         Call with:  al = 0/1  no break/break
  1080.                                     bh = Parity,    0 = none     3 = stick odd
  1081.                                                     1 = odd      4 = stick even
  1082.                                                     2 = even
  1083.                                     bl = 0/1 Stop bits set to 1/2
  1084.                                     ch = Word size, 0 = 5 bits   2 = 7 bits
  1085.                                                     1 = 6 bits   3 = 8 bits
  1086.      
  1087.                                     cl = Baud rate, 0 =  110     5 =  2400
  1088.                                                     1 =  150     6 =  4800
  1089.                                                     2 =  300     7 =  9600
  1090.                                                     3 =  600     8 = 19200
  1091.                                                     4 = 1200
  1092.            ah = 5     Advanced port control (not supported on all systems)
  1093.                         al = 0  Get modem register
  1094.                                   Returns: bl bit 0 = Data Terminal Ready (DTR)
  1095.                                               bit 1 = Request To Send (RTS)
  1096.                                               bit 2 = Out 1
  1097.                                               bit 3 = Out 2
  1098.                                               bit 4 = Loop modem
  1099.                         al = 1  Set modem register
  1100.                                   Call with:  bl = value for register (see above)
  1101.  
  1102. 15
  1103.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 15h ▒▒▒▒▒
  1104.      
  1105.       GENERAL SERVICES
  1106.      
  1107.          On old PCs this function is only used for cassette servicing.
  1108.          Additional functions have been added for advanced features with
  1109.          newer equipment.
  1110.      
  1111.          Called with: ah = function code
  1112.      
  1113.          Returns:     CF = 0 if successful
  1114.                       CF = 1 if failure or function not supported
  1115.      
  1116.          Functions:
  1117.            ah = 0     Cassette motor set on
  1118.            ah = 1     Cassette motor set off
  1119.            ah = 2     Read cx bytes from cassette, es:bx = ptr to load area
  1120.            ah = 3     Write cx bytes to cassette,  es:bx = ptr to read area
  1121.            ah = 0Fh   Disk format hook, called from disk format routines
  1122.                         after a cylinder access completed.  Called with:
  1123.                         al = 1-undergoing surface analysis, 2-if formatting
  1124.            ah = 21h   Error log (PS 2), al = 0 to read, al = 1 to write
  1125.      
  1126.                            ***  LAPTOP MACHINES ONLY - 40h to 44h  ***
  1127.            ah = 40h   Systems info in cx, bx - al = 0 to read, 1 to write
  1128.                         for modem info in bx - al = 2 to read, 3 to write
  1129.            ah = 41h   Wait for an event, dx = i/o port to read or use es:di
  1130.                         as ptr to user event.  al = type of event 0-4,11-14
  1131.                         bh = event mask, bl = # of 55ms counts to timeout
  1132.            ah = 42h   Power off, al = 0 or 1 for mode of power off
  1133.            ah = 43h   Get system status in al
  1134.                             7     6     5     4       3     2     1    0
  1135.                           low   extrn  bad  pwr up  modem  ports      LCD
  1136.                         battery  pwr  time  alarm    on     on      missing
  1137.            ah = 44h   Modem power, al = 0 turn off,  al = 1 turn on
  1138.      
  1139.                          *** FUNCTIONS IN RECENT BIOS VERSIONS ONLY ***
  1140.            ah = 4Fh   Keyboard input hook, called every keystroke with
  1141.                         al = scan code.  CF = 1 to change or use the scan
  1142.                         code in al.  CF = 0 to ignore the key.
  1143.            ah = 80h   Open device number bx, in process number cx.
  1144.            ah = 81h   Close device number bx, in process number cx.
  1145.            ah = 82h   Terminate device number bx
  1146.            ah = 83h   Wait for timeout, and set bit 15 at ptr es:bx when
  1147.                         timed out.  al = 0 to set wait period cx:dx uSec,
  1148.                         al = 1 to stop timeout timer.
  1149.            ah = 84h   Game port read, dx = 0 to read switches into al
  1150.                         high nibble,  dx = 1 to read linear position
  1151.                         (Unit 1: ax = x, bx = y   Unit 2: cx = x, dx = y)
  1152.            ah = 85h   Get system request key state, al = 0 down, al = 1 up
  1153.            ah = 86h   Wait cx:dx microseconds before return
  1154.            ah = 87h   Transfer cx words to/from memory above 1 meg
  1155.                         es:si ptr to table with source & destination ptrs:
  1156.                         es:si -> zeros          db  16 dup(0)
  1157.                                  src_seg_limit  dw  ?        ; 1-64K bytes
  1158.                                  scr_ptr_low    dw  ?        ; 0-64K range
  1159.                                  scr_ptr_high   db  ?        ; 0-16 Meg range
  1160.                                  scr_rights     db  93h      ; r/w access
  1161.                                  scr_zero       dw  0
  1162.                                  dst_seg_limit  dw  ?        ; 1-64K bytes
  1163.                                  dst_ptr_low    dw  ?        ; 0-64K range
  1164.                                  dst_ptr_high   db  ?        ; 0-16 Meg range
  1165.                                  dst_rights     db  93h      ; r/w access
  1166.                                  dst_zero       dw  0
  1167.                                  zeros2         db  16dup(0)
  1168.                         Notes:
  1169.                           cx = 32K words max xfer, ptr_low & ptr_high form
  1170.                           a 24 bit physical address (do not use a segment)
  1171.                         Return codes: al = 0 if ok, al = 1 parity error
  1172.                           al = 2 other errors, al = 3 gate addr line 20 bad
  1173.            ah = 88h   Get extended memory size (above 1 Meg boundary)
  1174.                         ax = (number of bytes / 1024)
  1175.            ah = 89h   Go to protected mode of operation. es:si ptr to table
  1176.                         comprised of 8 groups of 8 byte ptr sub-arrays.  Each.
  1177.                         group is formed from 8 bytes as follows:
  1178.                             seg_limit    dw  ?     ; 1-64K bytes
  1179.                             ptr_low      dw  ?     ; 0-64K range
  1180.                             ptr_high     db  ?     ; 0-16 Meg range
  1181.                             rights       db  93h   ; read/write access
  1182.                             zero         dw  0     ; set to zero
  1183.                         Ptr_low & high form a 24 bit physical address.
  1184.      
  1185.                         The 8 groups are as follows:
  1186.                           es:si ->  Group_1   Set to all zero
  1187.                                     Group_2   ptr to beginning of Group_1
  1188.                                     Group_3   ptr to Interrupt Descript Table IDT
  1189.                                     Group_4   ptr to present DS segment
  1190.                                     Group_5   ptr to present ES segment
  1191.                                     Group_6   ptr to present SS segment
  1192.                                     Group_7   ptr to present CS segment
  1193.                                     Group_8   ptr where to jump to when done
  1194.                         Also: bh & bl set as offset from beginning of IDT to
  1195.                           spot where 1st & 2nd set of 8 hardware interrupts begin.
  1196.                         Returns ah = 0 if ok, regs changed: ax,bp,ds,es,ss,cs
  1197.            ah = 90h   Device busy - used to signal DOS when it must wait.
  1198.                         Type   0  Disk timeout          0FCh  Hard disk timeout
  1199.                         codes  1  Floppy timeout                (PS 2 only)
  1200.                         (al)   2  Keyboard no timeout   0FDh  Floppy motor timeout
  1201.                                3  Mouse timeout         0FEh  Printer timeout
  1202.                              80h  Local area network (es:bx = network cntrl block
  1203.                         Returns CF = 0 if failure, 1 if minimum wait time occurred
  1204.            ah = 91h   Interrupt done - used to signal DOS when hardware done
  1205.                         al = type code (Device busy type codes)
  1206.            ah = C0h   Get ROM system information table ptr in es:bx.  See data
  1207.                         area starting at byte "sys_info_size".
  1208.      
  1209.                          *** PS 2 & COMPATIBLES ONLY - C1h to C4h ***
  1210.            ah = C1h   Get Extended BIOS data area segment in es
  1211.            ah = C2h   Mouse support (BIOS).  Sub-function code in al
  1212.                           al = 0  if bh = 0 mouse off, bh = 1 mouse on
  1213.                           al = 1  reset mouse & parameters, returns bh = 0
  1214.                                     bl altered on return
  1215.                           al = 2  Set number of updates per second in bh,
  1216.                                     bh = 0 - 10 updates/sec  4 - 80  updates/sec
  1217.                                          1 - 20 updates/sec  5 - 100 updates/sec
  1218.                                          2 - 40 updates/sec  6 - 200 updates/sec
  1219.                                          3 - 60 updates/sec
  1220.                           al = 3  Set resolution in counts per millimeter:
  1221.                                     bh = 0 - 1 cnts per mm   2 - 4 cnts per mm
  1222.                                          1 - 2 cnts per mm   3 - 8 cnts per mm
  1223.                           al = 4  Get device type, bh = 0
  1224.                           al = 5  Initialize pointing device interface data size
  1225.                                     bh = size 1 to 8 (1 to 8 bytes)
  1226.                           al = 6  Additional sub-functions in bh:
  1227.                                     bh = 0  Get status, cl = cnts per mm (see al=3)
  1228.                                             dl = updates/sec in hex, bl = status:
  1229.                                                  bit 6 = mode (0=stream, 1=remote)
  1230.                                                      5 = 0 disabled, 1 enabled
  1231.                                                      4 = scaling (0=1:1, 1=2:1)
  1232.                                                      2 = Left button pressed
  1233.                                                      0 = right button pressed
  1234.                                     bh = 1  Set scaling to 1:1
  1235.                                     bh = 2  Set scaling to 2:1
  1236.                           al = 7  Set location to "call far" when data available
  1237.                                      in es:bx
  1238.                         Return code for all sub-functions in al:
  1239.                           al = 0  successful             3  interface error
  1240.                                1  bad function call      4  resend
  1241.                                2  invalid input          5  no far call installed
  1242.            ah = C3h   Watchdog timer mode al = 0 disable, al = 1 enable,
  1243.                         bx = set counter value 1 to FFh
  1244.            ah = C4h   Bus option select (POS) subfunction in al,
  1245.                         al = 0  Get base POS adapter register address in dx
  1246.                              1  Enable setup for slot bl
  1247.                              2  Adapter enable
  1248.  
  1249. 16
  1250.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 16h ▒▒▒▒▒
  1251.      
  1252.       KEYBOARD SERVICES
  1253.      
  1254.          Call with:   ah = sub-function number
  1255.      
  1256.          Functions:
  1257.            ah = 0     Get a key, and wait until one is available if none are
  1258.                         in the queue.
  1259.                         Returns:    ah = keyboard scan code
  1260.                                     al = ASCII character, or 0 if non-ASCII
  1261.            ah = 1     Get key status
  1262.                         Returns:    zero flag = 0 if a valid key is in the queue
  1263.                                         ah = keyboard scan code
  1264.                                         al = ASCII character, or 0 if non-ASCII
  1265.                                     zero flag = 1 if no keys in the queue
  1266.            ah = 2     Get shift status register
  1267.                         Returns:    al = bits  7    6    5    4    3    2    1    0
  1268.                                              right left ctrl alt scrl  num  cap insrt
  1269.                                              -------shifts------ ------toggles-------
  1270.                                                    1 = down            1 = on
  1271.            ah = 3     Set repeating character rate (not supported in all systems)
  1272.                         Call with:  al = 5
  1273.                                     bh = start delay, 0 = 250 ms    2 =  750 ms
  1274.                                                       1 = 500 ms    3 = 1000 ms
  1275.                                     bl = speed in characters per second - values
  1276.                                            range from 0 = 30 cps, to 1Fh = 2 cps
  1277.            ah = 5     Load keyboard queue (not supported in all systems)
  1278.                         Call with:  ch/cl = scan code/character to load into the queue
  1279.                         Returns:    al = 0 if ok, 1 if keyboard queue is full
  1280.      
  1281.                            **** Support for extended keyboard functions ****
  1282.            ah = 10h   Get a key (similar to ah = 0, not supported in all systems)
  1283.            ah = 11h   Get key status (similar to ah = 1, not supported in all systems)
  1284.            ah = 12h   Get shift info (similar to ah = 2, not supported in all systems)
  1285.  
  1286. 17
  1287.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 17h ▒▒▒▒▒
  1288.      
  1289.       PRINTER SERVICES
  1290.      
  1291.          Call with:  ah = function code
  1292.                      dx = printer number 0-2 (some systems allow 0-3)
  1293.      
  1294.          Returns:    ah = status bits
  1295.                            7      6      5      4      3     2  1     0
  1296.                           not  acknow-  no   select   I/O   unused   no
  1297.                           busy  ledge  paper         error        response
  1298.                           __________from printer__________
  1299.      
  1300.          Functions:
  1301.            ah = 0   Send character to printer, al = character
  1302.            ah = 1   Printer port initialization
  1303.            ah = 2   Get printer status in ah
  1304.  
  1305. 18
  1306.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 18h ▒▒▒▒▒
  1307.      
  1308.       ROM BASIC
  1309.  
  1310. 19
  1311.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 19h ▒▒▒▒▒
  1312.      
  1313.       BOOTSTRAP LOADER
  1314.      
  1315.          Floppy drive a: attempts a read from the first sector of the disk.
  1316.          If read properly (i.e a boot disk is in drive a:), control is
  1317.          transferred to the loaded program.  The boot sector at track 0,
  1318.          sector 1 is transferred to memory at 0:7C00h.  dh = drive which
  1319.          was used (0=A:).  Control is passed to 0:7C00h.
  1320.  
  1321. 1A
  1322.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Ah ▒▒▒▒▒
  1323.      
  1324.       REAL-TIME CLOCK SERVICES
  1325.      
  1326.          Call with:   ah = sub-function number
  1327.      
  1328.          Functions:
  1329.            ah = 0     Get system timer (increments every 54.92 ms from int 8)
  1330.                         Returns:    al = # of 24 hour periods since read/powered up
  1331.                                     cx:dx = 32 bit count
  1332.            ah = 1     Get system timer & reset 24 hour counter
  1333.                         Returns:    cx:dx = 32 bit count
  1334.  
  1335.                         This subfunction should NEVER be used by an application.
  1336.                         It is intended for the operating system only.  Use
  1337.                         by an application running at midnight will cause the
  1338.                         operating system clock to lose a day!
  1339.  
  1340.                         **** System must have CMOS clock for services 2-0Bh ****
  1341.            ah = 2     Get time in BCD format
  1342.                         Returns:    ch/cl = hours/minutes
  1343.                                     dh = seconds
  1344.                                     dl = 0/1 if daylight savings time operation off/on
  1345.                                     carry flag = 0 if clock ok, 1 if stopped
  1346.            ah = 3     Set time in BCD format
  1347.                         Call with:  ch/cl = hours/minutes
  1348.                                     dh = seconds
  1349.                                     dl = 0/1 if daylight savings time operation off/on
  1350.            ah = 4     Get date in BCD format
  1351.                         Returns:    cx = four digit year
  1352.                                     dh/dl = month/day
  1353.                                     carry flag = 0 if clock ok, 1 if stopped
  1354.            ah = 5     Set date in BCD format
  1355.                         Call with:  cx = four digit year
  1356.                                     dh/dl = month/day
  1357.            ah = 6     Set 24 hour alarm (alarm vectors to int 4Ah)
  1358.                         Call with:  ch/cl = hours/minutes
  1359.                                     dh = seconds
  1360.            ah = 7     Clear alarm
  1361.            ah = 9     Get alarm time & status
  1362.                         Returns:    ch/cl = hours/minutes
  1363.                                     dh = seconds
  1364.                                     dl = 0/1 alarm off/on
  1365.            ah = 0Ah   Get days counter
  1366.                         Returns:    cx = number of days since 1-Jan-80
  1367.            ah = 0Bh   Set days counter
  1368.                         Call with:  cx = number of days since 1-Jan-80
  1369.  
  1370. 1B
  1371.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Bh ▒▒▒▒▒
  1372.      
  1373.       KEYBOARD BREAK (when Control-Break pressed)
  1374.  
  1375. 1C
  1376.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Ch ▒▒▒▒▒
  1377.      
  1378.       TIMER TICKS - Called every 18.2 ms
  1379.  
  1380. 1D
  1381.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 40h ▒▒▒▒▒
  1382.      
  1383.       FLOPPY DISK SERVICES
  1384.  
  1385. 1E
  1386.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 70h ▒▒▒▒▒
  1387.      
  1388.       REAL-TIME CLOCK  (called by hardware 8259-2, IRQ 8)
  1389.      
  1390.          This interrupt services the real-time clock hardware.  The hardware
  1391.          supports 2 modes of operation, an interrupt at a specific 24 hour
  1392.          interval (i.e 9:42 am), or repeatedly every 0.976 ms (1,024 Khz).
  1393.          Both modes can operate at the same time if needed.
  1394.      
  1395.          In the 24 hour alarm mode, the interrupt is vectored here by hardware
  1396.          and interrupt 4Ah is called to alert the application program of the
  1397.          alarm.  Int 4Ah is not handled by the BIOS other than to return, and
  1398.          is normally revectored by a particular application using the alarm.
  1399.      
  1400.          When repeating interrupt mode is active, the 32-bit microsecond
  1401.          counter consisting of timer_clk_low and timer_clk_hi is decremented
  1402.          by 976 us on every interrupt.  When the timer reaches zero, the
  1403.          byte pointed to by the offset @timer_wait_off and segment
  1404.          @timer_wait_seg is set to 80h (this pointer is set by an application
  1405.          program through int 1Ah function ah=6).
  1406.  
  1407. 1F
  1408.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 71h ▒▒▒▒▒
  1409.      
  1410.       For General Adapter Use (called by hardware 8259-2, IRQ 9)
  1411.      
  1412.          The BIOS calls interrupt 0Ah to simulate IRQ 2, which is no longer
  1413.          available on AT+ systems.  Since IRQ 9 is the same physical
  1414.          line as the IRQ 2 line on the PC, it is recommended an adapter use
  1415.          interrupt Ah to handle IRQ 9.  This maintains full compatibility
  1416.          will all platforms.
  1417.  
  1418. 20
  1419.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 72h ▒▒▒▒▒
  1420.      
  1421.       For General Adapter Use (called by hardware 8259-2, IRQ 10)
  1422.  
  1423. 21
  1424.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 73h ▒▒▒▒▒
  1425.      
  1426.       For General Adapter Use (called by hardware 8259-2, IRQ 11)
  1427.  
  1428. 22
  1429.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 74h ▒▒▒▒▒
  1430.      
  1431.       For General Adapter Use (called by hardware 8259-2, IRQ 12)
  1432.  
  1433. 23
  1434.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 75h ▒▒▒▒▒
  1435.      
  1436.       MATH COPROCESSOR (called by hardware 8259-2 IRQ 13)
  1437.      
  1438.          The external math coprocessor invokes this interrupt.  Int 75h 
  1439.          calls the non-maskable interrupt int 2 to flag an error occurred
  1440.          with the current math operation.  This is done to maintain full
  1441.          compatibility with the original PC/XT which had the coprocessor
  1442.          connected to interrupt 2 (NMI).
  1443.  
  1444.          In normal operation, the program using the math coprocessor is 
  1445.          responsible for hooking interrupt 2h and handling the error.
  1446.          If it does not hook interrupt 2h, the BIOS will usually halt
  1447.          the system.
  1448.  
  1449. 24
  1450.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 76h ▒▒▒▒▒
  1451.      
  1452.       HARD DISK CONTROLLER (called by hardware 8259-2 IRQ 14)
  1453.      
  1454.          When the hard disk controller has completed its task, it signals
  1455.          completion though hardware activation of int 76h.  The status in
  1456.          hdsk_int_flags is set to "done", a value of 0FFh.  Interrupt 15,
  1457.          function 91h may also be called to signal the interrupt is done.
  1458.  
  1459. 25
  1460.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 77h ▒▒▒▒▒
  1461.      
  1462.       For General Adapter Use (called by hardware 8259-2 IRQ 15)
  1463.  
  1464. 26
  1465.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 13h ▒▒▒▒▒
  1466.      
  1467.       HARD DISK SERVICES
  1468.      
  1469.          Call with: ah = sub-function number 
  1470.                     dl = drive number (unless otherwise noted) 80h or 81h
  1471.                            for fixed disk 0 or 1.
  1472.      
  1473.          Returns:   carry = 0 if function ok
  1474.                     ah = status (unless otherwise noted)
  1475.                       ah = 0    Function ok
  1476.                       ah = 1    Invalid value passed or unsupported function
  1477.                       ah = 2    Can not locate address mark
  1478.                       ah = 3    Write protected
  1479.                       ah = 4    Sector not found
  1480.                       ah = 5    Reset failure
  1481.                       ah = 7    Parameter activity failed
  1482.                       ah = 8    DMA overrun occurred
  1483.                       ah = 9    DMA attempted across 64K byte boundary
  1484.                       ah = 0Ah  Sector flag bad
  1485.                       ah = 0Bh  Cylinder bad
  1486.                       ah = 0Dh  Wrong # of sectors (format)
  1487.                       ah = 0Eh  Detected control data address mark
  1488.                       ah = 0Fh  DMA arbitration level has invalid range
  1489.                       ah = 10h  CRC or EDC (Error Detect & Correct) has an
  1490.                                   unresolvable error
  1491.                       ah = 11h  Data corrected by EDC
  1492.                       ah = 20h  Disk controller failure
  1493.                       ah = 40h  Seek operation failed
  1494.                       ah = 80h  Hard disk not ready
  1495.                       ah = BBh  Error not defined
  1496.                       ah = CCh  Write error
  1497.                       ah = E0h  Error register is zero
  1498.                       ah = FFh  Disk sense error
  1499.                     If dl bit 7 was set to 1 on entry:
  1500.                       cx bits 7&6, 15-8 = highest cylinder number
  1501.                          bits 0-5 = highest sector number
  1502.                       dh = highest head number
  1503.                       dl = number of hard disks (1 or 2)
  1504.      
  1505.          Functions:
  1506.            ah = 0     Hard disk controller reset
  1507.            ah = 1     Get last status
  1508.            ah = 2     Read sectors
  1509.                         Call with:  al = number of sectors to read
  1510.                                     cx bits 7&6, 15-8 = cylinder number
  1511.                                        bits 0-5 = sector number
  1512.                                     dh = head number, head 0 = 0
  1513.                                     es:bx = ptr to buffer where to put data
  1514.            ah = 3     Write sectors
  1515.                         Call with:  al = number of sectors to write
  1516.                                     cx bits 7&6, 15-8 = cylinder number
  1517.                                        bits 0-5 = sector number
  1518.                                     dh = head number, head 0 = 0
  1519.                                     es:bx = ptr to buffer where to get data
  1520.            ah = 4     Verify sectors
  1521.                         Call with:  al = number of sectors to compare
  1522.                                     cx bits 7&6, 15-8 = cylinder number
  1523.                                        bits 0-5 = sector number
  1524.                                     dh = head number, head 0 = 0
  1525.            ah = 5     Format cylinder (non-ESDI type disks)
  1526.                         Call with:  cx bits 7&6, 15-8 = cylinder number
  1527.                                     dh = head number, head 0 = 0
  1528.                                     es:bx = ptr to bad sector map (non XT)
  1529.                                     al = interleave number (XT only)
  1530.            ah = 6     Format cylinder & set bad sector flags (XT only)
  1531.                         Call with:  al = interleave number
  1532.                                     cx bits 7&6, 15-8 = cylinder number
  1533.                                     dh = head number, head 0 = 0
  1534.            ah = 7     Format drive, begin at specific cylinder (XT only)
  1535.                         Call with:  al = interleave number
  1536.                                     cx bits 7&6, 15-8 = cylinder number
  1537.                                     dh = head number, head 0 = 0
  1538.            ah = 8     Get drive parameters
  1539.                         Returns:    cx bits 7&6, 15-8 = max cylinder number
  1540.                                        bits 0-5 = max sector number
  1541.                                     dh = max head number, head 0 = 0
  1542.            ah = 9     Set parameters for drive (ignored for ESDI drives)
  1543.                         Call with   dh = 80h to use int 41h ptr, drive 0
  1544.                                     dh = 81h to use int 46h ptr, drive 1
  1545.            ah = 0Ch   Disk seek
  1546.                         Call with:  cx bits 7&6, 15-8 = cylinder number
  1547.                                     dh = head number, head 0 = 0
  1548.            ah = 0Dh   Secondary Disk Reset
  1549.            ah = 10h   Check if drive is ready
  1550.            ah = 11h   Recalibrate drive
  1551.            ah = 15h   Get drive type (all but XT systems)
  1552.                         Returns:    ah = 0 no drive (cx & dx = 0)
  1553.                                     ah = 3 hard disk
  1554.                                     cx:dx = size of disk in 512 byte blocks
  1555.                                     al = 4  use a 720K disk in a 720K drive
  1556.            ah = 19h   Park disk heads (PS/2 systems only)
  1557.            ah = 1Ah   Format hard disk (ESDI only)
  1558.                         Call with:  al = number of blocks in defect table (0=none)
  1559.                                     cl bit 0 = 1 when no primary defect map
  1560.                                        bit 1 = 1 when no secondary defect map
  1561.                                        bit 2 = 1 allow logging found surface errors
  1562.                                                    in the secondary defect map
  1563.                                        bit 3 = 1 Do extended surface analysis
  1564.                                        bit 4 = 1 interrupt after each cyldr format
  1565.  
  1566. 27
  1567.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ unused ▒▒▒▒▒
  1568.      
  1569.       Unused interrupt vector termination
  1570.      
  1571.          This routine processes invalid and unused interrupt requests.  The
  1572.          hardware IRQ number is loaded into gen_int_occured, and the interrupt
  1573.          cleared.  For software calls to an unused interrupt, a value 0FFh is
  1574.          loaded into gen_int_occured, and the routine returns to the caller
  1575.          without changing registers.
  1576.      
  1577.          Alternatively, some systems simply return (iret).
  1578.  
  1579. 28
  1580.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 18h ▒▒▒▒▒
  1581.      
  1582.       ROM BASIC
  1583.      
  1584.          Note: ROM basic points to F600 segment, and has been adjusted to
  1585.                segment F000 to process in-line with the balance of the
  1586.                BIOS code.  Internal data references may shift to segment
  1587.                F600 depending on implementation.
  1588.  
  1589. 29
  1590.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ System Reset ▒▒▒▒▒
  1591.      
  1592.       SYSTEM RESET
  1593.      
  1594.          Reset the computer system.  General operation includes a test of
  1595.          of the CPU, ROM checksum, and initialization of hardware including:
  1596.      
  1597.             Memory system
  1598.             Timer/Counter (which is also used for RAM refresh)
  1599.             Interrupt Controller(s)
  1600.             DMA Controller(s)
  1601.             Keyboard Controller
  1602.             Video Controller & Video RAM
  1603.             Floppy Controller
  1604.             Hard Disk Controller (if present)
  1605.      
  1606.          Portions of the hardware may also have specific tests made to
  1607.          insure reliable operation.  Test failures may display error code
  1608.          on the screen if the video subsystem is operational, or generate
  1609.          beeps or LED blinks to signify the error.
  1610.            
  1611.          Note: A soft reset uses the warm_boot_flag to skip the memory
  1612.                tests. (i.e. from pressing Ctrl-Alt-Del).
  1613.      
  1614.          The system checks for installed ROMs by searching memory from
  1615.          C000h to the beginning of the BIOS, in 2K chunks.  ROM memory is
  1616.          identified if it starts with the word AA55h.  It is followed a one
  1617.          byte field length of the ROM (divided by 512).  If ROM is found,
  1618.          the BIOS will call the ROM at an offset of 3 from the beginning.
  1619.          This feature was not supported in the earliest PC machines.
  1620.      
  1621.          The last task turns control over to the bootstrap loader (assuming
  1622.          the floppy controller is operational)
  1623.  
  1624. 2A
  1625.     ══════ BIOS EXTERNAL ENTRY POINT ═══════════════════════════════════════
  1626.  
  1627. 2B
  1628.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ BIOS Setup ▒▒▒▒▒▒▒
  1629.      
  1630.       BIOS SETUP ROUTINES
  1631.       
  1632.          When a special key combination is pressed, this setup routine is
  1633.          run to allow changing CMOS BIOS values.  Typical key combinations
  1634.          include CTRL-ALT-ESC, CTRL-ALT-S, or others to start the setup.
  1635.           
  1636.          Once invoked, it may issue a system reset to let other application
  1637.          software, other BIOS routines, and TSR's to configure the system
  1638.          with the new information.
  1639.           
  1640.          Typical options include:
  1641.         
  1642.                 Present time and date
  1643.                 Floppy disk settings
  1644.                 Hard disk table selection
  1645.                 Video display
  1646.                 Memory size
  1647.                 Speed of clock and/or bus
  1648.  
  1649. 2C
  1650.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ INTERRUPT ▒▒▒▒▒
  1651.      
  1652. 2D  
  1653.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ BIOS Initialization ▒▒▒▒▒▒▒
  1654.       
  1655.       This portion is called when the main computer BIOS passes control to
  1656.       allow this BIOS to perform it's one-time start up code.  
  1657.      
  1658. 2E
  1659.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Exception Handler ▒▒▒▒▒
  1660.      
  1661.       Protected Mode Exception Handler
  1662.      
  1663.          When the BIOS goes into protected mode, the exception vectors will
  1664.          point to this handler.  The usual process is to initiate a system 
  1665.          reset, since no interrupts should occur during this process.
  1666.  
  1667. end
  1668.  
  1669.  
  1670.  ::::::::::::::::::::::::::::: SUBROUTINE REMARKS :::::::::::::::::::::::::::::
  1671.  
  1672.     ---------------------- Subroutine Reference Remarks -----------------------
  1673. end
  1674.  
  1675.  
  1676.         NOTES:  1)  Entries must be in consecutive sequential order.
  1677.                 2)  Remark characters ";" are automatically inserted.
  1678.                 3)  Up to 64,000 characters per remark, 32M maximum file size.
  1679.  
  1680.  
  1681.