home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURC455.ZIP / SRFILES.ZIP / BIOS.REM next >
Text File  |  1991-10-20  |  78KB  |  1,630 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.     █   9600, and 19,200 on some.   █
  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. 093 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  470.     █       Interrupt Vectors       █
  471.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  472.     Divide error
  473. 094 Single Step
  474. 095 NMI
  475. 096 Debug
  476. 097 Overflow
  477. 098 Print Screen
  478. 099 Timer Ticks
  479. 09A Keyboard
  480. 09B Serial
  481. 09C Serial
  482. 09D Disk
  483. 09E Diskette
  484. 09F Bad Interrupt
  485. 0A0 Video
  486. 0A1 Equipment
  487. 0A2 Memory Size
  488. 0A3 Disk Services
  489. 0A4 General Services
  490. 0A5 ROM Basic
  491. 0A6 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  492.     █         ROM BEGINNING         █
  493.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  494.     ROM signature word
  495. 0A7 Number of 512 byte pages
  496. 0A8 unused
  497. 0A9 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  498.     █     FONT - 8 wide, 14 high    █
  499.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  500.     Video character font
  501. 0AA █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  502.     █     FONT - 8 wide, 8 high     █
  503.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  504.     Video characters 0-127
  505. 0AB █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  506.     █     FONT - 8 wide, 8 high     █
  507.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  508.     Video characters 128-255
  509. 0AC █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  510.     █     FONT - 9 wide, 14 high    █
  511.     █                               █
  512.     █  First byte indicates the     █
  513.     █    character to replace       █
  514.     █  Followed by 14 bytes of data █
  515.     █    (the 9th bit is provided   █
  516.     █    by the EGA/VGA adapter     █
  517.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  518.     Video character font
  519. 0AD █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  520.     █     FONT - 8 wide, 16 high    █
  521.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  522.     Video character font
  523. 0AE █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  524.     █     FONT - 9 wide, 16 high    █
  525.     █                               █
  526.     █  First byte indicates the     █
  527.     █    character to replace       █
  528.     █  Followed by 16 bytes of data █
  529.     █    (the 9th bit is provided   █
  530.     █    by the EGA/VGA adapter     █
  531.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  532.     Video character font
  533. 0AF █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ 
  534.     █       VIDEO MODE TABLES       █
  535.     █                               █
  536.     █ Note: The following structure █
  537.     █       is based on most EGA/   █
  538.     █       VGA adapters.  Since    █
  539.     █       they are used only      █
  540.     █       internally the table    █
  541.     █       may not follow the      █
  542.     █       standard shown.         █
  543.     █                               █
  544.     █  EGA Cards - Mode order       █
  545.     █       0-0Fh, 10h normal       █
  546.     █       0Fh, 10h  16K RAM EGA   █
  547.     █       0-3, high res emulate   █
  548.     █  VGA Cards - Mode order       █
  549.     █       0-Fh, 10-13h normal     █
  550.     █       0-3, high res emulate   █
  551.     █                               █
  552.     █  THIS IS A GUIDELINE AND MAY  █
  553.     █  VARY DEPENDING ON THE CARD   █
  554.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  555.     Number of columns on display
  556. 0B0 Number of rows on display
  557. 0B1 Pixels per character
  558. 0B2 Bytes per page
  559. 0B3 Sequencer register values
  560. 0B4 Miscellaneous register value
  561. 0B5 CRT controller register values
  562. 0B6 Attribute register values
  563. 0B7 Graphics register values
  564. 0B8 System boot 
  565. end
  566.  
  567.  
  568.  
  569.  :::::::::::::::::::::::::::::: LOCATION REMARKS ::::::::::::::::::::::::::::::
  570.  
  571.     ----------------------- Location Reference Remarks ------------------------
  572.  
  573. 01
  574.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1 ▒▒▒▒▒▒▒
  575.      
  576.        SINGLE STEP
  577.  
  578.  
  579. 02
  580.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 2 ▒▒▒▒▒▒▒
  581.      
  582.       NON-MASKABLE HARDWARE INTERRUPT
  583.      
  584.          This function is called in the event of a memory parity error or may
  585.          occur in the event of other hardware problems or failures (depends on
  586.          the specific manufacturer's hardware).  Displays the appropriate
  587.          error message and halts the processor.
  588.  
  589. 03
  590.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 3 ▒▒▒▒▒▒▒
  591.      
  592.       DEBUG BREAKPOINT
  593.  
  594. 04
  595.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 4 ▒▒▒▒▒▒▒
  596.      
  597.       OVERFLOW
  598.  
  599. 05
  600.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 5 ▒▒▒▒▒▒▒
  601.      
  602.       PRINT SCREEN
  603.      
  604.          Send the present active display screen contents to the printer if
  605.          the printer is idle and not out of paper.  The status of the print
  606.          screen function is in prn_screen_stat at 0050:0000.  Control-Break
  607.          will terminate an active print screen operation.
  608.  
  609. 06
  610.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 6 ▒▒▒▒▒▒▒
  611.      
  612.       BAD OPCODE DETECTED
  613.  
  614. 07
  615.  
  616. 08
  617.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 8 ▒▒▒▒▒▒▒
  618.      
  619.       TIMER TICKS  (called by hardware 8259-1, IRQ 0)
  620.           
  621.          This is the primary timer used to control the clock and other key
  622.          system resources.  It is called indirectly by channel A of the 8253
  623.          timer every 18.2 milliseconds.  Every timer tick also calls int 1Ch
  624.          for user needs (int 1Ch points to an iret instruction unless changed
  625.          by a resident program).  The timer interrupt is given the highest
  626.          maskable interrupt priority upon power up.
  627.      
  628.          The main timing functions of int 8 include increment of a 32-bit
  629.          time since powered on counter, timer_hi and timer_low, and after 24
  630.          hours since powered on, timer_rolled is incremented.
  631.      
  632.          The last task of int 8 is turning off the floppy drive motor after
  633.          2 seconds of non-use.  The counter dsk_motor_tmr is decremented upon
  634.          each occurrence of int 8.  When the count reaches zero, the motor is
  635.          set off, and the motor running flags are cleared in dsk_motor_stat.
  636.  
  637. 09
  638.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 9 ▒▒▒▒▒▒▒
  639.      
  640.       KEYBOARD I/O  (called by hardware 8259-1, IRQ 1)
  641.      
  642.          When any key is pressed on the keyboard, the hardware calls this
  643.          interrupt to service the pressed key or key combination.   The
  644.          hardware provides the key pressed in a non-ASCII scan code format
  645.          read at i/o port 60h.  The servicer acknowledges receipt of the key
  646.          by toggling bit 7 of port 61h.  (Port 61h should be read first, then
  647.          bit 7 ored on, output to port 61h, then anded off, and resent to
  648.          port 61h).
  649.      
  650.          The read key is decoded to yield an ASCII character, special function
  651.          key (such as F1) or a control function like Left Shift Key down.
  652.          The converted ASCII character is placed into the next available
  653.          position in the circular queue keybd_queue to keybd_q_end.  It is
  654.          put in the position indicated by keydb_q_tail when it will not
  655.          cause the loss of earlier entered data.  The value keybd_q_head
  656.          points to the oldest key pressed in the buffer which has not been
  657.          removed from the queue (the normal process uses int 16h to remove
  658.          keys from the queue and return the key value to the int 16h caller).
  659.      
  660.          The 16 word queue holds up to 16 keys.  If keybd_q_head equals the
  661.          keybd_q_tail, the queue is empty.  Valid keys in the queue comprise
  662.          the upper byte scan code and the lower byte ASCII character.  If the
  663.          key pressed has no ASCII equivalent (i.e F1 to F12), the lower byte
  664.          is zero.
  665.      
  666.          Toggle and shift keys are not placed in the buffer, but appear in 2
  667.          status registers keybd_flags_1 and keybd_flags_2.
  668.      
  669.          Special key combinations will cause other events to occur:
  670.             Ctrl-Alt_Del  -  Reset computer by jumping to power_on_reset
  671.             Print screen  -  Call int_5_prn_scrn to print the current screen
  672.             Ctrl-Break    -  Call int_1Bh control break key processor (DOS)
  673.             Pause         -  Wait until an ASCII key is pressed, without
  674.                              placing the key in the queue
  675.  
  676. 0A
  677.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Ah ▒▒▒▒▒
  678.      
  679.       LAN ADAPTER (called by hardware 8259-1, IRQ 2 - see below)
  680.      
  681.          On systems equipped with 2 interrupt controller chips (8259), IRQ 2
  682.          is used to support the second interrupt controller.  In this case,
  683.          int 71h (IRQ 9) is used to replace IRQ 2.  Hardware calls to int 71h
  684.          are redirected to this interrupt to maintain compatibility.
  685.  
  686. 0B
  687.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Bh ▒▒▒▒▒
  688.      
  689.       RS-232 SERIAL HANDLER (called by hardware 8259-1, IRQ 3)
  690.      
  691.          Called by the secondary serial port chip.
  692.  
  693. 0C
  694.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Ch ▒▒▒▒▒
  695.      
  696.       RS-232 SERIAL HANDLER (called by hardware 8259-1, IRQ 4)
  697.      
  698.          Called by the primary serial port chip.
  699.  
  700. 0D
  701.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Dh ▒▒▒▒▒
  702.      
  703.       XT HARD DISK CONTROLLER (called by hardware 8259-1, IRQ 5)
  704.  
  705. 0E
  706.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Eh ▒▒▒▒▒
  707.      
  708.       FLOPPY DISK CONTROLLER (called by hardware 8259-1, IRQ 6)
  709.  
  710. 0F
  711.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Fh ▒▒▒▒▒
  712.      
  713.       PRINTER CONTROLLER (called by hardware 8259-1, IRQ 7)
  714.      
  715.          This interrupt is normally avoided.  If a bad interrupt occurs,
  716.          it will vector to this spot (when caused by a misprogrammed 8259
  717.          interrupt controller)
  718.  
  719. 10
  720.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 10h ▒▒▒▒▒
  721.      
  722.       VIDEO DISPLAY SERVICES
  723.      
  724.          Called with:  ah = primary function number
  725.      
  726.          Returns: (unless otherwise indicated)
  727.                        ax - altered (some systems may not alter ax)
  728.      
  729.          Functions:
  730.            ah = 0     Set video display mode in al.
  731.            ah = 1     Set cursor size
  732.                         Call with:  ch = top line, 0-32
  733.                                     cl = bottom line, 0-32
  734.            ah = 2     Set cursor location
  735.                         Call with:  bh = page number, 0 = 1st page
  736.                                     dh = row (0 for top row)
  737.                                     dl = column (0 for leftmost)
  738.            ah = 3     Get cursor location
  739.                         Call with:  bh = page number, 0 = 1st page
  740.                         Returns:    ch/cl = cursor size (top & bottom)
  741.                                     dh/dl = row and column of cursor
  742.            ah = 4     Get light pen location
  743.                         Returns:    ah = 0 not on/unsupported & bx,cx,dx changed
  744.                                          1 status valid
  745.                                     bx = pixel column
  746.                                     cx = horizontal line number
  747.                                     dh/dl = row and column
  748.            ah = 5     Set Page number al, 0 = 1st page
  749.            ah = 6     Up scroll screen
  750.                         Call with:  al = # bottom lines to clear, set 0 for all
  751.                                     bh = attribute to fill cleared lines
  752.                                     ch/cl = row/column of top left scroll corner
  753.                                     dh/dl = row/column of bottom right scroll corner
  754.            ah = 7     Down scroll screen
  755.                         Call with:  al = # top lines to clear, set 0 for all
  756.                                     bh = attribute to fill cleared lines
  757.                                     ch/cl = row/column of top left scroll corner
  758.                                     dh/dl = row/column of bottom right scroll corner
  759.            ah = 8     Get character & attribute at cursor
  760.                         Call with:  bh = page number, 0 = 1st page
  761.                         Returns:    ah/al = attribute/character
  762.            ah = 9     Write character & attribute at cursor (graphics modes)
  763.                         Call with:  al = character
  764.                                     bh = page number, 0 = 1st page
  765.                                     bl = attribute, bit 7 = 1 to xor with old color
  766.                                     cx = Number of same characters to write
  767.            ah = 0Ah   Write character at cursor (graphics modes)
  768.                         Call with:  al = character
  769.                                     bh = page number, 0 = 1st page
  770.                                     cx = Number of same characters to write
  771.            ah = 0Bh   Set colors (typically in low res modes)
  772.                         Call with:  bh = 0, bl = color low res background, border
  773.                                     bh = 1, bl = 0/1 for low res color group 0/1
  774.            ah = 0Ch   Write graphics dot
  775.                         Call with:  al = color, bit 7 = 1 to xor bit with old color
  776.                                     cx/dx = pixel row/pixel column
  777.            ah = 0Dh   Read graphics dot
  778.                         Call with:  cx/dx = pixel row/pixel column
  779.            ah = 0Eh   Write in ASCII mode (cr, lf, bell, and bs as operators)
  780.                         Call with:  al/bl = character/color
  781.            ah = 0Fh   Get video info
  782.                         Returns:    ah = columns active
  783.                                     al = active video mode
  784.                                     bh = active page, 0 = 1st page
  785.            ah = 10h   Colors  (EGA/VGA)   Called with al = subfunction
  786.                         al = 1    bl = color register (0-15)  bh = color to set
  787.                         al = 2    es:dx = ptr to change all 16 colors & overscan #
  788.                         al = 3    bl = color high bit as: 0-intensity, 1-blink
  789.                       For VGA equipped systems only
  790.                         al = 7    bl = color register to get in bh
  791.                         al = 8    bh = returned overscan value
  792.                         al = 9    es:dx = ptr where to put all 16 colors & overscan
  793.                         al = 10h  bx = color register to set; ch/cl/dl = grn/blu/red
  794.                         al = 12h  es:dx = ptr to change color registers
  795.                                   bx = 1st register to set, cx = # of registers
  796.                         al = 13h  bl = 0, set color page mode in bh
  797.                                   bl = 1, set page;  bh = page number
  798.                         al = 15h  bx = color reg to read; ch/cl/dl = grn/blu/red
  799.                         al = 17h  es:dx = ptr where to load color regs
  800.                                   bx = 1st register to get, cx = # of registers
  801.                         al = 1Ah  get color page info; bl = mode; bh = page #
  802.            ah = 11h   Reset mode with new character set (leave memory as-is)
  803.                         al = 0    Character set load
  804.                                   es:bp = ptr to table of chars
  805.                                   bl/bh = which block/bytes per char
  806.                                   cx/dx = # of characters/where to start in block
  807.                         al = 1    bl = block to load the mono character set
  808.                         al = 2    bl = block to load the double wide character set
  809.                         al = 3    bl = block select related to attribute
  810.                         al = 4    bl = block to load the 8 by 16 set (VGA)
  811.                         al = 10h - 14h same as 0 - 4, must occur after setting mode
  812.                         al = 20h  es:bp = ptr to table of char, using int 1Fh ptr
  813.                         al = 21h  es:bp = ptr to table of char, using int 43h ptr
  814.                                   bl = 0-dl=# rows; 1-14 rows; 2-25 rows; 3-43 rows
  815.                                   cx = number of bytes per character in table
  816.                         al = 22h  use 8 by 14 char set, bl=rows (see al=21h)
  817.                         al = 23h  use double wide char set, bl=rows (see al=21h)
  818.                         al = 24h  use 8 by 16 char set, bl=rows (see al=21h)
  819.                       Get table pointer and info
  820.                         al = 30h  es:bp = ptr returned; cx=bytes per char; dl=rows
  821.                                   bh = 0, get int 1Fh      bh = 4, get double wide
  822.                                   bh = 1, get int 43h      bh = 5, get mono 9 by 14
  823.                                   bh = 2, get 8 by 14      bh = 6, get 8 by 16 (VGA)
  824.                                   bh = 3, get double wide  bh = 7, get 9 by 16 (VGA)
  825.            ah = 12h   Miscellaneous functions, bl = sub-function
  826.                         bl = 10h  Get info,  bh = 0-now color, 1-now mono
  827.                                   ch/cl = info bits/switches
  828.                         bl = 20h  Set print screen to work with EGA/VGA
  829.                       Functions for VGA only (bl = 30-34h return al = 12h)
  830.                         bl = 30h  Set # of scan lines, 0-200, 1-350, 2-400
  831.                                     activates after mode change
  832.                         bl = 31h  ax = 0/1  allow/prevent palette load with new mode
  833.                         bl = 32h  al = 0/1  video off/on
  834.                         bl = 33h  al = 0/1  gray scale summing off/on
  835.                         bl = 34h  al = 0/1  scale cursor size to font off/on
  836.                         bl = 35h  switch between adapter and motherboard video
  837.                                   al = 0, adapter off, es:dx = save state area
  838.                                   al = 1, motherboard on
  839.                                   al = 2, active video off, es:dx = save area
  840.                                   al = 3, inactive video on, es:dx = save area
  841.                         bl = 36h  al = 0/1  screen off/on
  842.            ah = 13h   Write character string (cr, lf, bell, and bs as operators)
  843.                         Call with:  al = 0/1 write characters, cursor not/is moved
  844.                                           bl = attribute of all characters
  845.                                        = 2/3 write characters, cursor not/is moved
  846.                                           string alternates character & attribute
  847.                                     bh = page number, 0 = 1st page
  848.                                     cx = number of characters
  849.                                     dh/dl = row and column to start
  850.                                     es:bp = ptr to character string
  851.            ah = 14h   LCD display support, al = sub-function
  852.                          al = 0,    es:di = ptr to font table to load
  853.                                     bl/bh = which block/bytes per char
  854.                                     cx/dx = # of characters/where to start in block
  855.                          al = 1,    bl = block # of ROM font to load
  856.                          al = 2,    bl = how to support high intensity
  857.            ah = 15h   LCD info table ptr returned in es:di
  858.                          ax = 0      there is no alternate adapter
  859.                          ax = 5140h  LCD is the alternate
  860.                          ax = 5153h  CGA is alternate
  861.                          ax = 5151h  MDA is alternate
  862.      
  863.                               **** VGA SUPPORT ONLY ****
  864.            ah = 1Ah   Get/Set types of displays which are operating
  865.                          al = 0, get displays, returns al = 1Ah
  866.                                  bl = in use display code
  867.                                  bh = alternate display code
  868.                          al = 1, set codes, returns al = 1Ah
  869.                                  bl = in use display code
  870.                                  bh = alternate display code
  871.                          codes:   0 = no display
  872.                                   1 = mono display
  873.                                   2 = CGA
  874.                                   4 = EGA, color
  875.                                   5 = EGA, mono
  876.                                   6 = PGA
  877.                                   7 = VGA, mono  (PS/2 MCA only)
  878.                                   8 = VGA, color (PS/2 MCA only)
  879.                                  Bh = VGA, mono  (PS/2 non MCA)
  880.                                  Ch = VGA, color (PS/2 non MCA)
  881.                                 FFh = display type not known
  882.            ah = 1Bh   Get video system information
  883.                          call with:  bx = 0
  884.                                      es:di = ptr to buffer where to put info
  885.            ah = 1Ch   Video system save & restore, al = sub-function
  886.                          call with:  al = 0, get buffer size
  887.                                         = 1, save system, buffer at es:bx
  888.                                         = 2, restore system, buffer at es:bx
  889.                                      cx bit 0 = 1 for hardware registers
  890.                                         bit 1 = 1 for software states
  891.                                         bit 2 = 1 for colors & DAC registers
  892.  
  893. 11
  894.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 11h ▒▒▒▒▒
  895.      
  896.       EQUIPMENT INSTALLED
  897.      
  898.          Returns:   ax = equip_install word
  899.      
  900.                          15   14   13   12   11   10    9    8
  901.                           \    /       game  \          /
  902.                          # of printer  port   # of RS-232
  903.                           ports 0-3    used    ports 0-4
  904.      
  905.                           7    6    5    4    3    2    1    0
  906.                           \    /    \    /    \    /  Math   |
  907.                            # of   video mode   RAM     uP    no
  908.                           floppy  at boot up  00=16K       floppy
  909.                           drives  00=EGA      01=32K       drive
  910.                             1-4   01=CGA-40   10=48K       if 0
  911.                           if bit  10=CGA-80   11=64K
  912.                            0 = 1  11=MDA-80   (old PCs)
  913.       
  914.                          Note: bit 13 = modem on PC lap-tops
  915.                                bit  2 = mouse on PS/2
  916.          
  917.          Regs used: ax
  918.  
  919. 12
  920.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 12h ▒▒▒▒▒
  921.      
  922.       SYSTEM MEMORY SIZE
  923.      
  924.          Returns:   ax = number of contiguous 1K bytes blocks of memory
  925.                          from 0 to 640 K.
  926.      
  927.          Regs used: ax
  928.  
  929. 13
  930.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 13h ▒▒▒▒▒
  931.      
  932.       FLOPPY DISK SERVICES
  933.      
  934.          Note: Floppy disk services may be vectored to this routine from int 40h
  935.                on newer systems with hard disk support inside the BIOS.
  936.      
  937.          Call with: ah = sub-function number
  938.                     dl = drive number (unless otherwise noted), drive a: = 0
  939.      
  940.          Returns:   carry = 0 if function ok
  941.                     ah = status (unless otherwise noted)
  942.                       ah = 0    Function ok
  943.                       ah = 1    Invalid value passed or unsupported function
  944.                       ah = 2    Can not locate address mark
  945.                       ah = 3    Floppy write protected
  946.                       ah = 4    Sector not found
  947.                       ah = 6    Floppy changed line on (1.2 meg drives)
  948.                       ah = 8    DMA overrun occurred
  949.                       ah = 9    DMA attempted across 64K byte boundary
  950.                       ah = 0Ch  Media type not found
  951.                       ah = 10h  CRC read error
  952.                       ah = 20h  Floppy controller failure
  953.                       ah = 40h  Seek operation failed
  954.                       ah = 80h  Floppy drive not ready
  955.      
  956.          Functions:
  957.            ah = 0     Floppy disk controller reset
  958.            ah = 1     Get last status
  959.            ah = 2     Read sectors
  960.                         Call with:  al = number of sectors to read
  961.                                     ch/cl = starting track/starting sector
  962.                                     dh = head number, head 0 = 0
  963.                                     es:bx = ptr to buffer where to put data
  964.            ah = 3     Write sectors
  965.                         Call with:  al = number of sectors to write
  966.                                     ch/cl = starting track/starting sector
  967.                                     dh = head number, head 0 = 0
  968.                                     es:bx = ptr to buffer where to get data
  969.                         Return:     al = number of sectors written
  970.            ah = 4     Verify sectors
  971.                         Call with:  al = number of sectors to compare
  972.                                     ch/cl = starting track/starting sector
  973.                                     dh = head number, head 0 = 0
  974.                                     es:bx = ptr to buffer where to compare data
  975.                         Return:     al = number of sectors checked
  976.            ah = 5     Format track
  977.                         Call with:  al = number of sectors to format
  978.                                     ch/cl = starting track/starting sector
  979.                                     dh = head number, head 0 = 0
  980.                                     es:bx = ptr to table of address fields
  981.            ah = 8     Get drive information (not supported by all systems)
  982.                         Returns:    ax/bh = 0          size dia.     size dia.
  983.                                     bl = drive type: 1=360K 5.25   3=720K 3.5
  984.                                                      2=1.2M 5.25   4=1.4M 3.5
  985.                                     cx bits 7&6, 15-8 = number of tracks, 0=1 track
  986.                                        bits 5-0 = number of sectors per track
  987.                                     dh/dl = # of heads/number of floppy drives
  988.                                     es:di = ptr to floppy parameter table
  989.            ah = 15h   Get drive type (not supported by all systems)
  990.                         Returns:    ah = 0 no drive
  991.                                     ah = 1/2  floppy changed line not/is available
  992.            ah = 16h   Get changed floppy status (not supported by all systems)
  993.                         Returns:    ah = 0   floppy in drive,     carry = 0
  994.                                     ah = 1   bad drive number,    carry = 1
  995.                                     ah = 6   floppy out of drive, carry = 1
  996.                                     ah = 80h drive not ready,     carry = 1
  997.            ah = 17h   Specify media type for a drive
  998.                         Call with:  al = 1  use a 320/360K floppy in 360k drive
  999.                                     al = 2  use a 360K floppy in a 1.2M drive
  1000.                                     al = 3  use a 1.2M floppy in a 1.2M drive
  1001.                                     al = 4  use a 720K disk in a 720K drive
  1002.            ah = 18h   Prepare for format (not supported by all systems)
  1003.                         Call with:  cx bits 7&6, 15-8 = number of tracks, 0=1 track
  1004.                                        bits 5-0 = number of sectors per track
  1005.                         Returns:    es:di = ptr to floppy parameter table
  1006.  
  1007. 14
  1008.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 14h ▒▒▒▒▒
  1009.      
  1010.       RS-232 SERIAL PORTS SERVICES
  1011.      
  1012.          Call with: ah = sub-function number
  1013.                     dx = communications number, com1 = 0
  1014.      
  1015.          Returns:   ah = line status,  bit 0 = Data ready
  1016.                                        bit 1 = Overrun error
  1017.                                        bit 2 = Parity error
  1018.                                        bit 3 = CRC framing error
  1019.                                        bit 4 = Break detect
  1020.                                        bit 5 = Xmit buffer register empty
  1021.                                        bit 6 = Xmit shift out register empty
  1022.                                        bit 7 = No response, ignore bits 0-6
  1023.      
  1024.                     al = modem status, bit 0 = Change in Clear To Send
  1025.                                        bit 1 = Change in Data Set Ready
  1026.                                        bit 2 = Falling edge ring detect
  1027.                                        bit 3 = Change in receive detect line
  1028.                                        bit 4 = Clear to Send (CTS)
  1029.                                        bit 5 = Data Set Ready (DTS)
  1030.                                        bit 6 = Ring detected
  1031.                                        bit 7 = Receive detect line
  1032.      
  1033.          Functions:
  1034.            ah = 0     Reset the specified port
  1035.                         Call with:  al serial port register values
  1036.                                        bits  7    6    5    4    3    2    1    0
  1037.                                             --baud-rate--  -Parity- Stop  --Word--
  1038.                                              000 =  110      bits    bit    size
  1039.                                              001 =  150                    (bits)
  1040.                                              010 =  300    00 = off  0=1
  1041.                                              011 =  600    01 = odd  1=2   10 = 7
  1042.                                              100 = 1200    10 = off        11 = 8
  1043.                                              101 = 2400    11 = even
  1044.                                              110 = 4800
  1045.                                              111 = 9600
  1046.           ah = 1      Transmit a character
  1047.                         Call with:  al = character to send (not changed on exit)
  1048.           ah = 2      Received a character
  1049.                         Returns:    al = character received
  1050.           ah = 3      Get status
  1051.           ah = 4      Advanced Initialization (not supported on all systems)
  1052.                         Call with:  al = 0/1  no break/break
  1053.                                     bh = Parity,    0 = none     3 = stick odd
  1054.                                                     1 = odd      4 = stick even
  1055.                                                     2 = even
  1056.                                     bl = 0/1 Stop bits set to 1/2
  1057.                                     ch = Word size, 0 = 5 bits   2 = 7 bits
  1058.                                                     1 = 6 bits   3 = 8 bits
  1059.      
  1060.                                     cl = Baud rate, 0 =  110     5 =  2400
  1061.                                                     1 =  150     6 =  4800
  1062.                                                     2 =  300     7 =  9600
  1063.                                                     3 =  600     8 = 19200
  1064.                                                     4 = 1200
  1065.            ah = 5     Advanced port control (not supported on all systems)
  1066.                         al = 0  Get modem register
  1067.                                   Returns: bl bit 0 = Data Terminal Ready (DTR)
  1068.                                               bit 1 = Request To Send (RTS)
  1069.                                               bit 2 = Out 1
  1070.                                               bit 3 = Out 2
  1071.                                               bit 4 = Loop modem
  1072.                         al = 1  Set modem register
  1073.                                   Call with:  bl = value for register (see above)
  1074.  
  1075. 15
  1076.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 15h ▒▒▒▒▒
  1077.      
  1078.       GENERAL SERVICES
  1079.      
  1080.          On old PCs this function is only used for cassette servicing.
  1081.          Additional functions have been added for advanced features with
  1082.          newer equipment.
  1083.      
  1084.          Called with: ah = function code
  1085.      
  1086.          Returns:     CF = 0 if successful
  1087.                       CF = 1 if failure or function not supported
  1088.      
  1089.          Functions:
  1090.            ah = 0     Cassette motor set on
  1091.            ah = 1     Cassette motor set off
  1092.            ah = 2     Read cx bytes from cassette, es:bx = ptr to load area
  1093.            ah = 3     Write cx bytes to cassette,  es:bx = ptr to read area
  1094.            ah = 0Fh   Disk format hook, called from disk format routines
  1095.                         after a cylinder access completed.  Called with:
  1096.                         al = 1-undergoing surface analysis, 2-if formating
  1097.            ah = 21h   Error log (PS 2), al = 0 to read, al = 1 to write
  1098.      
  1099.                            ***  LAP TOP MACHINES ONLY - 40h to 44h  ***
  1100.            ah = 40h   Systems info in cx, bx - al = 0 to read, 1 to write
  1101.                         for modem info in bx - al = 2 to read, 3 to write
  1102.            ah = 41h   Wait for an event, dx = i/o port to read or use es:di
  1103.                         as ptr to user event.  al = type of event 0-4,11-14
  1104.                         bh = event mask, bl = # of 55ms counts to timeout
  1105.            ah = 42h   Power off, al = 0 or 1 for mode of power off
  1106.            ah = 43h   Get system status in al
  1107.                             7     6     5     4       3     2     1    0
  1108.                           low   extrn  bad  pwr up  modem  ports      LCD
  1109.                         battery  pwr  time  alarm    on     on      missing
  1110.            ah = 44h   Modem power, al = 0 turn off,  al = 1 turn on
  1111.      
  1112.                          *** FUNCTIONS IN RECENT BIOS VERSIONS ONLY ***
  1113.            ah = 4Fh   Keyboard input hook, called every keystroke with
  1114.                         al = scan code.  CF = 1 to change or use the scan
  1115.                         code in al.  CF = 0 to ignore the key.
  1116.            ah = 80h   Open device number bx, in process number cx.
  1117.            ah = 81h   Close device number bx, in process number cx.
  1118.            ah = 82h   Terminate device number bx
  1119.            ah = 83h   Wait for timeout, and set bit 15 at ptr es:bx when
  1120.                         timed out.  al = 0 to set wait period cx:dx uSec,
  1121.                         al = 1 to stop timeout timer.
  1122.            ah = 84h   Game port read, dx = 0 to read switches into al
  1123.                         high nibble,  dx = 1 to read linear position
  1124.                         (Unit 1: ax = x, bx = y   Unit 2: cx = x, dx = y)
  1125.            ah = 85h   Get system request key state, al = 0 down, al = 1 up
  1126.            ah = 86h   Wait cx:dx microseconds before return
  1127.            ah = 87h   Transfer cx words to/from memory above 1 meg
  1128.                         es:si ptr to table with source & destination ptrs:
  1129.                         es:si -> zeros          db  16dup(0)
  1130.                                  src_seg_limit  dw  ?        ; 1-64K bytes
  1131.                                  scr_ptr_low    dw  ?        ; 0-64K range
  1132.                                  scr_ptr_high   db  ?        ; 0-16 Meg range
  1133.                                  scr_rights     db  93h      ; r/w access
  1134.                                  scr_zero       dw  0
  1135.                                  dst_seg_limit  dw  ?        ; 1-64K bytes
  1136.                                  dst_ptr_low    dw  ?        ; 0-64K range
  1137.                                  dst_ptr_high   db  ?        ; 0-16 Meg range
  1138.                                  dst_rights     db  93h      ; r/w access
  1139.                                  dst_zero       dw  0
  1140.                                  zeros2         db  16dup(0)
  1141.                         Notes:
  1142.                           cx = 32K words max xfer, ptr_low & ptr_high form
  1143.                           a 24 bit physical address (do not use a segment)
  1144.                         Return codes: al = 0 if ok, al = 1 parity error
  1145.                           al = 2 other errors, al = 3 gate addr line 20 bad
  1146.            ah = 88h   Get extended memory size (above 1 Meg boundary)
  1147.                         ax = (number of bytes / 1024)
  1148.            ah = 89h   Go to protected mode of operation. es:si ptr to table
  1149.                         comprised of 8 groups of 8 byte ptr sub-arrays.  Each.
  1150.                         group is formed from 8 bytes as follows:
  1151.                             seg_limit    dw  ?     ; 1-64K bytes
  1152.                             ptr_low      dw  ?     ; 0-64K range
  1153.                             ptr_high     db  ?     ; 0-16 Meg range
  1154.                             rights       db  93h   ; read/write access
  1155.                             zero         dw  0     ; set to zero
  1156.                         Ptr_low & high form a 24 bit physical address.
  1157.      
  1158.                         The 8 groups are as follows:
  1159.                           es:si ->  Group_1   Set to all zero
  1160.                                     Group_2   ptr to beginning of Group_1
  1161.                                     Group_3   ptr to Interrupt Descript Table IDT
  1162.                                     Group_4   ptr to present DS segment
  1163.                                     Group_5   ptr to present ES segment
  1164.                                     Group_6   ptr to present SS segment
  1165.                                     Group_7   ptr to present CS segment
  1166.                                     Group_8   ptr where to jump to when done
  1167.                         Also: bh & bl set as offset from beginning of IDT to
  1168.                           spot where 1st & 2nd set of 8 hardware interrupts begin.
  1169.                         Returns ah = 0 if ok, regs changed: ax,bp,ds,es,ss,cs
  1170.            ah = 90h   Device busy - used to signal DOS when it must wait.
  1171.                         Type   0  Disk timeout          0FCh  Hard disk timeout
  1172.                         codes  1  Floppy timeout                (PS 2 only)
  1173.                         (al)   2  Keyboard no timeout   0FDh  Floppy motor timeout
  1174.                                3  Mouse timeout         0FEh  Printer timeout
  1175.                              80h  Local area network (es:bx = network cntrl block
  1176.                         Returns CF = 0 if failure, 1 if minimum wait time occurred
  1177.            ah = 91h   Interrupt done - used to signal DOS when hardware done
  1178.                         al = type code (Device busy type codes)
  1179.            ah = C0h   Get ROM system information table ptr in es:bx.  See data
  1180.                         area starting at byte "sys_info_size".
  1181.      
  1182.                          *** PS 2 & COMPATIBLES ONLY - C1h to C4h ***
  1183.            ah = C1h   Get Extended BIOS data area segment in es
  1184.            ah = C2h   Mouse support (BIOS).  Sub-function code in al
  1185.                           al = 0  if bh = 0 mouse off, bh = 1 mouse on
  1186.                           al = 1  reset mouse & parameters, returns bh = 0
  1187.                                     bl altered on return
  1188.                           al = 2  Set number of updates per second in bh,
  1189.                                     bh = 0 - 10 updates/sec  4 - 80  updates/sec
  1190.                                          1 - 20 updates/sec  5 - 100 updates/sec
  1191.                                          2 - 40 updates/sec  6 - 200 updates/sec
  1192.                                          3 - 60 updates/sec
  1193.                           al = 3  Set resolution in counts per millimeter:
  1194.                                     bh = 0 - 1 cnts per mm   2 - 4 cnts per mm
  1195.                                          1 - 2 cnts per mm   3 - 8 cnts per mm
  1196.                           al = 4  Get device type, bh = 0
  1197.                           al = 5  Initialize pointing device interface data size
  1198.                                     bh = size 1 to 8 (1 to 8 bytes)
  1199.                           al = 6  Additional sub-functions in bh:
  1200.                                     bh = 0  Get status, cl = cnts per mm (see al=3)
  1201.                                             dl = updates/sec in hex, bl = status:
  1202.                                                  bit 6 = mode (0=stream, 1=remote)
  1203.                                                      5 = 0 disabled, 1 enabled
  1204.                                                      4 = scaling (0=1:1, 1=2:1)
  1205.                                                      2 = Left button pressed
  1206.                                                      0 = right button pressed
  1207.                                     bh = 1  Set scaling to 1:1
  1208.                                     bh = 2  Set scaling to 2:1
  1209.                           al = 7  Set location to "call far" when data available
  1210.                                      in es:bx
  1211.                         Return code for all sub-functions in al:
  1212.                           al = 0  successful             3  interface error
  1213.                                1  bad function call      4  resend
  1214.                                2  invalid input          5  no far call installed
  1215.            ah = C3h   Watchdog timer mode al = 0 disable, al = 1 enable,
  1216.                         bx = set counter value 1 to FFh
  1217.            ah = C4h   Bus option select (POS) subfunction in al,
  1218.                         al = 0  Get base POS adapter register address in dx
  1219.                              1  Enable setup for slot bl
  1220.                              2  Adapter enable
  1221.  
  1222. 16
  1223.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 16h ▒▒▒▒▒
  1224.      
  1225.       KEYBOARD SERVICES
  1226.      
  1227.          Call with:   ah = sub-function number
  1228.      
  1229.          Functions:
  1230.            ah = 0     Get a key, and wait until one is available if none are
  1231.                         in the queue.
  1232.                         Returns:    ah = keyboard scan code
  1233.                                     al = ASCII character, or 0 if non-ASCII
  1234.            ah = 1     Get key status
  1235.                         Returns:    zero flag = 0 if a valid key is in the queue
  1236.                                         ah = keyboard scan code
  1237.                                         al = ASCII character, or 0 if non-ASCII
  1238.                                     zero flag = 1 if no keys in the queue
  1239.            ah = 2     Get shift status register
  1240.                         Returns:    al = bits  7    6    5    4    3    2    1    0
  1241.                                              right left ctrl alt scrl  num  cap insrt
  1242.                                              -------shifts------ ------toggles-------
  1243.                                                    1 = down            1 = on
  1244.            ah = 3     Set repeating character rate (not supported in all systems)
  1245.                         Call with:  al = 5
  1246.                                     bh = start delay, 0 = 250 ms    2 =  750 ms
  1247.                                                       1 = 500 ms    3 = 1000 ms
  1248.                                     bl = speed in characters per second - values
  1249.                                            range from 0 = 30 cps, to 1Fh = 2 cps
  1250.            ah = 5     Load keyboard queue (not supported in all systems)
  1251.                         Call with:  ch/cl = scan code/character to load into the queue
  1252.                         Returns:    al = 0 if ok, 1 if keyboard queue is full
  1253.      
  1254.                            **** Support for extended keyboard functions ****
  1255.            ah = 10h   Get a key (similar to ah = 0, not supported in all systems)
  1256.            ah = 11h   Get key status (similar to ah = 1, not supported in all systems)
  1257.            ah = 12h   Get shift info (similar to ah = 2, not supported in all systems)
  1258.  
  1259. 17
  1260.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 17h ▒▒▒▒▒
  1261.      
  1262.       PRINTER SERVICES
  1263.      
  1264.          Call with:  ah = function code
  1265.                      dx = printer number 0-2 (some systems allow 0-3)
  1266.      
  1267.          Returns:    ah = status bits
  1268.                            7      6      5      4      3     2  1     0
  1269.                           not  acknow-  no   select   I/O   unused   no
  1270.                           busy  ledge  paper         error        response
  1271.                           __________from printer__________
  1272.      
  1273.          Functions:
  1274.            ah = 0   Send character to printer, al = character
  1275.            ah = 1   Printer port initialization
  1276.            ah = 2   Get printer status in ah
  1277.  
  1278. 18
  1279.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 18h ▒▒▒▒▒
  1280.      
  1281.       ROM BASIC
  1282.  
  1283. 19
  1284.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 19h ▒▒▒▒▒
  1285.      
  1286.       BOOTSTRAP LOADER
  1287.      
  1288.          Floppy drive a: attempts a read from the first sector of the disk.
  1289.          If read properly (i.e a boot disk is in drive a:), control is
  1290.          transferred to the loaded program.  The boot sector at track 0,
  1291.          sector 1 is transfered to memory at 0:7C00h.  dh = drive which
  1292.          was used (0=A:).  Control is passed to 0:7C00h.
  1293.  
  1294. 1A
  1295.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Ah ▒▒▒▒▒
  1296.      
  1297.       REAL-TIME CLOCK SERVICES
  1298.      
  1299.          Call with:   ah = sub-function number
  1300.      
  1301.          Functions:
  1302.            ah = 0     Get system timer (increments every 54.92 ms from int 8)
  1303.                         Returns:    al = # of 24 hour periods since read/powered up
  1304.                                     cx:dx = 32 bit count
  1305.            ah = 1     Get system timer & reset 24 hour counter
  1306.                         Returns:    cx:dx = 32 bit count
  1307.      
  1308.                         **** System must have CMOS clock for services 2-0Bh ****
  1309.            ah = 2     Get time in BCD format
  1310.                         Returns:    ch/cl = hours/minutes
  1311.                                     dh = seconds
  1312.                                     dl = 0/1 if daylight savings time operation off/on
  1313.                                     carry flag = 0 if clock ok, 1 if stopped
  1314.            ah = 3     Set time in BCD format
  1315.                         Call with:  ch/cl = hours/minutes
  1316.                                     dh = seconds
  1317.                                     dl = 0/1 if daylight savings time operation off/on
  1318.            ah = 4     Get date in BCD format
  1319.                         Returns:    cx = four digit year
  1320.                                     dh/dl = month/day
  1321.                                     carry flag = 0 if clock ok, 1 if stopped
  1322.            ah = 5     Set date in BCD format
  1323.                         Call with:  cx = four digit year
  1324.                                     dh/dl = month/day
  1325.            ah = 6     Set 24 hour alarm (alarm vectors to int 4Ah)
  1326.                         Call with:  ch/cl = hours/minutes
  1327.                                     dh = seconds
  1328.            ah = 7     Clear alarm
  1329.            ah = 9     Get alarm time & status
  1330.                         Returns:    ch/cl = hours/minutes
  1331.                                     dh = seconds
  1332.                                     dl = 0/1 alarm off/on
  1333.            ah = 0Ah   Get days counter
  1334.                         Returns:    cx = number of days since 1-Jan-80
  1335.            ah = 0Bh   Set days counter
  1336.                         Call with:  cx = number of days since 1-Jan-80
  1337.  
  1338. 1B
  1339.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Bh ▒▒▒▒▒
  1340.      
  1341.       KEYBOARD BREAK (when Control-Break pressed)
  1342.  
  1343. 1C
  1344.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Ch ▒▒▒▒▒
  1345.      
  1346.       TIMER TICKS - Called every 18.2 ms
  1347.  
  1348. 1D
  1349.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 40h ▒▒▒▒▒
  1350.      
  1351.       FLOPPY DISK SERVICES
  1352.  
  1353. 1E
  1354.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 70h ▒▒▒▒▒
  1355.      
  1356.       REAL-TIME CLOCK  (called by hardware 8259-2, IRQ 8)
  1357.      
  1358.          This interrupt services the real-time clock hardware.  The hardware
  1359.          supports 2 modes of operation, an interrupt at a specific 24 hour
  1360.          interval (i.e 9:42 am), or repeatedly every 0.976 ms (1,024 Khz).
  1361.          Both modes can operate at the same time if needed.
  1362.      
  1363.          In the 24 hour alarm mode, the interrupt is vectored here by hardware
  1364.          and interrupt 4Ah is called to alert the application program of the
  1365.          alarm.  Int 4Ah is not handled by the BIOS other than to return, and
  1366.          is normally revectored by a particular application using the alarm.
  1367.      
  1368.          When repeating interrupt mode is active, the 32-bit microsecond
  1369.          counter consisting of timer_clk_low and timer_clk_hi is decremented
  1370.          by 976 us on every interrupt.  When the timer reaches zero, the
  1371.          byte pointed to by the offset @timer_wait_off and and segment
  1372.          @timer_wait_seg is set to 80h (this pointer is set by an application
  1373.          program through int 1Ah function ah=6).
  1374.  
  1375. 1F
  1376.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 71h ▒▒▒▒▒
  1377.      
  1378.       LAN ADAPTER 1  (called by hardware 8259-2, IRQ 9)
  1379.      
  1380.          Calls interrupt 0Ah.
  1381.  
  1382. 20
  1383.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 72h ▒▒▒▒▒
  1384.      
  1385.       Hardware servicer (called by hardware 8259-2, IRQ 10)
  1386.  
  1387. 21
  1388.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 73h ▒▒▒▒▒
  1389.      
  1390.       Hardware servicer (called by hardware 8259-2, IRQ 11)
  1391.  
  1392. 22
  1393.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 74h ▒▒▒▒▒
  1394.      
  1395.       Hardware servicer (called by hardware 8259-2, IRQ 12)
  1396.  
  1397. 23
  1398.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 75h ▒▒▒▒▒
  1399.      
  1400.       MATH CO-PROCESSOR (called by hardware 8259-2 IRQ 13)
  1401.      
  1402.          The math co-processor 80287 invokes this interrupt.  Int 75h calls
  1403.          the non-maskable interrupt int 2 to halt the system (80287 is not
  1404.          used if this vector is left pointing here).  Programs which use
  1405.          the 80287 must re-vector this interrupt to use the 80287.
  1406.  
  1407. 24
  1408.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 76h ▒▒▒▒▒
  1409.      
  1410.       HARD DISK CONTROLLER (called by hardware 8259-2 IRQ 14)
  1411.      
  1412.          When the hard disk controller has completed its task, it signals
  1413.          completion though hardware activation of int 76h.  The status in
  1414.          hdsk_int_flags is set to "done", a value of 0FFh.  Interrupt 15,
  1415.          function 91h may also be called to signal the interrupt is done.
  1416.  
  1417. 25
  1418.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 77h ▒▒▒▒▒
  1419.      
  1420.       Future servicer (called by hardware 8259-2 IRQ 15)
  1421.  
  1422. 26
  1423.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 13h ▒▒▒▒▒
  1424.      
  1425.       HARD DISK SERVICES
  1426.      
  1427.          Call with: ah = sub-function number 
  1428.                     dl = drive number (unless otherwise noted) 80h or 81h
  1429.                            for fixed disk 0 or 1.
  1430.      
  1431.          Returns:   carry = 0 if function ok
  1432.                     ah = status (unless otherwise noted)
  1433.                       ah = 0    Function ok
  1434.                       ah = 1    Invalid value passed or unsupported function
  1435.                       ah = 2    Can not locate address mark
  1436.                       ah = 3    Write protected
  1437.                       ah = 4    Sector not found
  1438.                       ah = 5    Reset failure
  1439.                       ah = 7    Parameter activity failed
  1440.                       ah = 8    DMA overrun occurred
  1441.                       ah = 9    DMA attempted across 64K byte boundary
  1442.                       ah = 0Ah  Sector flag bad
  1443.                       ah = 0Bh  Cylinder bad
  1444.                       ah = 0Dh  Wrong # of sectors (format)
  1445.                       ah = 0Eh  Detected control data address mark
  1446.                       ah = 0Fh  DMA arbitration level has invalid range
  1447.                       ah = 10h  CRC or EDC (Error Detect & Correct) has an
  1448.                                   unresolvable error
  1449.                       ah = 11h  Data corrected by EDC
  1450.                       ah = 20h  Disk controller failure
  1451.                       ah = 40h  Seek operation failed
  1452.                       ah = 80h  Hard disk not ready
  1453.                       ah = BBh  Error not defined
  1454.                       ah = CCh  Write error
  1455.                       ah = E0h  Error register is zero
  1456.                       ah = FFh  Disk sense error
  1457.                     If dl bit 7 was set to 1 on entry:
  1458.                       cx bits 7&6, 15-8 = highest cylinder number
  1459.                          bits 0-5 = highest sector number
  1460.                       dh = highest head number
  1461.                       dl = number of hard disks (1 or 2)
  1462.      
  1463.          Functions:
  1464.            ah = 0     Hard disk controller reset
  1465.            ah = 1     Get last status
  1466.            ah = 2     Read sectors
  1467.                         Call with:  al = number of sectors to read
  1468.                                     cx bits 7&6, 15-8 = cylinder number
  1469.                                        bits 0-5 = sector number
  1470.                                     dh = head number, head 0 = 0
  1471.                                     es:bx = ptr to buffer where to put data
  1472.            ah = 3     Write sectors
  1473.                         Call with:  al = number of sectors to write
  1474.                                     cx bits 7&6, 15-8 = cylinder number
  1475.                                        bits 0-5 = sector number
  1476.                                     dh = head number, head 0 = 0
  1477.                                     es:bx = ptr to buffer where to get data
  1478.            ah = 4     Verify sectors
  1479.                         Call with:  al = number of sectors to compare
  1480.                                     cx bits 7&6, 15-8 = cylinder number
  1481.                                        bits 0-5 = sector number
  1482.                                     dh = head number, head 0 = 0
  1483.            ah = 5     Format cylinder (non-ESDI type disks)
  1484.                         Call with:  cx bits 7&6, 15-8 = cylinder number
  1485.                                     dh = head number, head 0 = 0
  1486.                                     es:bx = ptr to bad sector map (non XT)
  1487.                                     al = interleave number (XT only)
  1488.            ah = 6     Format cylinder & set bad sector flags (XT only)
  1489.                         Call with:  al = interleave number
  1490.                                     cx bits 7&6, 15-8 = cylinder number
  1491.                                     dh = head number, head 0 = 0
  1492.            ah = 7     Format drive, begin at specific cylinder (XT only)
  1493.                         Call with:  al = interleave number
  1494.                                     cx bits 7&6, 15-8 = cylinder number
  1495.                                     dh = head number, head 0 = 0
  1496.            ah = 8     Get drive parameters
  1497.                         Returns:    cx bits 7&6, 15-8 = max cylinder number
  1498.                                        bits 0-5 = max sector number
  1499.                                     dh = max head number, head 0 = 0
  1500.            ah = 9     Set parameters for drive (ignored for ESDI drives)
  1501.                         Call with   dh = 80h to use int 41h ptr, drive 0
  1502.                                     dh = 81h to use int 46h ptr, drive 1
  1503.            ah = 0Ch   Disk seek
  1504.                         Call with:  cx bits 7&6, 15-8 = cylinder number
  1505.                                     dh = head number, head 0 = 0
  1506.            ah = 0Dh   Secondary Disk Reset
  1507.            ah = 10h   Check if drive is ready
  1508.            ah = 11h   Recalibrate drive
  1509.            ah = 15h   Get drive type (all but XT systems)
  1510.                         Returns:    ah = 0 no drive (cx & dx = 0)
  1511.                                     ah = 3 hard disk
  1512.                                     cx:dx = size of disk in 512 byte blocks
  1513.                                     al = 4  use a 720K disk in a 720K drive
  1514.            ah = 19h   Park disk heads (PS/2 systems only)
  1515.            ah = 1Ah   Format hard disk (ESDI only)
  1516.                         Call with:  al = number of blocks in defect table (0=none)
  1517.                                     cl bit 0 = 1 when no primary defect map
  1518.                                        bit 1 = 1 when no secondary defect map
  1519.                                        bit 2 = 1 allow logging found surface errors
  1520.                                                    in the secondary defect map
  1521.                                        bit 3 = 1 Do extended surface analysis
  1522.                                        bit 4 = 1 interrupt after each cyldr format
  1523.  
  1524. 27
  1525.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ unused ▒▒▒▒▒
  1526.      
  1527.       Unused interrupt vector termination
  1528.      
  1529.          This routine processes invalid and unused interrupt requests.  The
  1530.          hardware IRQ number is loaded into gen_int_occured, and the interrupt
  1531.          cleared.  For software calls to an unused interrupt, a value 0FFh is
  1532.          loaded into gen_int_occured, and the routine returns to the caller
  1533.          without changing registers.
  1534.      
  1535.          Alternatively, some systems simply return (iret).
  1536.  
  1537. 28
  1538.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 18h ▒▒▒▒▒
  1539.      
  1540.       ROM BASIC
  1541.      
  1542.          Note: ROM basic points to F600 segment, and has been adjusted to
  1543.                segment F000 to process in-line with the balance of the
  1544.                BIOS code.  Internal data references may shift to segment
  1545.                F600 depending on implementation.
  1546.  
  1547. 29
  1548.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ System Reset ▒▒▒▒▒
  1549.      
  1550.       SYSTEM RESET
  1551.      
  1552.          Reset the computer system.  General operation includes a test of
  1553.          of the CPU, ROM checksum, and initialization of hardware including:
  1554.      
  1555.             Memory system
  1556.             Timer/Counter (which is also used for RAM refresh)
  1557.             Interrupt Controller(s)
  1558.             DMA Controller(s)
  1559.             Keyboard Controller
  1560.             Video Controller & Video RAM
  1561.             Floppy Controller
  1562.             Hard Disk Controller (if present)
  1563.      
  1564.          Portions of the hardware may also have specific tests made to
  1565.          insure reliable operation.  Test failures may display error code
  1566.          on the screen if the video subsystem is operational, or generate
  1567.          beeps or LED blinks to signify the error.
  1568.            
  1569.          Note: A soft reset uses the warm_boot_flag to skip the memory
  1570.                tests. (i.e. from pressing Ctrl-Alt-Del).
  1571.      
  1572.          The system checks for installed ROMs by searching memory from
  1573.          C000h to the beginning of the BIOS, in 2K chunks.  ROM memory is
  1574.          identified if it starts with the word AA55h.  It is followed a one
  1575.          byte field length of the ROM (divided by 512).  If ROM is found,
  1576.          the BIOS will call the ROM at an offset of 3 from the beginning.
  1577.          This feature was not supported in the earliest PC machines.
  1578.      
  1579.          The last task turns control over to the bootstrap loader (assuming
  1580.          the floppy controller is operational)
  1581.  
  1582. 2A
  1583.     ══════ BIOS EXTERNAL ENTRY POINT ═══════════════════════════════════════
  1584.  
  1585. 2B
  1586.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ BIOS Setup ▒▒▒▒▒▒▒
  1587.      
  1588.       BIOS SETUP ROUTINES
  1589.       
  1590.          When a special key combination is pressed, this setup routine is
  1591.          run to allow changing CMOS BIOS values.  Typical key combinations
  1592.          include CTRL-ALT-ESC, CTRL-ALT-S, or others to start the setup.
  1593.           
  1594.          Once invoked, it may issue a system reset to let other application
  1595.          software, other BIOS routines, and TSR's to configure the system
  1596.          with the new information.
  1597.           
  1598.          Typical options include:
  1599.         
  1600.                 Present time and date
  1601.                 Floppy disk settings
  1602.                 Hard disk table selection
  1603.                 Video display
  1604.                 Memory size
  1605.                 Speed of clock and/or bus
  1606.  
  1607. 2C
  1608.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ INTERRUPT ▒▒▒▒▒
  1609.      
  1610. 2D  
  1611.     ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ BIOS Initialization ▒▒▒▒▒▒▒
  1612.       
  1613.       This portion is called when the main computer BIOS passes control to
  1614.       allow this BIOS to perform it's one-time start up code.  
  1615.      
  1616. end
  1617.  
  1618.  
  1619.  ::::::::::::::::::::::::::::: SUBROUTINE REMARKS :::::::::::::::::::::::::::::
  1620.  
  1621.     ---------------------- Subroutine Reference Remarks -----------------------
  1622. end
  1623.  
  1624.  
  1625.         NOTES:  1)  Entries must be in consecutive sequential order.
  1626.                 2)  Remark characters ";" are automatically inserted.
  1627.                 3)  Up to 64,000 characters per remark, 32M maximum file size.
  1628.  
  1629.  
  1630.