home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-10-31 | 28.8 KB | 1,310 lines |
- **************************************************************************
- ** **
- ** bios_dos.doc **
- ** **
- ** This file documents the services provided by the ROM BIOS and **
- ** DOS of the IBM-PC family of computers. **
- ** **
- **************************************************************************
-
- ROM BIOS
- --------
-
- rom_prt_sc ROM PRINT SCREEN SERVICE [int 05]
- in: none
- out: 0050:0000 = status code
- 00 = ready
- 01 = busy
- FF = previous operation not completed successfully
-
-
- rom_vid ROM VIDEO SERVICES [int 10]
-
- WRITE VIDEO MODE - rom_vid
- in: ah = wr_vid_mode [00]
- al = mode 00 = 40 X 25 text 16 grey \
- 01 = 40 X 25 text 16/8 color |
- 02 = 80 X 25 text 16 grey |
- 03 = 80 X 25 text 16/8 color | CGA
- 04 = 320 X 200 graphics 4 color |
- 05 = 320 X 200 graphics 4 grey |
- 06 = 640 X 200 graphics b/w /
- 07 = 80 X 25 text b/w | MDA
- 08 = 160 X 200 graphics 16 color \
- 09 = 320 X 200 graphics 16 color | PC-JR
- 0A = 640 X 200 graphics 4 color /
- 0D = 320 X 200 graphics 16 color \
- 0E = 640 X 200 graphics 16 color | EGA
- 0F = 640 X 350 graphics 4 color /
- out: none
- notes: Setting mode clears the buffers, clearing the screen (slowly).
-
- WRITE CURSOR SIZE - rom_vid
- in: ah = wr_cur_size [01]
- ch = start line CGA = 0 to 7, default = 6, 7
- cl = end line MDA = 0 to 13, default = 12, 13
- out: none
- notes: Setting ch bit 5 causes cursor to disappear. If start line
- is less than end line, a normal single part cursor is created.
- If start line is greater than end line, a two part cursor is
- created.
-
- WRITE CURSOR POSITION - rom_vid
- in: ah = wr_cur_pos [02]
- bh = page (0 for graphics modes)
- dh = row
- dl = col
- out: none
- notes: Writing cursor to an off screen position causes it to
- disappear.
-
- READ CURSOR POSITION - rom_vid
- in: ah = rd_cur_pos [03]
- out: bh = page (0 for graphics modes)
- ch = start line
- cl = end line
- dh = row
- dl = col
-
- READ LIGHT PEN POSITION - rom_vid
- in: ah = rd_pen_pos [04]
- out: ah = pen trigger switch
- 1 = triggered
- 0 = not triggered
- bx = pixel col
- ch = pixel row
- dh = char row
- dl = char col
-
- WRITE ACTIVE PAGE - rom_vid
- in: ah = wr_act_page [05]
- al = page
- out: none
-
- PC-JR WRITE ACTIVE PAGE - rom_vid
- in: ah = wr_act_page [05]
- al = 80
- out: bh = CRT reg
- bl = CPU reg
-
- in: ah = wr_act_page [05]
- al = 81
- bl = CPU reg
- out: bh = CRT reg
- bl = CPU reg
-
- in: ah = wr_act_page [05]
- al = 82
- bh = CRT reg
- out: bh = CRT reg
- bl = CPU reg
-
- in: ah = wr_act_page [05]
- al = 83
- bh = CRT reg
- bl = CPU reg
- out: bh = CRT reg
- bl = CPU reg
-
- SCROLL WINDOW UP - rom_vid
- in: ah = scroll_up [06]
- al = lines (0 = all)
- bh = color attribute
- bit 7 = blink
- bit 6 = backgnd red
- bit 5 = backgnd green
- bit 4 = backgnd blue
- bit 3 = foregnd intensity
- bit 2 = foregnd red
- bit 1 = foregnd green
- bit 0 = foregnd blue
- ch = upper row
- cl = left col
- dh = lower row
- dl = right col
- out: none
-
- SCROLL WINDOW DOWN - rom_vid
- in: ah = scroll_down [07]
- al = lines (0 = all)
- bh = color attribute (see scroll_up)
- ch = upper row
- cl = left col
- dh = lower row
- dl = right col
- out: none
-
- READ CHARACTER AND ATTRIBUTE - rom_vid
- in: ah = rd_char_attr [08]
- bh = page
- out: al = char
- ah = color attribute (see scroll_up)
-
- WRITE CHARACTER AND ATTRIBUTE - rom_vid
- in: ah = wr_char_attr [09]
- al = char
- bh = page
- bl = color attribute (see scroll_up)
- cx = chars
- out: none
- notes: Cursor is not moved.
-
- WRITE CHARACTER - rom_vid
- in: ah = wr_char [0A]
- al = char
- bh = page
- bl = graphics mode color
- cx = chars
- out: none
- notes: Cursor is not moved.
-
- WRITE COLOR PALETTE - rom_vid
- in: ah = wr_col_pal [0B]
- bh = palette id
- bl = color
- out: none
-
- WRITE PIXEL - rom_vid
- in: ah = wr_pixel [0C]
- al = color
- cx = pixel col
- dl = pixel row
- out: none
-
- READ PIXEL - rom_vid
- in: ah = rd_pixel [0D]
- cx = pixel col
- dl = pixel row
- out: al = color
-
- WRITE TTY CHARACTER - rom_vid
- in: ah = wr_tty [0E]
- al = char
- bl = graphics mode color
- out: none
-
- READ VIDEO MODE - rom_vid
- in: ah = rd_vid_mode [0F]
- out: ah = width in chars
- al = video mode
- bh = page (0 for graphics modes)
-
- PC-JR WRITE COLOR PALETTE REGISTER - rom_vid
- in: ah = wr_pal_reg [10]
- al = 00
- bh = palette value
- bl = palette reg
- out: none
-
- in: ah = wr_pal_reg [10]
- al = 01
- bh = border color
- out: none
-
- PC-AT WRITE STRING - rom_vid
- in: ah = wr_string [13]
- al = cursor movement switch
- 00 = no
- 01 = yes
- bl = color attribute (see scroll_up)
- bh = page
- dx = start cursor position
- cx = string length
- es:bp = string pointer
- out: none
-
-
- rom_equ ROM EQUIPMENT SERVICE [int 11]
- in: none
- out: ax bit settings = equipment list
- 0 = disk drive
- 1 = math coprocessor
- 2,3 = system board RAM in 16k blocks
- 4,5 = initial video mode
- 00 = unused
- 01 = 40 X 25 color
- 10 = 80 X 25 color
- 11 = 80 X 25 b/w
- 6,7 = number of disk drives
- 8 = DMA not present
- 9,10,11 = number of RS232 cards in system
- 12 = game I/O present
- 13 = serial printer present
- 14,15 = number of printers present
-
-
- rom_mem ROM MEMORY SIZE SERVICE [int 12]
- in: none
- out: ax = size in K
-
-
- rom_disk ROM DISKETTE SERVICES [int 13]
-
- RESET DISKETTE SYSTEM - rom_disk
- in: ah = rst_disk [00]
- out: none
-
- READ DISKETTE STATUS - rom_disk
- in: ah = rd_disk_stat [01]
- out: al = return code
- 01 = bad command
- 02 = address mark not found
- 03 = write protected
- 04 = sector not found
- 06 = no disk
- 08 = DMA overrun
- 09 = DMA across 64K boundary
- 10 = bad CRC
- 20 = controller failed
- 40 = seek failed
- 80 = time out
-
- READ DISKETTE SECTOR - rom_disk
- in: ah = rd_disk_sect [02]
- al = sectors to read
- ch = track
- cl = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
- al = sectors read
-
- WRITE DISKETTE SECTOR - rom_disk
- in: ah = wr_disk_sect [03]
- al = sectors to write
- ch = track
- cl = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
- al = sectors written
-
- VERIFY DISKETTE SECTOR - rom_disk
- in: ah = ver_disk_sect [04]
- al = sectors to verify
- ch = track
- cl = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
- al = sectors verified
-
- FORMAT DISKETTE TRACK - rom_disk
- in: ah = fmt_disk_trk [05]
- al = sectors to format
- ch = track
- cl = sector
- dh = head
- dl = drive
- es:bx = four byte address field pointer
- byte 1 = track
- byte 2 = head
- byte 3 = sector
- byte 4 = bytes/sector
- out: cf = error
- ah = return code (see rd_disk_stat)
- al = sectors formatted
-
- PC-AT READ DISKETTE PARAMETERS - rom_disk
- in: ah = rd_disk_parm [08]
- out: cf = error
- ah = return code (see rd_disk_stat)
- dl = drives
- dh = max sides
- cl = max sectors
- ch = max tracks
-
- PC-AT INITIALIZE DISKETTE PARAMETERS - rom_disk
- in: ah = init_disk_parm [09]
- out: cf = error
- ah = return code (see rd_disk_stat)
- int 41 vector points to drive 0 table
- int 46 vector points to drive 1 table
-
- PC-AT READ DISKETTE LONG - rom_disk [0A]
- in: ah = rd_disk_long
- ch = cylinder
- cl = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT WRITE DISKETTE LONG - rom_disk
- in: ah = wr_disk_long [0B]
- ch = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT SEEK DISKETTE TRACK - rom_disk
- in: ah = disk_seek [0C]
- ch = sector
- dh = head
- dl = drive
- es:bx = buffer pointer
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT ALTERNATE DISKETTE RESET - rom_disk
- in: ah = alt_reset_disk [0D]
- dl = drive
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT TEST FOR DISKETTE READY - rom_disk
- in: ah = test_disk_rdy [10]
- dl = drive
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT RECALIBRATE DISKETTE - rom_disk
- in: ah = recal_disk [11]
- dl = drive
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT DISKETTE DIAGNOSTICS - rom_disk
- in: ah = disk_diag [14]
- out: cf = error
- ah = return code (see rd_disk_stat)
-
- PC-AT READ DISKETTE TYPE - rom_disk
- in: ah = rd_disk_type [15]
- dl = drive
- out: ah = disk type
- 00 = no disk
- 01 = disk, no change detector present
- 02 = disk, change detector present
- 03 = fixed disk
- cx,dx = number of 512 byte sectors
-
- PC-AT CHANGE DISKETTE STATUS - rom_disk
- in: ah = chg_disk_stat [16]
- out: ah = change status
- 00 = no change
- 01 = change
- dl = drive
-
- PC-AT WRITE DISKETTE TYPE - rom_disk
- in: ah = wr_disk_type [17]
- al = disk type
- 00 = no disk
- 01 = regular disk in regular drive
- 02 = high capacity disk in high capacity drive
- out: none
-
-
- rom_serial ROM SERIAL PORT SERVICES [int 14]
-
- INITIALIZE SERIAL PORT - rom_serial
- in: ah = init_port [00]
- al bit settings = port configuration
- 0,1 = word length
- 10 = 7 bits
- 11 = 8 bits
- 2 = stop bits
- 0 = 1
- 1 = 2
- 3,4 = parity
- 00 = none
- 01 = odd
- 10 = none
- 11 = even
- 5,6,7 = baud rate
- 000 = 110
- 001 = 150
- 010 = 300
- 011 = 600
- 100 = 1200
- 101 = 2400
- 110 = 4800
- 111 = 9600 (4800 on PC-JR)
- dx = port
- out: ah bits = usar/t status
- 0 = data ready
- 1 = overrun error
- 2 = parity error
- 3 = framing error
- 4 = break detect
- 5 = tx ready
- 6 = tx empty
- 7 = timeout
- al bits = modem status
- 0 = delta CTS
- 1 = delta DSR
- 2 = trailing edge ring detected
- 3 = delta carrier detect
- 4 = CTS
- 5 = DSR
- 6 = ring detect
- 7 = carrier detect
-
- TRANSMIT CHARACTER - rom_serial
- in: ah = tx_char [01]
- al = char
- dx = port
- out: ah bits = usar/t status (see init_port)
- al bits = modem status (see init_port)
-
-
- RECEIVE CHARACTER - rom_serial
- in: ah = rx_char [02]
- dx = port
- out: al = char
- ah bits = usar/t status (see init_port)
-
- READ SERIAL PORT STATUS - rom_serial
- in: ah = rd_port_stat [03]
- out: ax bits = status (see init_port)
-
-
-
- rom_dev ROM DEVICE SERVICES [int 15]
-
- TURN CASSETTE MOTOR ON - rom_dev
- in: ah = cass_on [00]
- out: none
-
- TURN CASSETTE MOTOR OFF - rom_dev
- in: ah = cass_off [01]
- out: none
-
- READ CASSETTE DATA BLOCK - rom_dev
- in: ah = cass_rd [02]
- cx = byte count
- es:bx = buffer pointer
- out: cf = error
- dx = byte count
- es:bx = pointer past last byte
-
- WRITE CASSETTE DATA BLOCK - rom_dev
- in: ah = cass_wr [03]
- cx = byte count
- es:bx = buffer pointer
- out: es:bx = pointer past last byte
-
- PC-AT OPEN DEVICE - rom_dev
- in: ah = open_dev [80]
- bx = id
- cx = process type
- out: none
-
- PC-AT CLOSE DEVICE - rom_dev
- in: ah = close_dev [81]
- bx = device id
- cx = process type
- out: none
-
- PC-AT TERMINATE DEVICE - rom_dev
- in: ah = term_dev [82]
- bx = device id
- out: none
-
- PC-AT EVENT WAIT - rom_dev
- in: ah = event_wait [83]
- al = subservice
- 0 = set interval
- 1 = cancel
- es:bx = buffer pointer
- cx,dx = microseconds to wait
- out: none
-
- PC-AT JOYSTICK - rom_dev
- in: ah = joystick [84]
- dl = 0
- out: al = current switch settings
-
- PC-AT Sys Req KEY - rom_dev
- in: ah = sys_req [85]
- al = switch
- 00 = press
- 01 = break
- out: none
-
- PC-AT WAIT - rom_dev
- in: ah = wait [86]
- cx,dx = microseconds to wait
- out: none
-
- PC-AT MOVE BLOCK - rom_dev
- in: ah = move_block [87]
- cx = words to move
- es:si = table pointer
- out: none
-
- PC-AT READ EXTENDED MEMORY SIZE - rom_dev
- in: ah = rd_ext_mem [88]
- out: none
-
- PC-AT SWITCH TO VIRTUAL MEMORY - rom_dev
- in: ah = virtual_mem [89]
- out: none
-
- PC-AT DEVICE BUSY LOOP - rom_dev
- in: ah = dev_busy [90]
- al = type code
- out: none
-
- PC-AT SET FLAG AND COMPLETE SERVICE - rom_dev
- in: ah = complete_int [91]
- al = type code
- out: none
-
-
- rom_key ROM KEYBOARD SERVICES [int 16]
-
- READ KEYBOARD - rom_key
- in: ah = rd_key [00]
- out: ah = scan code
- al = char code
-
- TEST KEYBOARD - rom_key
- in: ah = test_key [01]
- out: zf = key ready
- out: ah = scan code
- al = char code
-
- READ SHIFT STATUS - rom_key
- in: ah = rd_shift [02]
- out: al bits = shift status
- 0 = right shift
- 1 = left shift
- 2 = ctrl
- 3 = alt
- 4 = scroll lock
- 5 = num lock
- 6 = caps lock
- 7 = insert
-
- PC-JR TYPEMATIC DELAY - rom_key
- in: ah = key_delay [03]
- al = operation code
- 00 = reset delays
- 01 = increase initial delay
- 02 = increase continue delay
- 03 = increase both delays
- 04 = turn off typematic
- out: none
-
- PC-JR KEYBOARD CLICK - rom_key
- in: ah = key_click [04]
- al = operation code
- 00 = click off
- 01 = click on
- out: none
-
-
- rom_print ROM PRINTER SERVICES [int 17]
-
- PRINT CHARACTER - rom_print
- in: ah = print_char [00]
- al = char
- out: ah bits = return code
- 0 = timeout
- 1 = unused
- 2 = unused
- 3 = I/O error
- 4 = selected
- 5 = no paper
- 6 = ack
- 7 = not busy
-
- INITIALIZE PRINTER - rom_print
- in: ah = init_print [01]
- out: ah bits = return code (see print_char)
-
- READ PRINTER STATUS - rom_print
- in: ah = rd_print_stat [02]
- out: ah bits = return code (see print_char)
-
-
-
- rom_basic ROM START BASIC SERVICE [int 18]
-
-
- rom_reboot ROM REBOOT SERVICE [int 19]
-
-
- rom_time ROM REAL TIME CLOCK SERVICES [int 1A]
-
- READ CLOCK COUNT - rom_time
- in: ah = rd_count [00]
- out: al = midnight
- cx:dx = ticks
-
- WRITE CLOCK COUNT - rom_time
- in: ah = wr_count [01]
- cx:dx = ticks
- out: none
-
- PC-AT READ TIME - rom_time
- in: ah = rd_time [02]
- out: ch = hours
- cl = minutes
- dh = seconds
-
- PC-AT WRITE TIME - rom_time
- in: ah = wr_time [03]
- ch = hours
- cl = minutes
- dh = seconds
- out: none
-
- PC-AT READ DATE - rom_time
- in: ah = rd_date [04]
- out: dl = day
- dh = month
- cl = year
- ch = century (19/20)
-
- PC-AT WRITE DATE - rom_time
- in: ah = wr_date [05]
- dl = day
- dh = month
- cl = year
- ch = century (19/20)
- out: none
-
- PC-AT SET ALARM - rom_time
- in: ah = set_alarm [06]
- ch = hours
- cl = minutes
- dh = seconds
- out: none
- notes: place alarm handler address in int 4A vector
-
- PC-AT RESET ALARM - rom_time [07]
- in: ah = reset_alarm
- out: none
-
-
- DOS
- ---
-
- dos_term DOS PROGRAM TERMINATION SERVICE [int 20]
-
-
- dos_func DOS FUNCTION SERVICES [int 21]
-
- DOS1 - TERMINATE PROGRAM - dos_func
- in: ah = term [00]
- out: none
-
- DOS1 - KEYBOARD INPUT WITH ECHO - dos_func
- in: ah = key_in_echo [01]
- out: al = char
-
- DOS1 - DISPLAY OUTPUT - dos_func
- in: ah = disp_out [02]
- dl = char
- out: none
-
- DOS1 - SERIAL INPUT - dos_func
- in: ah = serial_in [03]
- out: al = char
-
- DOS1 - SERIAL OUTPUT - dos_func
- in: ah = serial_out [04]
- dl = char
-
- DOS1 - PRINTER OUTPUT - dos_func
- in: ah = printer_out [05]
- dl = char
-
- DOS1 - DIRECT CONSOLE I/O - dos_func
- in: ah = console_io [06]
- dl = operation code
- 00 thru FE = char to output
- FF = keyboard input
- out: al = char input
-
- DOS1 - DIRECT KEYBOARD INPUT - dos_func
- in: ah = dir_key_in [07]
- out: al = char
-
- DOS1 - KEYBOARD INPUT WITHOUT ECHO - dos_func
- in: ah = key_in [08]
- out: al = char
-
- DOS1 - DISPLAY STRING - dos_func
- in: ah = disp_string [09]
- ds:dx = string pointer
- out: none
-
- DOS1 - BUFFERED KEYBOARD INPUT - dos_func
- in: ah = buf_key_in [0A]
- ds:dx = buffer pointer
- out: none
-
- DOS1 - CHECK KEYBOARD STATUS - dos_func
- in: ah = chk_key_stat [0B]
- out: al = status
- 00 = empty
- FF = char available
-
- DOS1 - CLEAR KEY BUFFER AND PERFORM FUNCTION - dos_func
- in: ah = clr_key_func [0C]
- al = subfunction (01, 06, 07, 08, or 0A; 00 = null)
- dl = subfunction 6 char
- out: al = subfunction 6 char
-
- DOS1 - RESET DISK - dos_func
- in: ah = reset_disk [0D]
- out: none
-
- DOS1 - SELECT CURRENT DRIVE - dos_func
- in: ah = sel_drive [0E]
- dl = drive
- out: al = drive count
-
- DOS1 - OPEN FILE - dos_func
- in: ah = open_file [0E]
- ds:dx = FCB pointer
- out: al = return code
- 00 = successful
- FF = unsuccessful
-
- DOS1 - CLOSE FILE - dos_func
- in: ah = close_file [10]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - SEARCH FOR FIRST MATCHING FILE - dos_func
- in: ah = search_first [11]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - SEARCH FOR NEXT MATCHING FILE - dos_func
- in: ah = search_next [12]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - DELETE FILE - dos_func
- in: ah = delete_file [13]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - READ SEQUENTIAL RECORD - dos_func
- in: ah = rd_seq_rec [14]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - WRITE SEQUENTIAL RECORD - dos_func
- in: ah = wr_seq_rec [15]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - CREATE FILE - dos_func
- in: ah = create_file [16]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - RENAME FILE - dos_func
- in: ah = rename_file [17]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - REPORT CURRENT DRIVE - dos_func
- in: ah = rd_cur_drive [19]
- out: al = drive
-
- DOS1 - SET DISK TRANSFER AREA FUCNTION - dos_func
- in: ah = set_dta [1A]
- ds:dx = DTA pointer
- out: none
-
- DOS1 - READ CURRENT DRIVE'S FAT - dos_func
- in: ah = rd_fat_1 [1B]
- out: al = sectors/allocation unit
- cx = bytes/sector
- dx = allocation units
- ds:dx = FAT ID byte pointer
-
- DOS1 - READ ANY DRIVE'S FAT - dos_func
- in: ah = rd_fat_2 [1C]
- dl = drive
- out: al = sectors/allocation unit
- cx = bytes/sector
- dx = allocation units
- ds:dx = FAT ID byte pointer
-
- DOS1 - READ RANDOM FILE RECORD - dos_func
- in: ah = rd_ran_rec1 [21]
- ds:dx = FCB pointer
- out: al = return code
- 00 = successful
- 01 = end of file
- 02 = insufficient DTA space
- 03 = end of file with partial record
-
- DOS1 - WRITE RANDOM FILE RECORD - dos_func
- in: ah = wr_ran_rec1 [22]
- ds:dx = FCB pointer
- out: al = return code (see rd_ran_rec1)
-
- DOS1 - REPORT FILE SIZE - dos_func
- in: ah = rd_file_size [23]
- ds:dx = FCB pointer
- out: al = return code (see open_file)
-
- DOS1 - SET RANDOM RECORD FIELD SIZE - dos_func
- in: ah = set_ran_rec [24]
- ds:dx = FCB pointer
- out: none
-
- DOS1 - SET INTERRUPT VECTOR - dos_func
- in: ah = set_int_vec [25]
- al = int number
- ds:dx = int handler pointer
- out: none
-
- DOS1 - CREATE PROGRAM SEGMENT FUCNTION - dos_func
- in: ah = create_seg [26]
- dx = segment address
- out: none
-
- DOS1 - READ RANDOM FILE RECORD - dos_func
- in: ah = rd_ran_rec2 [27]
- cx = record count
- ds:dx = FCB pointer
- out: al = return code (see rd_ran_rec1)
- cx = actual record count
-
- DOS1 - WRITE RANDOM FILE RECORD FUCNTION - dos_func
- in: ah = wr_ran_rec2 [28]
- cx = record count
- ds:dx = FCB pointer
- out: cx = actual record count
-
- DOS1 - PARSE FILENAME - dos_func
- in: ah = parse_name [29]
- al bits = parse control
- 0 = scan separators
- 1 = set FCB drive byte
- 2 = change FCB filename only if file is found
- 3 = change FCB extension only if file is found
- ds:si = command line pointer
- es:di = FCB pointer
- out: al = return code
- 00 = success with single filename
- 01 = success with wildcard
- FF = failure
- ds:si = char following file name pointer
- es:di = FCB pointer
-
- DOS1 - GET DATE - dos_func
- in: ah = get_date [2A]
- out: al = day of week (0 = Sun, 6 = Sat)
- cx = year (1980 thru 2099)
- dh = month
- dl = day
-
- DOS1 - SET DATE - dos_func
- in: ah = set_date [2B]
- cx = year (1980 thru 2099)
- dh = month
- dl = day
- out: none
-
- DOS1 - GET TIME - dos_func
- in: ah = get_time [2C]
- out: cl = minutes
- ch = hours
- dl = seconds 100th's
- dh = seconds
-
- DOS1 - SET TIME - dos_func
- in: ah = set_time [2D]
- cl = minutes
- ch = hours
- dl = seconds 100th's
- dh = seconds
- out: none
-
- DOS1 - SET DISK WRITE VERIFICATION MODE - dos_func
- in: ah = set_verify [2E]
- al = verify switch
- 00 = verify off
- 01 - verify on
- dl = 00
- out: none
-
- DOS2 - GET DISK TRANSFER AREA ADDRESS - dos_func
- in: ah = get_dta [2F]
- out: es:bx = DTA pointer
-
- DOS2 - GET DOS VERSION NUMBER - dos_func
- in: ah = get_ver [30]
- out: al = major
- ah = minor
- bx = 0000
- cx = 0000
-
- DOS2 - ADVANCED TERMINATE BUT STAY RESIDENT - dos_func
- in: ah = keep [31]
- al = return code
- dx = segment address of memory to free
- out: none
-
- DOS2 - GET/SET CONTROL BREAK STATUS - dos_func
- in: ah = cntrl_brk [33]
- al = get/set switch
- 00 = get
- 01 = set
- dl = set code
- 00 = break check off
- 01 = break check on
- out: dl = get code (same as set code)
-
- DOS2 - GET INTERRUPT VECTOR - dos_func
- in: ah = get_int_vec [35]
- al = int number
- out: es:bx = int vector
-
- DOS2 - GET DISK FREE SPACE - dos_func
- in: ah = get_space [36]
- dl = drive
- out: ax = sectors/cluster
- bx = available clusters
- cx = bytes/sector
- dx = total clusters
-
- DOS2 - GET COUNTRY INFORMATION - dos_func
- in: ah = get_country [38]
- al = operation code
- 00 = standard info
- 01 - FE = country code
- FF = country code in bx
- bx = country code when al = FF
- ds:dx = 32 byte buffer pointer
- out: cf = error
- al = return code
- ds:dx = info pointer
- bx = country code
-
- DOS2 - MAKE DIRECTORY - dos_func
- in: ah = mkdir [39]
- ds:dx = ASCIIZ pointer
- out: ax = return code
- 01 = invalid function
- 02 = file not found
- 03 = path not found
- 04 = no more handles
- 05 = access denied
- 06 = invalid handle
- 07 = memory control blocks destroyed
- 08 = insufficient memory
- 09 = invalid memory block address
- 0A = invalid environment
- 0B = invalid format
- 0C = invalid access code
- 0D = invalid data
- 0F = invalid drive spec
- 10 = attempt to remove current directory
- 11 = not same device
- 12 = no more files
-
- DOS2 - REMOVE DIRECTORY - dos_func
- in: ah = rmdir [3A]
- ds:dx = ASCIIZ pointer
- out: ax = return code (see mkdir)
-
- DOS2 - CHANGE CURRENT DIRECTORY FUNCTION - dos_func
- in: ah = chdir [3B]
- ds:dx = ASCIIZ pointer
- out: ax = return code (see mkdir)
-
- DOS2 - CREATE FILE - dos_func
- in: ah = create [3C]
- cx = file attribute
- bit 7 = unused
- bit 6 = unused
- bit 5 = archive
- bit 4 = subdirectory
- bit 3 = volume label
- bit 2 = system
- bit 1 = hidden
- bit 0 = read only
- ds:dx = ASCIIZ pointer
- out: cf = error
- ax = handle or return code (see mkdir)
-
- DOS2 - OPEN FILE - dos_func
- in: ah = open [3D]
- al = access code
- rd_only = read only
- wr_only = write only
- rd_wr = read/write
- ds:dx = ASCIIZ pointer
- out: cf = error
- ax = handle or return code code (see mkdir)
-
- DOS2 - CLOSE FILE - dos_func
- in: ah = close [3E]
- bx = handle
- out: ax = return code (see mkdir)
-
- DOS2 - READ FILE/DEVICE - dos_func
- in: ah = read [3F]
- bx = handle
- cx = bytes to read
- ds:dx = DTA pointer
- out: cf = error
- ax = bytes read or return code code (see mkdir)
-
- DOS2 - WRITE FILE/DEVICE - dos_func
- in: ah = write [40]
- bx = handle
- cx = bytes to write
- ds:dx = DTA pointer
- out: cf = error
- ax = bytes written or return code (see mkdir)
-
- DOS2 - DELETE FILE - dos_func
- in: ah = delete [41]
- ds:dx = DTA pointer
- out: ax = return code (see mkdir)
-
- DOS2 - MOVE FILE POINTER - dos_func
- in: ah = move_pointer [42]
- al = method code
- cx:dx = offset
- out: cf = error
- ax = return code (see mkdir)
- ds:ax = new pointer location
-
- DOS2 - CHANGE FILE MODE - dos_func
- in: ah = chmod [43]
- al = get/set switch
- 00 =get
- 01 = set
- cx = file attribute (see create)
- ds:dx = ASCIIZ pointer
- out: ax = return code (see mkdir)
- cx = file attribute (see create)
-
- DOS2 - DEVICE I/O CONTROL - dos_func
- in: ah = ioctl [44]
- al = subfunction
- bl = drive
- bx = handle
- cx = bytes
- out: cf = error
- ax = bytes or return code
- dx = control data bits
-
- DOS2 - DUPLICATE FILE HANDLE - dos_func
- in: ah = dup [45]
- bx = handle
- out: cf = error
- ax = handle or return code (see mkdir)
-
- DOS2 - FORCE FILE HANDLE DUPLICATION - dos_func
- in: ah = cdup [46]
- bx = first handle
- cx = second handle
- out: ax = return code (see mkdir)
- cx = handle
-
- DOS2 - GET CURRENT DIRECTORY - dos_func
- in: ah = get_dir [47]
- dl = drive
- ds:si = buffer pointer
- out: cf = error
- ds:si = path name
-
- DOS2 - ALLOCATE MEMORY - dos_func
- in: ah = allocate [48]
- bx = paragraphs
- out: cf = error
- ax = return code (see mkdir)
- bx = largest block size available
-
- DOS2 - FREE MEMORY - dos_func
- in: ah = free [49]
- es = return segment block
- out: ax = return code (see mkdir)
-
- DOS2 - MODIFY ALLOCATED MEMORY BLOCK - dos_func
- in: ah = set_block [4A]
- bx = paragraphs
- es = block segment address
- out: ax = return code (see mkdir)
- bx = maximum size
-
- DOS2 - LOAD/EXECUTE PROGRAM - dos_func
- in: ah = exec [4B]
- al = subfunction
- ds:dx = ASCIIZ pointer
- es:bx = control block pointer
- out: ax = return code
-
- DOS2 - TERMINATE PROCESS - dos_func
- in: ah = term_proc [4C]
- al = return code (sets ERRORLEVEL)
- out: none
-
- DOS2 - GET SUBPROGRAM RETURN CODE - dos_func
- in: ah = get_code [4D]
- out: al = return code (as set by term_proc [4C])
- ah = termination code
- 00 = normal voluntary termination
- 01 = termination by DOS due to CTRL-BREAK
- 02 = termination by DOS due to critical device error
- 03 = voluntary termination due to keep [31]
-
- DOS2 - FIND FIRST FILE MATCH - dos_func
- in: ah = find_first [4E]
- cx = file attribute (see create)
- ds:dx = ASCIIZ pointer
- out: ax = return code (see mkdir)
-
- DOS2 - FIND NEXT FILE MATCH - dos_func
- in: ah = find_next [4F]
- ds:dx = info from find_first pointer
- out: ax = return code (see mkdir)
-
- DOS2 - GET FILE WRITE VERIFY STATE - dos_func
- in: ah = get_verify [54]
- out: al = verify state
- 00 = off
- 01 = on
-
- DOS2 - RENAME FILE - dos_func
- in: ah = rename [56]
- ds:dx = old ASCIIZ pointer
- es:di = new ASCIIZ pointer
- out: ax = return code (see mkdir)
-
- DOS2 - GET/SET FILE DATE/TIME - dos_func
- in: ah = date_time [57]
- al = get/set switch
- 00 = get
- 01 = set
- bx = handle
- cx = time
- dx = date
- out: ax = return code (see mkdir)
- cx = time
- dx = date
-
- DOS3 - GET EXTENDED RETURN CODE - dos_func
- in: ah = get_err [59]
- bx = version code (0000 = DOS3)
- out: ax = return code
- bh = error class
- bl = action
- ch = locus
-
- DOS3 - CREATE TEMPORARY FILE - dos_func
- in: ah = create_temp [5A]
- ds:dx = pathname pointer
- cx = file attribute (see create)
- out: cf = error
- ax = return code (see mkdir)
- ds:dx = pathname pointer
-
- DOS3 - CREATE NEW FILE - dos_func
- in: ah = create_new [5B]
- ds:dx = filename pointer
- cx = file attribute (see create)
- out: cf = error
- ax = handle or return code (see mkdir)
-
- DOS3 - LOCK/UNLOCK FILE ACCESS - dos_func
- in: ah = file_lock [5C]
- al = switch
- 00 = lock
- 01 = unlock
- bx = handle
- cx:dx = offset
- si:di = amount
- out: ax = return code (see mkdir)
-
- DOS3 - GET PROGRAM SEGMENT PREFIX ADDRESS - dos_func
- in: ah = get_psp [56]
- out: bx = PSP segment address
-
-
- dos_rd_abs DOS ABSOLUTE DISK READ SERVICE [int 25]
- in: cx = sectors
- dx = start sector
- ds:bx = data pointer
- out: cf = error
- al = return code
- 00 = write protected
- 01 = invalid drive
- 02 = drive not ready
- 04 = CRC error
- 06 = seek error
- 07 = invalid format
- 08 = sector not found
- 0A = write error
- 0B = read error
- 0C = nonspecific error
- ah = return code
- 00 = other error
- 02 = bad address mark
- 03 = write protected
- 04 = bad sector
- 08 = DMA failure
- 10 = bad CRC
- 20 = controller failure
- 40 = bad seek
- 80 = timeout
-
-
- dos_wr_abs DOS ABSOLUTE DISK WRITE SERVICE [int 26]
- in: cx = sectors
- dx = start sector
- ds:bx = data pointer
- out: cf = error
- ax = return code (see dos_rd_abs)
-
-
- dos_term_res DOS TERMINATE RESIDENT SERVICE [int 27]
-
-
- dos_spool DOS PRINT SPOOLER SERVICES [int 2F]
-
- INSTALLED QUERY - dos_spool
- in: al = spool_query [00]
- out: al = return code
- 00 = not installed but may be
- 01 = not installed and may not be
- FF = is installed
-
- SUBMIT FILE - dos_spool
- in: al = spool_submit [01]
- ds:dx = submit packet pointer
- byte 0 = level code
- bytes 1 - 4 = ASCIIZ pointer (NO wildcards)
- out: none
-
- CANCEL FILE - dos_spool
- in: al = spool_cancel [02]
- ds:dx = ASCIIZ pointer (wildcards OK)
- out: none
-
- CANCEL ALL FILES - dos_spool
- in: al = spool_canall [03]
- out: none
-
- EXAMINE QUEUE - dos_spool
- in: al = spool_queue [04]
- out: ds:dx = filename list pointer
-
- NULL - dos_spool
- in: al = spool_null [05]
- out: none