home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / asmhelp.zip / BIOS_DOS.DOC next >
Text File  |  1987-10-30  |  29KB  |  1,310 lines

  1. **************************************************************************
  2. **                                    **
  3. **    bios_dos.doc                            **
  4. **                                    **
  5. **    This file documents the services provided by the ROM BIOS and    **
  6. **        DOS of the IBM-PC family of computers.            **
  7. **                                    **
  8. **************************************************************************
  9.  
  10. ROM BIOS
  11. --------
  12.  
  13. rom_prt_sc    ROM PRINT SCREEN SERVICE [int 05]
  14.     in:    none
  15.     out:    0050:0000 = status code
  16.             00 = ready
  17.             01 = busy
  18.             FF = previous operation not completed successfully
  19.  
  20.  
  21. rom_vid        ROM VIDEO SERVICES [int 10]
  22.  
  23. WRITE VIDEO MODE - rom_vid
  24.     in:    ah = wr_vid_mode [00]
  25.         al = mode    00 = 40 X 25 text 16 grey     \
  26.                 01 = 40 X 25 text 16/8 color      |
  27.                 02 = 80 X 25 text 16 grey      |
  28.                 03 = 80 X 25 text 16/8 color      | CGA
  29.                 04 = 320 X 200 graphics 4 color      |
  30.                 05 = 320 X 200 graphics 4 grey      |
  31.                 06 = 640 X 200 graphics b/w     /
  32.                 07 = 80 X 25 text b/w          | MDA
  33.                 08 = 160 X 200 graphics 16 color \
  34.                 09 = 320 X 200 graphics 16 color  | PC-JR
  35.                 0A = 640 X 200 graphics 4 color     /
  36.                 0D = 320 X 200 graphics 16 color \
  37.                 0E = 640 X 200 graphics 16 color  | EGA
  38.                 0F = 640 X 350 graphics 4 color  /
  39.     out:    none
  40.     notes:    Setting mode clears the buffers, clearing the screen (slowly).
  41.  
  42. WRITE CURSOR SIZE - rom_vid
  43.     in:    ah = wr_cur_size [01]
  44.         ch = start line        CGA = 0 to 7, default = 6, 7
  45.         cl = end line        MDA = 0 to 13, default = 12, 13
  46.     out:    none
  47.     notes:    Setting ch bit 5 causes cursor to disappear.  If start line
  48.         is less than end line, a normal single part cursor is created.
  49.         If start line is greater than end line, a two part cursor is
  50.         created.
  51.  
  52. WRITE CURSOR POSITION - rom_vid
  53.     in:    ah = wr_cur_pos [02]
  54.         bh = page (0 for graphics modes)
  55.         dh = row
  56.         dl = col
  57.     out:    none
  58.     notes:    Writing cursor to an off screen position causes it to
  59.         disappear.
  60.  
  61. READ CURSOR POSITION - rom_vid
  62.     in:    ah = rd_cur_pos [03]
  63.     out:    bh = page (0 for graphics modes)
  64.         ch = start line
  65.         cl = end line
  66.         dh = row
  67.         dl = col
  68.  
  69. READ LIGHT PEN POSITION - rom_vid
  70.     in:    ah = rd_pen_pos [04]
  71.     out:    ah = pen trigger switch
  72.             1 = triggered
  73.             0 = not triggered
  74.         bx = pixel col
  75.         ch = pixel row
  76.         dh = char row
  77.         dl = char col
  78.  
  79. WRITE ACTIVE PAGE - rom_vid
  80.     in:    ah = wr_act_page [05]
  81.         al = page
  82.     out:    none
  83.  
  84. PC-JR WRITE ACTIVE PAGE - rom_vid
  85.     in:    ah = wr_act_page [05]
  86.         al = 80
  87.     out:    bh = CRT reg
  88.         bl = CPU reg
  89.  
  90.     in:    ah = wr_act_page [05]
  91.         al = 81
  92.         bl = CPU reg
  93.     out:    bh = CRT reg
  94.         bl = CPU reg
  95.  
  96.     in:    ah = wr_act_page [05]
  97.         al = 82
  98.         bh = CRT reg
  99.     out:    bh = CRT reg
  100.         bl = CPU reg
  101.  
  102.     in:    ah = wr_act_page [05]
  103.         al = 83
  104.         bh = CRT reg
  105.         bl = CPU reg
  106.     out:    bh = CRT reg
  107.         bl = CPU reg
  108.  
  109. SCROLL WINDOW UP - rom_vid
  110.     in:    ah = scroll_up [06]
  111.         al = lines (0 = all)
  112.         bh = color attribute
  113.             bit 7 = blink
  114.             bit 6 = backgnd red
  115.             bit 5 = backgnd green
  116.             bit 4 = backgnd blue
  117.             bit 3 = foregnd intensity
  118.             bit 2 = foregnd red
  119.             bit 1 = foregnd green
  120.             bit 0 = foregnd blue
  121.         ch = upper row
  122.         cl = left col
  123.         dh = lower row
  124.         dl = right col
  125.     out:    none
  126.  
  127. SCROLL WINDOW DOWN - rom_vid
  128.     in:    ah = scroll_down [07]
  129.         al = lines (0 = all)
  130.         bh = color attribute (see scroll_up)
  131.         ch = upper row
  132.         cl = left col
  133.         dh = lower row
  134.         dl = right col
  135.     out:    none
  136.  
  137. READ CHARACTER AND ATTRIBUTE - rom_vid
  138.     in:    ah = rd_char_attr [08]
  139.         bh = page
  140.     out:    al = char
  141.         ah = color attribute (see scroll_up)
  142.  
  143. WRITE CHARACTER AND ATTRIBUTE - rom_vid
  144.     in:    ah = wr_char_attr [09]
  145.         al = char
  146.         bh = page
  147.         bl = color attribute (see scroll_up)
  148.         cx = chars
  149.     out:    none
  150.     notes:    Cursor is not moved.
  151.  
  152. WRITE CHARACTER - rom_vid
  153.     in:    ah = wr_char [0A]
  154.         al = char
  155.         bh = page
  156.         bl = graphics mode color
  157.         cx = chars
  158.     out:    none
  159.     notes:    Cursor is not moved.
  160.  
  161. WRITE COLOR PALETTE - rom_vid
  162.     in:    ah = wr_col_pal [0B]
  163.         bh = palette id
  164.         bl = color
  165.     out:    none
  166.  
  167. WRITE PIXEL - rom_vid
  168.     in:    ah = wr_pixel [0C]
  169.         al = color
  170.         cx = pixel col
  171.         dl = pixel row
  172.     out:    none
  173.  
  174. READ PIXEL - rom_vid
  175.     in:    ah = rd_pixel [0D]
  176.         cx = pixel col
  177.         dl = pixel row
  178.     out:    al = color
  179.  
  180. WRITE TTY CHARACTER - rom_vid
  181.     in:    ah = wr_tty [0E]
  182.         al = char
  183.         bl = graphics mode color
  184.     out:    none
  185.  
  186. READ VIDEO MODE - rom_vid
  187.     in:    ah = rd_vid_mode [0F]
  188.     out:    ah = width in chars
  189.         al = video mode
  190.         bh = page (0 for graphics modes)
  191.  
  192. PC-JR WRITE COLOR PALETTE REGISTER - rom_vid
  193.     in:    ah = wr_pal_reg [10]
  194.         al = 00
  195.         bh = palette value
  196.         bl = palette reg
  197.     out:    none
  198.  
  199.     in:    ah = wr_pal_reg [10]
  200.         al = 01
  201.         bh = border color
  202.     out:    none
  203.  
  204. PC-AT WRITE STRING - rom_vid
  205.     in:    ah = wr_string [13]
  206.         al = cursor movement switch
  207.             00 = no
  208.             01  = yes
  209.         bl = color attribute (see scroll_up)
  210.         bh = page
  211.         dx = start cursor position
  212.         cx = string length
  213.          es:bp = string pointer
  214.     out:    none
  215.  
  216.  
  217. rom_equ        ROM EQUIPMENT SERVICE [int 11]
  218.     in:    none
  219.     out:    ax bit settings = equipment list
  220.             0 = disk drive
  221.             1 = math coprocessor
  222.               2,3 = system board RAM in 16k blocks
  223.               4,5 = initial video mode
  224.                 00 = unused
  225.                 01 = 40 X 25 color
  226.                 10 = 80 X 25 color
  227.                 11 = 80 X 25 b/w
  228.               6,7 = number of disk drives
  229.             8 = DMA not present
  230.           9,10,11 = number of RS232 cards in system
  231.                12 = game I/O present
  232.                13 = serial printer present
  233.             14,15 = number of printers present
  234.  
  235.  
  236. rom_mem        ROM MEMORY SIZE SERVICE [int 12]
  237.     in:    none
  238.     out:    ax = size in K
  239.  
  240.  
  241. rom_disk    ROM DISKETTE SERVICES [int 13]
  242.  
  243. RESET DISKETTE SYSTEM - rom_disk
  244.     in:    ah = rst_disk [00]
  245.     out:    none
  246.  
  247. READ DISKETTE STATUS - rom_disk
  248.     in:    ah = rd_disk_stat [01]
  249.     out:    al = return code
  250.             01 = bad command
  251.             02 = address mark not found
  252.             03 = write protected
  253.             04 = sector not found
  254.             06 = no disk
  255.             08 = DMA overrun
  256.             09 = DMA across 64K boundary
  257.             10 = bad CRC
  258.             20 = controller failed
  259.             40 = seek failed
  260.             80 = time out
  261.  
  262. READ DISKETTE SECTOR - rom_disk
  263.     in:    ah = rd_disk_sect [02]
  264.         al = sectors to read
  265.         ch = track
  266.         cl = sector
  267.         dh = head
  268.         dl = drive
  269.          es:bx = buffer pointer
  270.     out:    cf = error
  271.         ah = return code (see rd_disk_stat)
  272.         al = sectors read
  273.  
  274. WRITE DISKETTE SECTOR - rom_disk
  275.     in:    ah = wr_disk_sect [03]
  276.         al = sectors to write
  277.         ch = track
  278.         cl = sector
  279.         dh = head
  280.         dl = drive
  281.          es:bx = buffer pointer
  282.     out:    cf = error
  283.         ah = return code (see rd_disk_stat)
  284.         al = sectors written
  285.  
  286. VERIFY DISKETTE SECTOR - rom_disk
  287.     in:    ah = ver_disk_sect [04]
  288.         al = sectors to verify
  289.         ch = track
  290.         cl = sector
  291.         dh = head
  292.         dl = drive
  293.          es:bx = buffer pointer
  294.     out:    cf = error
  295.         ah = return code (see rd_disk_stat)
  296.         al = sectors verified
  297.  
  298. FORMAT DISKETTE TRACK - rom_disk
  299.     in:    ah = fmt_disk_trk [05]
  300.         al = sectors to format
  301.         ch = track
  302.         cl = sector
  303.         dh = head
  304.         dl = drive
  305.          es:bx = four byte address field pointer
  306.             byte 1 = track
  307.             byte 2 = head
  308.             byte 3 = sector
  309.             byte 4 = bytes/sector
  310.     out:    cf = error
  311.         ah = return code (see rd_disk_stat)
  312.         al = sectors formatted
  313.  
  314. PC-AT READ DISKETTE PARAMETERS - rom_disk
  315.     in:    ah = rd_disk_parm [08]
  316.     out:    cf = error
  317.         ah = return code (see rd_disk_stat)
  318.         dl = drives
  319.         dh = max sides
  320.         cl = max sectors
  321.         ch = max tracks
  322.  
  323. PC-AT INITIALIZE DISKETTE PARAMETERS - rom_disk
  324.     in:    ah = init_disk_parm [09]
  325.     out:    cf = error
  326.         ah = return code (see rd_disk_stat)
  327.         int 41 vector points to drive 0 table
  328.         int 46 vector points to drive 1 table
  329.  
  330. PC-AT READ DISKETTE LONG - rom_disk [0A]
  331.     in:    ah = rd_disk_long
  332.         ch = cylinder
  333.         cl = sector
  334.         dh = head
  335.         dl = drive
  336.          es:bx = buffer pointer
  337.     out:    cf = error
  338.         ah = return code (see rd_disk_stat)
  339.  
  340. PC-AT WRITE DISKETTE LONG - rom_disk
  341.     in:    ah = wr_disk_long [0B]
  342.         ch = sector
  343.         dh = head
  344.         dl = drive
  345.          es:bx = buffer pointer
  346.     out:    cf = error
  347.         ah = return code (see rd_disk_stat)
  348.  
  349. PC-AT SEEK DISKETTE TRACK - rom_disk
  350.     in:    ah = disk_seek [0C]
  351.         ch = sector
  352.         dh = head
  353.         dl = drive
  354.          es:bx = buffer pointer
  355.     out:    cf = error
  356.         ah = return code (see rd_disk_stat)
  357.  
  358. PC-AT ALTERNATE DISKETTE RESET - rom_disk
  359.     in:    ah = alt_reset_disk [0D]
  360.         dl = drive
  361.     out:    cf = error
  362.         ah = return code (see rd_disk_stat)
  363.  
  364. PC-AT TEST FOR DISKETTE READY  - rom_disk
  365.     in:    ah = test_disk_rdy [10]
  366.         dl = drive
  367.     out:    cf = error
  368.         ah = return code (see rd_disk_stat)
  369.  
  370. PC-AT RECALIBRATE DISKETTE - rom_disk
  371.     in:    ah = recal_disk [11]
  372.         dl = drive
  373.     out:    cf = error
  374.         ah = return code (see rd_disk_stat)
  375.  
  376. PC-AT DISKETTE DIAGNOSTICS - rom_disk
  377.     in:    ah = disk_diag [14]
  378.     out:    cf = error
  379.         ah = return code (see rd_disk_stat)
  380.  
  381. PC-AT READ DISKETTE TYPE - rom_disk
  382.     in:    ah = rd_disk_type [15]
  383.         dl = drive
  384.     out:    ah = disk type
  385.             00 = no disk
  386.             01 = disk, no change detector present
  387.             02 = disk, change detector present
  388.             03 = fixed disk
  389.                 cx,dx = number of 512 byte sectors
  390.  
  391. PC-AT CHANGE DISKETTE STATUS - rom_disk
  392.     in:    ah = chg_disk_stat [16]
  393.     out:    ah = change status
  394.             00 = no change
  395.             01 = change
  396.         dl = drive
  397.  
  398. PC-AT WRITE DISKETTE TYPE - rom_disk
  399.     in:    ah = wr_disk_type [17]
  400.         al = disk type
  401.             00 = no disk
  402.             01 = regular disk in regular drive
  403.             02 = high capacity disk in high capacity drive
  404.     out:    none
  405.  
  406.  
  407. rom_serial    ROM SERIAL PORT SERVICES [int 14]
  408.  
  409. INITIALIZE SERIAL PORT - rom_serial
  410.     in:    ah = init_port [00]
  411.         al bit settings = port configuration
  412.               0,1 = word length
  413.                 10 = 7 bits
  414.                 11 = 8 bits
  415.             2 = stop bits
  416.                 0 = 1
  417.                 1 = 2
  418.               3,4 = parity
  419.                 00 = none
  420.                 01 = odd
  421.                 10 = none
  422.                 11 = even
  423.             5,6,7 = baud rate
  424.                 000 = 110
  425.                 001 = 150
  426.                 010 = 300
  427.                 011 = 600
  428.                 100 = 1200
  429.                 101 = 2400
  430.                 110 = 4800
  431.                 111 = 9600 (4800 on PC-JR)
  432.         dx = port
  433.     out:    ah bits = usar/t status
  434.             0 = data ready
  435.             1 = overrun error
  436.             2 = parity error
  437.             3 = framing error
  438.             4 = break detect
  439.             5 = tx ready
  440.             6 = tx empty
  441.             7 = timeout
  442.         al bits = modem status
  443.             0 = delta CTS
  444.             1 = delta DSR
  445.             2 = trailing edge ring detected
  446.             3 = delta carrier detect
  447.             4 = CTS
  448.             5 = DSR
  449.             6 = ring detect
  450.             7 = carrier detect
  451.  
  452. TRANSMIT CHARACTER - rom_serial
  453.     in:    ah = tx_char [01]
  454.         al = char
  455.         dx = port
  456.     out:    ah bits = usar/t status (see init_port)
  457.         al bits = modem status (see init_port)
  458.  
  459.  
  460. RECEIVE CHARACTER - rom_serial
  461.     in:    ah = rx_char [02]
  462.         dx = port
  463.     out:    al = char
  464.         ah bits = usar/t status (see init_port)
  465.  
  466. READ SERIAL PORT STATUS - rom_serial
  467.     in:    ah = rd_port_stat [03]
  468.     out:    ax bits = status (see init_port)
  469.  
  470.  
  471.  
  472. rom_dev        ROM DEVICE SERVICES [int 15]
  473.  
  474. TURN CASSETTE MOTOR ON - rom_dev
  475.     in:    ah = cass_on [00]
  476.     out:    none
  477.  
  478. TURN CASSETTE MOTOR OFF - rom_dev
  479.     in:    ah = cass_off [01]
  480.     out:    none
  481.  
  482. READ CASSETTE DATA BLOCK - rom_dev
  483.     in:    ah = cass_rd [02]
  484.         cx = byte count
  485.          es:bx = buffer pointer
  486.     out:    cf = error
  487.         dx = byte count
  488.          es:bx = pointer past last byte
  489.  
  490. WRITE CASSETTE DATA BLOCK - rom_dev
  491.     in:    ah = cass_wr [03]
  492.         cx = byte count
  493.          es:bx = buffer pointer
  494.     out:    es:bx = pointer past last byte
  495.  
  496. PC-AT OPEN DEVICE - rom_dev
  497.     in:    ah = open_dev [80]
  498.         bx = id
  499.         cx = process type
  500.     out:    none
  501.  
  502. PC-AT CLOSE DEVICE - rom_dev
  503.     in:    ah = close_dev [81]
  504.         bx = device id
  505.         cx = process type
  506.     out:    none
  507.  
  508. PC-AT TERMINATE DEVICE - rom_dev
  509.     in:    ah = term_dev [82]
  510.         bx = device id
  511.     out:    none
  512.  
  513. PC-AT EVENT WAIT - rom_dev
  514.     in:    ah = event_wait [83]
  515.         al = subservice
  516.             0 = set interval
  517.             1 = cancel
  518.          es:bx = buffer pointer
  519.          cx,dx = microseconds to wait
  520.     out:    none
  521.  
  522. PC-AT JOYSTICK - rom_dev
  523.     in:    ah = joystick [84]
  524.         dl = 0
  525.     out:    al = current switch settings
  526.  
  527. PC-AT Sys Req KEY - rom_dev
  528.     in:    ah = sys_req [85]
  529.         al = switch
  530.             00 = press
  531.             01 = break
  532.     out:    none
  533.  
  534. PC-AT WAIT - rom_dev
  535.     in:    ah = wait [86]
  536.          cx,dx = microseconds to wait
  537.     out:    none
  538.  
  539. PC-AT MOVE BLOCK - rom_dev
  540.     in:    ah = move_block [87]
  541.         cx = words to move
  542.          es:si = table pointer
  543.     out:    none
  544.  
  545. PC-AT READ EXTENDED MEMORY SIZE - rom_dev
  546.     in:    ah = rd_ext_mem [88]
  547.     out:    none
  548.  
  549. PC-AT SWITCH TO VIRTUAL MEMORY - rom_dev
  550.     in:    ah = virtual_mem [89]
  551.     out:    none
  552.  
  553. PC-AT DEVICE BUSY LOOP - rom_dev
  554.     in:    ah = dev_busy [90]
  555.         al = type code
  556.     out:    none
  557.  
  558. PC-AT SET FLAG AND COMPLETE SERVICE - rom_dev
  559.     in:    ah = complete_int [91]
  560.         al = type code
  561.     out:    none
  562.  
  563.  
  564. rom_key        ROM KEYBOARD SERVICES [int 16]
  565.  
  566. READ KEYBOARD - rom_key
  567.     in:    ah = rd_key [00]
  568.     out:    ah = scan code
  569.         al = char code
  570.  
  571. TEST KEYBOARD - rom_key
  572.     in:    ah = test_key [01]
  573.     out:    zf = key ready
  574.     out:    ah = scan code
  575.         al = char code
  576.  
  577. READ SHIFT STATUS - rom_key
  578.     in:    ah = rd_shift [02]
  579.     out:    al bits = shift status 
  580.             0 = right shift
  581.             1 = left shift
  582.             2 = ctrl
  583.             3 = alt
  584.             4 = scroll lock
  585.             5 = num lock
  586.             6 = caps lock
  587.             7 = insert
  588.  
  589. PC-JR TYPEMATIC DELAY - rom_key
  590.     in:    ah = key_delay [03]
  591.         al = operation code
  592.             00 = reset delays
  593.             01 = increase initial delay
  594.             02 = increase continue delay
  595.             03 = increase both delays
  596.             04 = turn off typematic
  597.     out:    none
  598.  
  599. PC-JR KEYBOARD CLICK - rom_key
  600.     in:    ah = key_click [04]
  601.         al = operation code
  602.             00 = click off
  603.             01 = click on
  604.     out:    none
  605.  
  606.  
  607. rom_print    ROM PRINTER SERVICES [int 17]
  608.  
  609. PRINT CHARACTER - rom_print
  610.     in:    ah = print_char [00]
  611.         al = char
  612.     out:    ah bits = return code
  613.             0 = timeout
  614.             1 = unused
  615.             2 = unused
  616.             3 = I/O error
  617.             4 = selected
  618.             5 = no paper
  619.             6 = ack
  620.             7 = not busy
  621.  
  622. INITIALIZE PRINTER - rom_print
  623.     in:    ah = init_print [01]
  624.     out:    ah bits = return code (see print_char)
  625.  
  626. READ PRINTER STATUS - rom_print
  627.     in:    ah = rd_print_stat [02]
  628.     out:    ah bits = return code (see print_char)
  629.  
  630.  
  631.  
  632. rom_basic    ROM START BASIC SERVICE [int 18]
  633.  
  634.  
  635. rom_reboot    ROM REBOOT SERVICE [int 19]
  636.  
  637.  
  638. rom_time    ROM REAL TIME CLOCK SERVICES [int 1A]
  639.  
  640. READ CLOCK COUNT - rom_time
  641.     in:    ah = rd_count [00]
  642.     out:    al = midnight
  643.          cx:dx = ticks
  644.  
  645. WRITE CLOCK COUNT - rom_time
  646.     in:    ah = wr_count [01]
  647.          cx:dx = ticks
  648.     out:    none
  649.  
  650. PC-AT READ TIME - rom_time
  651.     in:    ah = rd_time [02]
  652.     out:    ch = hours
  653.         cl = minutes
  654.         dh = seconds
  655.  
  656. PC-AT WRITE TIME - rom_time
  657.     in:    ah = wr_time [03]
  658.         ch = hours
  659.         cl = minutes
  660.         dh = seconds
  661.     out:    none
  662.  
  663. PC-AT READ DATE - rom_time
  664.     in:    ah = rd_date [04]
  665.     out:    dl = day
  666.         dh = month
  667.         cl = year
  668.         ch = century (19/20)
  669.  
  670. PC-AT WRITE DATE - rom_time
  671.     in:    ah = wr_date [05]
  672.         dl = day
  673.         dh = month
  674.         cl = year
  675.         ch = century (19/20)
  676.     out:    none
  677.  
  678. PC-AT SET ALARM - rom_time
  679.     in:    ah = set_alarm [06]
  680.         ch = hours
  681.         cl = minutes
  682.         dh = seconds
  683.     out:    none
  684.     notes:    place alarm handler address in int 4A vector
  685.  
  686. PC-AT RESET ALARM - rom_time [07]
  687.     in:    ah = reset_alarm
  688.     out:    none
  689.  
  690.  
  691. DOS
  692. ---
  693.  
  694. dos_term    DOS PROGRAM TERMINATION SERVICE [int 20]
  695.  
  696.  
  697. dos_func    DOS FUNCTION SERVICES [int 21]
  698.  
  699. DOS1 - TERMINATE PROGRAM - dos_func
  700.     in:    ah = term [00]
  701.     out:    none
  702.  
  703. DOS1 - KEYBOARD INPUT WITH ECHO - dos_func
  704.     in:    ah = key_in_echo [01]
  705.     out:    al = char
  706.  
  707. DOS1 - DISPLAY OUTPUT - dos_func
  708.     in:    ah = disp_out [02]
  709.         dl = char
  710.     out:    none
  711.  
  712. DOS1 - SERIAL INPUT - dos_func
  713.     in:    ah = serial_in [03]
  714.     out:    al = char
  715.  
  716. DOS1 - SERIAL OUTPUT - dos_func
  717.     in:    ah = serial_out [04]
  718.         dl = char
  719.  
  720. DOS1 - PRINTER OUTPUT - dos_func
  721.     in:    ah = printer_out [05]
  722.         dl = char
  723.  
  724. DOS1 - DIRECT CONSOLE I/O - dos_func
  725.     in:    ah = console_io [06]
  726.         dl = operation code
  727.             00 thru FE = char to output
  728.                 FF = keyboard input
  729.     out:    al = char input
  730.  
  731. DOS1 - DIRECT KEYBOARD INPUT - dos_func
  732.     in:    ah = dir_key_in [07]
  733.     out:    al = char
  734.  
  735. DOS1 - KEYBOARD INPUT WITHOUT ECHO - dos_func
  736.     in:    ah = key_in [08]
  737.     out:    al = char
  738.  
  739. DOS1 - DISPLAY STRING - dos_func
  740.     in:    ah = disp_string [09]
  741.         ds:dx = string pointer
  742.     out:    none
  743.  
  744. DOS1 - BUFFERED KEYBOARD INPUT - dos_func
  745.     in:    ah = buf_key_in [0A]
  746.          ds:dx = buffer pointer
  747.     out:    none
  748.  
  749. DOS1 - CHECK KEYBOARD STATUS - dos_func
  750.     in:    ah = chk_key_stat [0B]
  751.     out:    al = status
  752.             00 = empty
  753.             FF = char available
  754.  
  755. DOS1 - CLEAR KEY BUFFER AND PERFORM FUNCTION - dos_func
  756.     in:    ah = clr_key_func [0C]
  757.         al = subfunction (01, 06, 07, 08, or 0A; 00 = null)
  758.         dl = subfunction 6 char
  759.     out:    al = subfunction 6 char
  760.  
  761. DOS1 - RESET DISK - dos_func
  762.     in:    ah = reset_disk [0D]
  763.     out:    none
  764.  
  765. DOS1 - SELECT CURRENT DRIVE - dos_func
  766.     in:    ah = sel_drive [0E]
  767.         dl = drive
  768.     out:    al = drive count
  769.  
  770. DOS1 - OPEN FILE - dos_func
  771.     in:    ah = open_file [0E]
  772.          ds:dx = FCB pointer
  773.     out:    al = return code
  774.             00 = successful
  775.             FF = unsuccessful
  776.  
  777. DOS1 - CLOSE FILE - dos_func
  778.     in:    ah = close_file [10]
  779.          ds:dx = FCB pointer
  780.     out:    al = return code (see open_file)
  781.  
  782. DOS1 - SEARCH FOR FIRST MATCHING FILE - dos_func
  783.     in:    ah = search_first [11]
  784.          ds:dx = FCB pointer
  785.     out:    al = return code (see open_file)
  786.  
  787. DOS1 - SEARCH FOR NEXT MATCHING FILE - dos_func
  788.     in:    ah = search_next [12]
  789.          ds:dx = FCB pointer
  790.     out:    al = return code (see open_file)
  791.  
  792. DOS1 - DELETE FILE - dos_func
  793.     in:    ah = delete_file [13]
  794.          ds:dx = FCB pointer
  795.     out:    al = return code (see open_file)
  796.  
  797. DOS1 - READ SEQUENTIAL RECORD - dos_func
  798.     in:    ah = rd_seq_rec [14]
  799.          ds:dx = FCB pointer
  800.     out:    al = return code (see open_file)
  801.  
  802. DOS1 - WRITE SEQUENTIAL RECORD - dos_func
  803.     in:    ah = wr_seq_rec [15]
  804.          ds:dx = FCB pointer
  805.     out:    al = return code (see open_file)
  806.  
  807. DOS1 - CREATE FILE - dos_func
  808.     in:    ah = create_file [16]
  809.          ds:dx = FCB pointer
  810.     out:    al = return code (see open_file)
  811.  
  812. DOS1 - RENAME FILE - dos_func
  813.     in:    ah = rename_file [17]
  814.          ds:dx = FCB pointer
  815.     out:    al = return code (see open_file)
  816.  
  817. DOS1 - REPORT CURRENT DRIVE - dos_func
  818.     in:    ah = rd_cur_drive [19]
  819.     out:    al = drive
  820.  
  821. DOS1 - SET DISK TRANSFER AREA FUCNTION - dos_func
  822.     in:    ah = set_dta [1A]
  823.          ds:dx = DTA pointer
  824.     out:    none
  825.  
  826. DOS1 - READ CURRENT DRIVE'S FAT - dos_func
  827.     in:    ah = rd_fat_1 [1B]
  828.     out:    al = sectors/allocation unit
  829.         cx = bytes/sector
  830.         dx = allocation units
  831.          ds:dx = FAT ID byte pointer
  832.  
  833. DOS1 - READ ANY DRIVE'S FAT - dos_func
  834.     in:    ah = rd_fat_2 [1C]
  835.         dl = drive
  836.     out:    al = sectors/allocation unit
  837.         cx = bytes/sector
  838.         dx = allocation units
  839.          ds:dx = FAT ID byte pointer
  840.  
  841. DOS1 - READ RANDOM FILE RECORD - dos_func
  842.     in:    ah = rd_ran_rec1 [21]
  843.          ds:dx = FCB pointer
  844.     out:    al = return code
  845.             00 = successful
  846.             01 = end of file
  847.             02 = insufficient DTA space
  848.             03 = end of file with partial record
  849.  
  850. DOS1 - WRITE RANDOM FILE RECORD - dos_func
  851.     in:    ah = wr_ran_rec1 [22]
  852.          ds:dx = FCB pointer
  853.     out:    al = return code (see rd_ran_rec1)
  854.  
  855. DOS1 - REPORT FILE SIZE - dos_func
  856.     in:    ah = rd_file_size [23]
  857.          ds:dx = FCB pointer
  858.     out:    al = return code (see open_file)
  859.  
  860. DOS1 - SET RANDOM RECORD FIELD SIZE - dos_func
  861.     in:    ah = set_ran_rec [24]
  862.          ds:dx = FCB pointer
  863.     out:    none
  864.  
  865. DOS1 - SET INTERRUPT VECTOR - dos_func
  866.     in:    ah = set_int_vec [25]
  867.         al = int number
  868.          ds:dx = int handler pointer
  869.     out:    none
  870.  
  871. DOS1 - CREATE PROGRAM SEGMENT FUCNTION - dos_func
  872.     in:    ah = create_seg [26]
  873.         dx = segment address
  874.     out:    none
  875.  
  876. DOS1 - READ RANDOM FILE RECORD - dos_func
  877.     in:    ah = rd_ran_rec2 [27]
  878.         cx = record count
  879.          ds:dx = FCB pointer
  880.     out:    al = return code (see rd_ran_rec1)
  881.         cx = actual record count
  882.  
  883. DOS1 - WRITE RANDOM FILE RECORD FUCNTION - dos_func
  884.     in:    ah = wr_ran_rec2 [28]
  885.         cx = record count
  886.          ds:dx = FCB pointer
  887.     out:    cx = actual record count
  888.  
  889. DOS1 - PARSE FILENAME - dos_func
  890.     in:    ah = parse_name [29]
  891.         al bits = parse control
  892.             0 = scan separators
  893.             1 = set FCB drive byte
  894.             2 = change FCB filename only if file is found
  895.             3 = change FCB extension only if file is found
  896.          ds:si = command line pointer
  897.          es:di = FCB pointer
  898.     out:    al = return code
  899.             00 = success with single filename
  900.             01 = success with wildcard
  901.             FF = failure
  902.          ds:si = char following file name pointer
  903.          es:di = FCB pointer
  904.  
  905. DOS1 - GET DATE - dos_func
  906.     in:    ah = get_date [2A]
  907.     out:    al = day of week (0 = Sun, 6 = Sat)
  908.         cx = year (1980 thru 2099)
  909.         dh = month
  910.         dl = day
  911.  
  912. DOS1 - SET DATE - dos_func
  913.     in:    ah = set_date [2B]
  914.         cx = year (1980 thru 2099)
  915.         dh = month
  916.         dl = day
  917.     out:    none
  918.  
  919. DOS1 - GET TIME - dos_func
  920.     in:    ah = get_time [2C]
  921.     out:    cl = minutes
  922.         ch = hours
  923.         dl = seconds 100th's
  924.         dh = seconds
  925.  
  926. DOS1 - SET TIME - dos_func
  927.     in:    ah = set_time [2D]
  928.         cl = minutes
  929.         ch = hours
  930.         dl = seconds 100th's
  931.         dh = seconds
  932.     out:    none
  933.  
  934. DOS1 - SET DISK WRITE VERIFICATION MODE - dos_func
  935.     in:    ah = set_verify [2E]
  936.         al = verify switch
  937.             00 = verify off
  938.             01 - verify on
  939.         dl = 00
  940.     out:    none
  941.  
  942. DOS2 - GET DISK TRANSFER AREA ADDRESS - dos_func
  943.     in:    ah = get_dta [2F]
  944.     out:    es:bx = DTA pointer
  945.  
  946. DOS2 - GET DOS VERSION NUMBER - dos_func
  947.     in:    ah = get_ver [30]
  948.     out:    al = major
  949.         ah = minor
  950.         bx = 0000
  951.         cx = 0000
  952.  
  953. DOS2 - ADVANCED TERMINATE BUT STAY RESIDENT - dos_func
  954.     in:    ah = keep [31]
  955.         al = return code
  956.         dx = segment address of memory to free
  957.     out:    none
  958.  
  959. DOS2 - GET/SET CONTROL BREAK STATUS - dos_func
  960.     in:    ah = cntrl_brk [33]
  961.         al = get/set switch
  962.             00 = get
  963.             01 = set
  964.         dl = set code
  965.             00 = break check off
  966.             01 = break check on
  967.     out:    dl = get code (same as set code)
  968.  
  969. DOS2 - GET INTERRUPT VECTOR - dos_func
  970.     in:    ah = get_int_vec [35]
  971.         al = int number
  972.     out: es:bx = int vector
  973.  
  974. DOS2 - GET DISK FREE SPACE - dos_func
  975.     in:    ah = get_space [36]
  976.         dl = drive
  977.     out:    ax = sectors/cluster
  978.         bx = available clusters
  979.         cx = bytes/sector
  980.         dx = total clusters
  981.  
  982. DOS2 - GET COUNTRY INFORMATION - dos_func
  983.     in:    ah = get_country [38]
  984.         al = operation code
  985.             00 = standard info
  986.            01 - FE = country code
  987.             FF = country code in bx
  988.         bx = country code when al = FF
  989.          ds:dx = 32 byte buffer pointer
  990.     out:    cf = error
  991.         al = return code
  992.          ds:dx = info pointer
  993.         bx = country code
  994.  
  995. DOS2 - MAKE DIRECTORY - dos_func
  996.     in:    ah = mkdir [39]
  997.          ds:dx = ASCIIZ pointer
  998.     out:    ax = return code
  999.             01 = invalid function
  1000.             02 = file not found
  1001.             03 = path not found
  1002.             04 = no more handles
  1003.             05 = access denied
  1004.             06 = invalid handle
  1005.             07 = memory control blocks destroyed
  1006.             08 = insufficient memory
  1007.             09 = invalid memory block address
  1008.             0A = invalid environment
  1009.             0B = invalid format
  1010.             0C = invalid access code
  1011.             0D = invalid data
  1012.             0F = invalid drive spec
  1013.             10 = attempt to remove current directory
  1014.             11 = not same device
  1015.             12 = no more files
  1016.  
  1017. DOS2 - REMOVE DIRECTORY - dos_func
  1018.     in:    ah = rmdir [3A]
  1019.          ds:dx = ASCIIZ pointer
  1020.     out:    ax = return code (see mkdir)
  1021.  
  1022. DOS2 - CHANGE CURRENT DIRECTORY FUNCTION - dos_func
  1023.     in:    ah = chdir [3B]
  1024.          ds:dx = ASCIIZ pointer
  1025.     out:    ax = return code (see mkdir)
  1026.  
  1027. DOS2 - CREATE FILE - dos_func
  1028.     in:    ah = create [3C]
  1029.         cx = file attribute
  1030.             bit 7 = unused
  1031.             bit 6 = unused
  1032.             bit 5 = archive
  1033.             bit 4 = subdirectory
  1034.             bit 3 = volume label
  1035.             bit 2 = system
  1036.             bit 1 = hidden
  1037.             bit 0 = read only
  1038.          ds:dx = ASCIIZ pointer
  1039.     out:    cf = error
  1040.         ax = handle or return code (see mkdir)
  1041.  
  1042. DOS2 - OPEN FILE - dos_func
  1043.     in:    ah = open [3D]
  1044.         al = access code
  1045.             rd_only    = read only
  1046.             wr_only    = write only
  1047.             rd_wr    = read/write
  1048.          ds:dx = ASCIIZ pointer
  1049.     out:    cf = error
  1050.         ax = handle or return code code (see mkdir)
  1051.  
  1052. DOS2 - CLOSE FILE - dos_func
  1053.     in:    ah = close [3E]
  1054.         bx = handle
  1055.     out:    ax = return code (see mkdir)
  1056.  
  1057. DOS2 - READ FILE/DEVICE - dos_func
  1058.     in:    ah = read [3F]
  1059.         bx = handle
  1060.         cx = bytes to read
  1061.          ds:dx = DTA pointer
  1062.     out:    cf = error
  1063.         ax = bytes read or return code code (see mkdir)
  1064.  
  1065. DOS2 - WRITE FILE/DEVICE - dos_func
  1066.     in:    ah = write [40]
  1067.         bx = handle
  1068.         cx = bytes to write
  1069.          ds:dx = DTA pointer
  1070.     out:    cf = error
  1071.         ax = bytes written or return code (see mkdir)
  1072.  
  1073. DOS2 - DELETE FILE - dos_func
  1074.     in:    ah = delete [41]
  1075.          ds:dx = DTA pointer
  1076.     out:    ax = return code (see mkdir)
  1077.  
  1078. DOS2 - MOVE FILE POINTER - dos_func
  1079.     in:    ah = move_pointer [42]
  1080.         al = method code
  1081.          cx:dx = offset
  1082.     out:    cf = error
  1083.         ax = return code (see mkdir)
  1084.          ds:ax = new pointer location
  1085.  
  1086. DOS2 - CHANGE FILE MODE - dos_func
  1087.     in:    ah = chmod [43]
  1088.         al = get/set switch
  1089.             00 =get
  1090.             01 = set
  1091.         cx = file attribute (see create)
  1092.          ds:dx = ASCIIZ pointer
  1093.     out:    ax = return code (see mkdir)
  1094.         cx = file attribute (see create)
  1095.  
  1096. DOS2 - DEVICE I/O CONTROL - dos_func
  1097.     in:    ah = ioctl [44]
  1098.         al = subfunction
  1099.         bl = drive
  1100.         bx = handle
  1101.         cx = bytes
  1102.     out:    cf = error
  1103.         ax = bytes or return code
  1104.         dx = control data bits
  1105.  
  1106. DOS2 - DUPLICATE FILE HANDLE - dos_func
  1107.     in:    ah = dup [45]
  1108.         bx = handle
  1109.     out:    cf = error
  1110.         ax = handle or return code (see mkdir)
  1111.  
  1112. DOS2 - FORCE FILE HANDLE DUPLICATION - dos_func
  1113.     in:    ah = cdup [46]
  1114.         bx = first handle
  1115.         cx = second handle
  1116.     out:    ax = return code (see mkdir)
  1117.         cx = handle
  1118.  
  1119. DOS2 - GET CURRENT DIRECTORY - dos_func
  1120.     in:    ah = get_dir [47]
  1121.         dl = drive
  1122.          ds:si = buffer pointer
  1123.     out:    cf = error
  1124.          ds:si = path name
  1125.  
  1126. DOS2 - ALLOCATE MEMORY - dos_func
  1127.     in:    ah = allocate [48]
  1128.         bx = paragraphs
  1129.     out:    cf = error
  1130.         ax = return code (see mkdir)
  1131.         bx = largest block size available
  1132.  
  1133. DOS2 - FREE MEMORY - dos_func
  1134.     in:    ah = free [49]
  1135.         es = return segment block
  1136.     out:    ax = return code (see mkdir)
  1137.  
  1138. DOS2 - MODIFY ALLOCATED MEMORY BLOCK - dos_func
  1139.     in:    ah = set_block [4A]
  1140.         bx = paragraphs
  1141.         es = block segment address
  1142.     out:    ax = return code (see mkdir)
  1143.         bx = maximum size
  1144.  
  1145. DOS2 - LOAD/EXECUTE PROGRAM - dos_func
  1146.     in:    ah = exec [4B]
  1147.         al = subfunction
  1148.          ds:dx = ASCIIZ pointer
  1149.          es:bx = control block pointer
  1150.     out:    ax = return code
  1151.  
  1152. DOS2 - TERMINATE PROCESS - dos_func
  1153.     in:    ah = term_proc [4C]
  1154.         al = return code (sets ERRORLEVEL)
  1155.     out:    none
  1156.  
  1157. DOS2 - GET SUBPROGRAM RETURN CODE - dos_func
  1158.     in:    ah = get_code [4D]
  1159.     out:    al = return code (as set by term_proc [4C])
  1160.         ah = termination code
  1161.             00 = normal voluntary termination
  1162.             01 = termination by DOS due to CTRL-BREAK
  1163.             02 = termination by DOS due to critical device error
  1164.             03 = voluntary termination due to keep [31]
  1165.  
  1166. DOS2 - FIND FIRST FILE MATCH - dos_func
  1167.     in:    ah = find_first [4E]
  1168.         cx = file attribute (see create)
  1169.          ds:dx = ASCIIZ pointer
  1170.     out:    ax = return code (see mkdir)
  1171.  
  1172. DOS2 - FIND NEXT FILE MATCH - dos_func
  1173.     in:    ah = find_next [4F]
  1174.          ds:dx = info from find_first pointer
  1175.     out:    ax = return code (see mkdir)
  1176.  
  1177. DOS2 - GET FILE WRITE VERIFY STATE - dos_func
  1178.     in:    ah = get_verify [54]
  1179.     out:    al = verify state
  1180.             00 = off
  1181.             01 = on
  1182.  
  1183. DOS2 - RENAME FILE - dos_func
  1184.     in:    ah = rename [56]
  1185.          ds:dx = old ASCIIZ pointer
  1186.          es:di = new ASCIIZ pointer
  1187.     out:    ax = return code (see mkdir)
  1188.  
  1189. DOS2 - GET/SET FILE DATE/TIME - dos_func
  1190.     in:    ah = date_time [57]
  1191.         al = get/set switch
  1192.             00 = get
  1193.             01 = set
  1194.         bx = handle
  1195.         cx = time
  1196.         dx = date
  1197.     out:    ax = return code (see mkdir)
  1198.         cx = time
  1199.         dx = date
  1200.  
  1201. DOS3 - GET EXTENDED RETURN CODE - dos_func
  1202.     in:    ah = get_err [59]
  1203.         bx = version code (0000 = DOS3)
  1204.     out:    ax = return code
  1205.         bh = error class
  1206.         bl = action
  1207.         ch = locus
  1208.  
  1209. DOS3 - CREATE TEMPORARY FILE - dos_func
  1210.     in:    ah = create_temp [5A]
  1211.          ds:dx = pathname pointer
  1212.         cx = file attribute (see create)
  1213.     out:    cf = error
  1214.         ax = return code (see mkdir)
  1215.          ds:dx = pathname pointer
  1216.  
  1217. DOS3 - CREATE NEW FILE - dos_func
  1218.     in:    ah = create_new [5B]
  1219.          ds:dx = filename pointer
  1220.         cx = file attribute (see create)
  1221.     out:    cf = error
  1222.         ax = handle or return code (see mkdir)
  1223.  
  1224. DOS3 - LOCK/UNLOCK FILE ACCESS - dos_func
  1225.     in:    ah = file_lock [5C]
  1226.         al = switch
  1227.             00 = lock
  1228.             01 = unlock
  1229.         bx = handle
  1230.          cx:dx = offset
  1231.          si:di = amount
  1232.     out:    ax = return code (see mkdir)
  1233.  
  1234. DOS3 - GET PROGRAM SEGMENT PREFIX ADDRESS - dos_func
  1235.     in:    ah = get_psp [56]
  1236.     out:    bx = PSP segment address
  1237.  
  1238.  
  1239. dos_rd_abs    DOS ABSOLUTE DISK READ SERVICE [int 25]
  1240.     in:    cx = sectors
  1241.         dx = start sector
  1242.          ds:bx = data pointer
  1243.     out:    cf = error
  1244.         al = return code
  1245.             00 = write protected
  1246.             01 = invalid drive
  1247.             02 = drive not ready
  1248.             04 = CRC error
  1249.             06 = seek error
  1250.             07 = invalid format
  1251.             08 = sector not found
  1252.             0A = write error
  1253.             0B = read error
  1254.             0C = nonspecific error
  1255.         ah = return code
  1256.             00 = other error
  1257.             02 = bad address mark
  1258.             03 = write protected
  1259.             04 = bad sector
  1260.             08 = DMA failure
  1261.             10 = bad CRC
  1262.             20 = controller failure
  1263.             40 = bad seek
  1264.             80 = timeout
  1265.  
  1266.  
  1267. dos_wr_abs    DOS ABSOLUTE DISK WRITE SERVICE [int 26]
  1268.     in:    cx = sectors
  1269.         dx = start sector
  1270.          ds:bx = data pointer
  1271.     out:    cf = error
  1272.         ax = return code (see dos_rd_abs)
  1273.  
  1274.  
  1275. dos_term_res    DOS TERMINATE RESIDENT SERVICE [int 27]
  1276.  
  1277.  
  1278. dos_spool    DOS PRINT SPOOLER SERVICES [int 2F]
  1279.  
  1280. INSTALLED QUERY - dos_spool
  1281.     in:    al = spool_query [00]
  1282.     out:    al = return code
  1283.             00 = not installed but may be
  1284.             01 = not installed and may not be
  1285.             FF = is installed
  1286.  
  1287. SUBMIT FILE - dos_spool
  1288.     in:    al = spool_submit [01]
  1289.          ds:dx = submit packet pointer
  1290.             byte 0 = level code
  1291.             bytes 1 - 4 = ASCIIZ pointer (NO wildcards)
  1292.     out:    none
  1293.  
  1294. CANCEL FILE - dos_spool
  1295.     in:    al = spool_cancel [02]
  1296.          ds:dx = ASCIIZ pointer (wildcards OK)
  1297.     out:    none
  1298.  
  1299. CANCEL ALL FILES - dos_spool
  1300.     in:    al = spool_canall [03]
  1301.     out:    none
  1302.  
  1303. EXAMINE QUEUE - dos_spool
  1304.     in:    al = spool_queue [04]
  1305.     out:    ds:dx = filename list pointer
  1306.  
  1307. NULL - dos_spool
  1308.     in:    al = spool_null [05]
  1309.     out:    none
  1310.