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