Dec 132017
 
A list of calls embedded in DOS.
File DOSCALLS.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
A list of calls embedded in DOS.
File Name File Size Zip Size Zip Type
DOSCALLS.TXT 59648 11784 deflated

Download File DOSCALLS.ZIP Here

Contents of the DOSCALLS.TXT file



Interrupt List for MS-DOS (2.xx only)
(With some notes on Dos 3.xx)

- - - Interrupt Structure - - -
Orginal work Janet Jack January 1985
Corrections & additions J. Weaver Jr. January 1985
Addition John Cooper February 1985
Addition Skip Gilbrech February 1985
Corrections & additions Bob Jack
Ongoing Additions and Cxns Jim Kyle April 1985
Recent Additions and Corrections: (7/25/85)
John Ruschmeyer (...!ihnp4!vax135!petsd!moncol!john)
Bill Frolik (...!ihnp4!hplabs!hp-pcd!bill)
Ross M. Greenberg (...!ihnp4!timeinc!greenber)

-----------------------------------------------------------
INT 0 - DIVIDE ERROR
Automatically called at end of DIV or IDIV operation
that results in error. Normally set by DOS to display an error
message and abort the program.
-----------------------------------------------------------
INT 1 - SINGLE-STEP
Generated at end of each machine instruction if
TF bit in FLAGS is set. This is what makes the T command
of DEBUG work for single-stepping. Is not generated after
MOV to segment register or POP of segment register.
-----------------------------------------------------------
INT 2 - NMI (Non Maskable Interrupt)
Generated by NMI signal in hardware. Used in IBM for
memory parity error trapping.
-----------------------------------------------------------
INT 3 - 1-BYTE INTERRUPT
Generated by opcode 0CCh. Similar to 8080's RST
instruction. Generally used to set breakpoints for DEBUG.
-----------------------------------------------------------
INT 4 - OVERFLOW
Generated by INTO instruction if OF flag is set. If
flag is not set, INTO is effectively a NOP. Used to trap any
arithmetic errors when program is ready to handle them rather
than immediately when they occur.
-----------------------------------------------------------
INT 5 - Print-Screen Key
Automatically called by keyboard scan when print-
screen key is pressed. Normally executes routine to print
the screen, but may call any routine that can safely be
executed from inside the keyboard scanner.
Status and result byte at address 0050:0000.
-----------------------------------------------------------
INT 6 - UNKNOWN
-----------------------------------------------------------
INT 7 - UNKNOWN
-----------------------------------------------------------
INT 8 thru 0FH - Vectored Hardware Lines (in IBM at least)
In IBM, these 8 interrupts are generated in
response to IRQ 0 through IRQ 7 (if enabled via port 21).
IRQ0 - Timer interrupt
IRQ1 - Keyboard interrupt
IRQ4 - serial controller
IRQ6 - diskette interrupt
IRQ7 - PPI interrupt
-----------------------------------------------------------
INT 10 - VIDEO - SET VIDEO MODE
REG AH = 0
REG AL = 0 = 40x25 B&W
1 = 40x25 COLOR
2 = 80x25 BW
3 = 80x25 COLOR
4 = 320x200 GRAPHICS, 4 COLOR
5 = 320x200 GRAPHICS, 4 GREY
6 = 640x200 GRAPHICS, B&W
7 = MONOCHROME GRAPHICS MODE
8 = 160x200 GRAPHICS, 16 COLOR
9 = 320x200 GRAPHICS, 16 COLOR
A = 640x200 GRAPHICS, 4 COLOR

Note: Modes 8-10 are only available on the PCjr (and
Tandy 1000).
-----------------------------------------------------------
INT 10 - VIDEO - SET CURSOR CHARACTERISTICS
REG AH = 1
REG CH = bit values:
bits 5-6 = blink attribute
(00=normal, 01=invis., 11=fast)
bits 0-4 = start line for cursor in char. cell
REG CL = bit values:
bits 0-4 = end line for cursor in char. cell
-----------------------------------------------------------
INT 10 - VIDEO - SET CURSOR POSITION
REG AH = 2
REG DH,DL = ROW,COLUMN - 0,0 = UPPER LEFT
REG BH = PAGE NO. - 0 = GRAPHICS
-----------------------------------------------------------
INT 10 - VIDEO - READ CURSOR POSITION
REG AH = 3
REG BH = PAGE NO. - 0 = GRAPHICS
ON EXIT:
REG DH,DL = ROW,COLUMN
REG CH,CL = CURSOR MODE,CURRENT SET
-----------------------------------------------------------
INT 10 - VIDEO - READ LIGHT PEN POSITION
REG AH = 4
ON EXIT:
REG AH = 0: light pen switch not activated
AH = 1: light pen values in registers
DH = row of current position
DL = column of current position
CH = raster line (0-199)
BX = pixel column (0-319 or 0-639)
-----------------------------------------------------------
INT 10 - VIDEO - SELECT DISPLAY PAGE
REG AH = 5
REG AL = 0 - 7: NEW PAGE VALUE FOR MODES 0 & 1
0 - 3: NEW PAGE VALUE FOR MODES 2 & 3
80H: READ CRT/CPU PAGE REGISTERS
81H: SET CPU PAGE REGISTER TO VALUE IN BL
82H: SET CRT PAGE REGISTER TO VALUE IN BH
83H: SET BOTH DISPLAY REGISTERS
ON EXIT:
REG BH = CRT PAGE REGISTER
BL = CPU PAGE REGISTER
-----------------------------------------------------------
INT 10 - VIDEO - SCROLL PAGE UP
REG AH = 6
REG AL = NO. OF LINES BLANKED AT BOTTOM OF PAGE
0 = BLANK WINDOW
REG BH = ATTRIBUTES TO BE USED ON BLANK LINE
WINDOW:
REG CH,CL = UPPER LEFT CORNER
REG DH,DL = LOWER RIGHT CORNER
-----------------------------------------------------------
INT 10 - VIDEO - SCROLL PAGE DOWN
REG AH = 7
REG AL = NO. OF LINES BLANKED AT TOP OF PAGE
0 = BLANK WINDOW
REG BH = ATTRIBUTES TO BE USED ON BLANK LINE
WINDOW:
REG CH,CL = UPPER LEFT CORNER
REG DH,DL = LOWER RIGHT CORNER
-----------------------------------------------------------
INT 10 - VIDEO - READ ATTRIBUTES/CHARACTER AT CURSOR POSITION
REG AH = 8
REG BH = DISPLAY PAGE
ON EXIT:
REG AL = CHAR
REG AH = ATTRIBUTE OF CHAR - ALPHA MODE
-----------------------------------------------------------
INT 10 - VIDEO - WRITE ATTRIBUTES/CHARACTERS AT CURSOR POS
REG AH = 9
REG AL = CHARACTER
REG BH = DISPLAY PAGE - ALPHA MODE
REG BL = ATTRIBUTES OF CHAR
REG CX = NO. OF CHAR TO WRITE
-----------------------------------------------------------
INT 10 - VIDEO - WRITE CHARACTERS ONLY AT CURSOR POS
REG AH = 0AH
REG AL = CHARACTER
REG BH = DISPLAY PAGE - ALPHA MODE
REG BL = COLOR OF CHARACTER (GRAPHICS MODE)
REG CX = NO. OF CHAR TO WRITE
-----------------------------------------------------------
INT 10 - SET COLOR PALETTE
REG AH = 0BH
REG BH = PALETTE COLOR ID
REG BL = COLOR TO BE USED W/COLOR ID
-----------------------------------------------------------
INT 10 - WRITE DOT ON SCREEN
REG AH = 0CH
REG AL = COLOR OF DOT
REG DX = ROW (0000 - 00C7)
REG CX = COLUMN (0000 - 027F)
NOTE: VIDEO MODES 6 & 7 ONLY
-----------------------------------------------------------
INT 10 - READ DOT ON SCREEN
REG AH = 0DH
REG CX = COLUMN (0000 - 027F)
REG DX = ROW (0000 - 00C7)
ON RETURN:
REG AL = COLOR READ
-----------------------------------------------------------
INT 10 - WRITE CHARACTER - ADVANCE CURSOR (TTY WRITE)
REG AH = 0EH
REG AL = CHARACTER
REG BL = FOREGROUND COLOR (VIDEO MODES 6 & 7 ONLY)
-----------------------------------------------------------
INT 10 - GET CURRENT VIDEO MODE
REG AH = 0FH
ON RETURN:
REG AH = # OF COLUMNS ON SCREEN
REG AL = CURRENT VIDEO MODE
REG BH = CURRENT ACTIVE DISPLAY PAGE
-----------------------------------------------------------
INT 10 - SET PALETTE REGISTERS (PCjr AND TANDY 1000)
REG AH = 10H
AL = 0: SET PALETTE REGISTER
BL = PALETTE REGISTER TO SET
BH = COLOR VALUE TO STORE
AL = 1: SET BORDER COLOR REGISTER
BH = COLOR VALUE TO STORE
AL = 2: SET ALL PALETTE REGISTERS
ES:DX = POINTER TO 17-BYTE LIST
BYTES 0-15 = VALUES FOR PALETTE REGS. 0-15
BYTE 16 = VALUE FOR BORDER REGISTER
-----------------------------------------------------------
INT 10 - WRITE STRING, DON'T MOVE CURSOR (PC/AT ONLY)
REG AH = 13H
AL = 0
BL = ATTRIBUTE
BH = DISPLAY PAGE NUMBER
DX = STARTING CURSOR POSITION
CX = LENGTH OF STRING
ES:BP = POINTER TO START OF STRING
-----------------------------------------------------------
INT 10 - WRITE STRING, MOVE CURSOR AFTER STRING (PC/AT ONLY)
REG AH = 13H
AL = 1
BL = ATTRIBUTE
BH = DISPLAY PAGE NUMBER
DX = STARTING CURSOR POSITION
CX = LENGTH OF STRING
ES:BP = POINTER TO START OF STRING
-----------------------------------------------------------
INT 10 - WRITE STRING OF ALTERNATING CHARACTERS, ATTRIBUTES;
DON'T MOVE CURSOR (PC/AT ONLY)
REG AH = 13H
AL = 2
BH = DISPLAY PAGE NUMBER
DX = STARTING CURSOR POSITION
CX = LENGTH OF STRING
ES:BP = POINTER TO START OF STRING
-----------------------------------------------------------
INT 10 - WRITE STRING OF ALTERNATING CHARACTERS, ATTRIBUTES;
MOVE CURSOR (PC/AT ONLY)
REG AH = 13H
AL = 3
BH = DISPLAY PAGE NUMBER
DX = STARTING CURSOR POSITION
CX = LENGTH OF STRING
ES:BP = POINTER TO START OF STRING
-----------------------------------------------------------
INT 10 - GET VIDEO RAM ADDRESS
REG AH = 70H
ON RETURN:
REG AX = SEGMENT ADDRESS OF THE FOLLOWING
[BX] = OFFSET ADDRESS OF GREEN PLANE
[CX] = SEGMENT ADDRESS OF GREEN PLANE
[DX] = SEGMENT ADDRESS OF RED/BLUE PLANE
(RED OFFSET = 0, BLUE OFFSET = 4000)
-----------------------------------------------------------
INT 10 - GET INCRAM ADDRESSES
REG AH = 71H
ON RETURN:
REG AX = SEGMENT ADDRESS OF THE FOLLOWING
[BX] = SEGMENT ADDRESS OF INCRAM
[CX] = OFFSET ADDRESS OF INCRAM
-----------------------------------------------------------
INT 10 - SCROLL SCREEN RIGHT
REG AH = 72H
REG AL = NO. OF COLUMNS BLANKED AT LEFT OF PAGE
0 = BLANK WINDOW
REG BH = ATTRIBUTES TO BE USED ON BLANK COLUMNS
WINDOW:
REG CH,CL = UPPER LEFT CORNER
REG DH,DL = LOWER RIGHT CORNER
----------------------------------------------------------
INT 10 - SCROLL SCREEN LEFT
REG AH = 73H
REG AL = NO. OF COLUMNS BLANKED AT RIGHT OF PAGE
0 = BLANK WINDOW
REG BH = ATTRIBUTES TO BE USED ON BLANK COLUMNS
WINDOW:
REG CH,CL = UPPER LEFT CORNER
REG DH,DL = LOWER RIGHT CORNER
-----------------------------------------------------------
INT 11 - EQUIPMENT DETERMINATION
ON RETURN:
REG AX = "equipment flag"
bit 0 diskette installed
bit 1 8087 present
bit 2,3 always = 11
bit 4,5 initial video mode
01 = 40x25 COLOR
10 = 80x25 COLOR
11 = 80X25 IBM monochrome
bit 6,7 number of diskette drives (only if bit 0 = 1)
00 = 1, 01 = 2
bit 8 0 = dma present, 1= no dma on system
bit 9,10,11 number of RS232 cards
bit 12 game I/O attached
bit 13 serial printer installed (IBM-PCjr)
bit 14,15 number of printers
-----------------------------------------------------------
INT 12 - MEMORY SIZE
ON RETURN:
REG AX = NO. OF CONTIGUOUS 1K BLOCKS
-----------------------------------------------------------
INT 13 - RESET DISK SYSTEM
REG AH = 0
-----------------------------------------------------------
INT 13 - STATUS OF DISK SYSTEM
REG AH = 1
ON RETURN:
REG AL = STATUS
01H = BAD COMMAND
02H = ADDRESS MARK NOT FOUND
03H = WRITE ATTEMPTED ON WRITE-PROTECTED DISK
04H = SECTOR NOT FOUND
06H = DISKETTE REMOVED
08H = DMA OVERRUN
09H = DMA ACROSS 64K BOUNDARY
10H = BAD CRC
20H = CONTROLLER FAILURE
40H = SEEK FAILED
80H = TIME OUT
-----------------------------------------------------------
INT 13 - READ SECTORS INTO MEMORY
REG AH = 2
REG AL = NO. OF SECTORS
REG CH = TRACK NO.
REG CL = SECTOR NO.
REG DH = HEAD NO.
REG DL = DRIVE NO.
REG ES:BX = ADDRESS OF BUFFER
ON RETURN:
CF = SUCCESS/FAILURE SIGNAL
REG AH = STATUS (SEE ABOVE)
AL = NUMBER OF SECTORS READ
-----------------------------------------------------------
INT 13 - WRITES SECTORS FROM MEMORY
REG AH = 3
REG AL = NO. OF SECTORS
REG CH = TRACK NO.
REG CL = SECTOR NO.
REG DH = HEAD NO.
REG DL = DRIVE NO.
REG ES:BX = ADDRESS OF BUFFER
ON RETURN:
CF = SUCCESS/FAILURE SIGNAL
REG AH = STATUS (SEE ABOVE)
AL = NUMBER OF SECTORS WRITTEN
-----------------------------------------------------------
INT 13 - VERIFIES SECTORS
REG AH = 4
REG AL = NO. OF SECTORS
REG CH = TRACK NO.
REG CL = SECTOR NO.
REG DH = HEAD NO.
REG DL = DRIVE NO.
ON RETURN:
CF = SUCCESS/FAILURE SIGNAL
REG AH = STATUS (SEE ABOVE)
AL = NUMBER OF SECTORS VERIFIED
-----------------------------------------------------------
INT 13 - FORMAT DISKETTE TRACK
REG AH = 5
AL = NUMBER OF SECTORS
CH = TRACK NUMBER
CL = SECTOR NUMBER
DH = HEAD NUMBER
DL = DRIVE NUMBER
ES:BX = POINTER TO 4-BYTE ADDRESS FIELD
BYTE 1 = TRACK
BYTE 2 = HEAD
BYTE 3 = SECTOR
BYTE 4 = BYTES/SECTOR
ON RETURN:
CF = SUCCESS/FAILURE SIGNAL
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - GET CURRENT DRIVE PARAMETERS (PC/AT ONLY)
REG AH = 8
ON RETURN:
CF = SUCCESS/FAILURE FLAG
REG AH = STATUS CODE (SEE ABOVE)
DL = NUMBER OF DRIVES
DH = MAX. NUMBER OF SIDES
CL = MAX. NUMBER OF SECTORS
CH = MAX. NUMBER OF TRACKS
-----------------------------------------------------------
INT 13 - INITIAL TWO FIXED DISK BASE TABLES (PC/AT ONLY)
REG AH = 9
ON RETURN:
CF = SUCCESS/FAILURE FLAG
REG AH = STATUS CODE (SEE ABOVE)
INTERRUPT 41 POINTS TO TABLE FOR DRIVE 0
INTERRUPT 46 POINTS TO TABLE FOR DRIVE 1
-----------------------------------------------------------
INT 13 - READ LONG (PC/AT ONLY)
REG AH = 0AH
DL = DRIVE ID
DH = HEAD NUMBER
CH = CYLINDER NUMBER
CL = SECTOR NUMBER
ES:BX = POINTER TO BUFFER
ON RETURN:
CF = SUCCESS/FAILURE FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - WRITE LONG (PC/AT ONLY)
REG AH = 0BH
DL = DRIVE ID
DH = HEAD NUMBER
CH = SECTOR NUMBER
ES:BX = POINTER TO BUFFER
ON RETURN:
CF = SUCCESS/FAILURE FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - SEEK TO CYLINDER (PC/AT ONLY)
REG AH = 0CH
DL = DRIVE ID
DH = HEAD NUMBER
CH = SECTOR NUMBER
ON RETURN:
CF = SUCCESS/FAILURE FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - ATLERNATE DISK RESET (PC/AT ONLY)
REG AH = 0DH
DL = DRIVE ID
ON RETURN:
CF = SUCCESS/FAIL FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - TEST FOR DRIVE READY (PC/AT ONLY)
REG AH = 10H
DL = DRIVE ID
ON RETURN:
CF = SUCCESS/FAIL FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - RECALIBRATE DRIVE (PC/AT ONLY)
REG AH = 11H
DL = DRIVE ID
ON RETURN:
CF = SUCCESS/FAIL FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - CONTROLLER DIAGNOSTICS (PC/AT ONLY)
REG AH = 14H
ON RETURN:
CF = SUCCESS/FAIL FLAG
REG AH = STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 13 - GET DISK TYPE (PC/AT ONLY)
REG AH = 15H
DL = DRIVE ID
ON RETURN:
REG AH = DISK TYPE
0 = DISK NOT THERE
1 = DISKETTE, NO CHANGE DETECTION PRESENT
2 = DISKETTE, CHANGE DETECTION PRESENT
3 = FIXED DISK
CX,DX = NUMBER OF 512-BYTE SECTORS WHEN AH = 3
-----------------------------------------------------------
INT 13 - CHANGE OF DISK STATUS (PC/AT ONLY)
REG AH = 16H
ON RETURN:
REG DL = DRIVE THAT HAD DISK CHANGE
AH = DISK CHANGE STATUS
00 = NO DISK CHANGE
01 = DISK CHANGED
-----------------------------------------------------------
INT 13 - SET DISK TYPE (PC/AT ONLY)
REG AH = 17H
AL = DISK TYPE
00 = NO DISK
01 = REGULAR DISKETTE IN REGULAR DRIVE
02 = HIGH-CAP. DISK IN HIGH-CAP. DRIVE
-----------------------------------------------------------
INT 14 - SERIAL I/O - INITIALIZE USART
REG AH = 0
REG AL = INITIALIZING PARAMETERS
BIT 7 - 6 - 5 4 - 3 2 1 - 0
-BAUD RATE- PARITY STOP WORD
BITS LENGTH
000 110 BD 00 NONE 0-1 10 - 7
001 150 BD 01 ODD 1-2 11 - 8
010 300 BD 11 EVEN
011 600 BD
100 1200 BD
101 2400 BD
110 4800 BD
111 9600 BD (4800 ON PCjr)
DX = PORT NUMBER
-----------------------------------------------------------
INT 14 - SERIAL I/O - TRANSMIT CHARACTER
REG AH = 1
AL = CHARACTER
DX = PORT NUMBER
ON RETURN:
REG AH = RS-232 STATUS CODE
BIT 0 = DATA READY
1 = OVERRUN ERROR
2 = PARITY ERROR
3 = FRAMING ERROR
4 = BREAK DETECTED
5 = TRANSMISSION BUFFER REG. EMPTY
6 = TRANSMISSION SHIFT REG. EMPTY
7 = TIME OUT
AL = MODEM STATUS
BIT 0 = DELTA CLEAR-TO-SEND
1 = DELTA DATA-SET-READY
2 = TRAILING EDGE RING DETECTED
3 = CHANGE, RECEIVE LINE SIGNAL DETECTED
4 = CLEAR-TO-SEND
5 = DATA-SET-READY
6 = RING DETECTED
7 = RECEIVE LINE SIGNAL DETECTED
-----------------------------------------------------------
INT 14 - SERIAL I/O - RECEIVE CHARACTER
REG AH = 2
ON RETURN:
REG AL = CHARACTER RECEIVED
REG AH = RS-232 STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 14 - SERIAL I/O - GET USART STATUS
REG AH = 3
ON RETURN:
REG AH = RS-232 STATUS CODE (SEE ABOVE)
REG AL = MODEM STATUS CODE (SEE ABOVE)
-----------------------------------------------------------
INT 15 - TURN ON CASSETTE MOTOR
REG AH = 0
-----------------------------------------------------------
INT 15 - TURN OFF CASSETTE MOTOR
REG AH = 1
-----------------------------------------------------------
INT 15 - READ DATA BLOCKS FROM CASSETTE
REG AH = 2
CX = COUNT OF BYTES
ES:BX = POINTER TO DATA AREA
ON RETURN:
CF = ERROR SIGNAL
REG DX = COUNT OF BYTES READ
ES:BX = POINTER PAST LAST BYTE READ
-----------------------------------------------------------
INT 15 - WRITE DATA BLOCKS TO CASSETTE
REG AH = 3
CX = COUNT OF BYTES TO WRITE
ES:BX = POINTER TO DATA AREA
ON RETURN:
REG ES:BX = POINTER PAST LAST BYTE WRITTEN
-----------------------------------------------------------
INT 15 - DEVICE OPEN (PC/AT ONLY)
REG AH = 80
BX = DEVICE ID
CX = PROCESS TYPE
-----------------------------------------------------------
INT 15 - DEVICE CLOSE (PC/AT ONLY)
REG AH = 81
BX = DEVICE ID
CX = PROCESS TYPE
-----------------------------------------------------------
INT 15 - DEVICE PROGRAM TERMINATE (PC/AT ONLY)
REG AH = 82
BX = DEVICE ID
-----------------------------------------------------------
INT 15 - EVENT WAIT (PC/AT ONLY)
REG AH = 83
AL = SUBSERVICE
0 = SET INTERVAL
1 = CANCEL
ES:BX = POINTER TO CALLER'S MEMORY
CX,DX = NUMBER OF MICROSECONDS TO WAIT
-----------------------------------------------------------
INT 15 - READ JOYSTICK SWITCH SETTINGS (PC/AT ONLY)
REG AH = 84
DX = 0
ON RETURN:
REG AL = SWITCH SETTINGS
-----------------------------------------------------------
INT 15 - READ JOYSTICK INPUTS (PC/AT ONLY)
REG AH = 84
DX = 1
ON RETURN:
REG AX = A(x) VALUE
BX = A(y) VALUE
CX = B(x) VALUE
DX = B(y) VALUE
-----------------------------------------------------------
INT 15 - SYSTEM REQUEST KEY PRESS (PC/AT ONLY)
REG AH = 85
AL = 00 PRESS
AL = 01 BREAK
-----------------------------------------------------------
INT 15 - WAIT (PC/AT ONLY)
REG AH = 86
CX,DX = NUMBER OF MICROSECONDS TO WAIT
-----------------------------------------------------------
INT 15 - EXTENDED MEMORY - BLOCK MOVE (PC/AT ONLY)
REG AH = 87
CX = NUMBER OF WORDS TO MOVE
ES:SI = POINTER TO TABLE
-----------------------------------------------------------
INT 15 - EXTENDED MEMORY - GET MEMORY SIZE (PC/AT ONLY)
REG AH = 88
ON RETURN:
REG AX = MEMORY SIZE
-----------------------------------------------------------
INT 15 - SWITCH TO VIRTUAL MODE (PC/AT ONLY)
REG AH = 89
-----------------------------------------------------------
INT 15 - DEVICE BUSY LOOP (PC/AT ONLY)
REG AH = 90
AL = TYPE CODE
-----------------------------------------------------------
INT 15 - SET FLAG AND COMPLETE INTERRUPT
REG AH = 91
AL = TYPE CODE
-----------------------------------------------------------
INT 16 - KEYBOARD I/O - READ CHAR FROM BUFFER - WAIT IF EMPTY
REG AH = 0
ON RETURN:
REG AH = SCAN CODE
REG AL = CHARACTER
-----------------------------------------------------------
INT 16 - KEYBOARD I/O - CHECK BUFFER - DO NOT CLEAR
REG AH = 1
ON RETURN:
FLAG ZF = 0 = CHAR IN BUFFER
REG AH = SCAN CODE
REG AL = CHARACTER
FLAG ZF = 1 = NO CHAR IN BUFFER
-----------------------------------------------------------
INT 16 - KEYBOARD I/O - GET SHIFT STATUS
REG AH = 2
ON RETURN:
REG AL = SHIFT STATUS BITS
BIT 0 = RIGHT SHIFT KEY DEPRESSED
1 = LEFT SHIFT KEY DEPRESSED
2 = CTRL DEPRESSED
3 = ALT DEPRESSED
4 = SCROLL LOCK ACTIVE
5 = NUM LOCK ACTIVE
6 = CAPS LOCK ACTIVE
7 = INSERT STATE ACTIVE
-----------------------------------------------------------
INT 16 - KEYBOARD - SET DELAYS (PCjr ONLY)
REG AH = 3
AL = 0: RESET TYPEMATIC
AL = 1: INCREASE INITIAL DELAY
AL = 2: INCREASE CONTINUING DELAY
AL = 3: INCREASE BOTH DELAYS
AL = 4: TURN OFF TYPEMATIC
-----------------------------------------------------------
INT 16 - KEYBOARD - KEYCLICK (PCjr ONLY)
REG AH = 4
AL = 0: CLICK OFF
AL = 1: CLICK ON
-----------------------------------------------------------
INT 17 - CHARACTER TO PRINTER
REG AH = 0
REG AL = CHAR
ON RETURN:
REG AH = STATUS
BIT 0 = TIME OUT
1 = UNUSED
2 = UNUSED
3 = I/O ERROR
4 = SELECTED
5 = OUT OF PAPER
6 = ACKNOWLEDGE
7 = NOT BUSY
-----------------------------------------------------------
INT 17 - INITIALIZE PRINTER
REG AH = 1
ON RETURN:
REG AH = STATUS (SEE ABOVE)
-----------------------------------------------------------
INT 17 - STATUS OF PRINTER
REG AH = 2
ON RETURN:
REG AH = STATUS (SEE ABOVE)
-----------------------------------------------------------
INT 18 - TRANSFER TO ROM BASIC
CAUSES TRANSFER TO ROM-BASED BASIC (IBM-PC)
OFTEN REBOOTS A COMPATABLE
-----------------------------------------------------------
INT 19 - DISK BOOT
CAUSES REBOOT OF DISK SYSTEM (NO MEMORY TEST PERFORMED).
-----------------------------------------------------------
INT 1A - GET TIME OF DAY
REG AH = 0
ON RETURN:
REG CX = high (most signif.) portion of clock count
DX = low (least signif.) portion of clock count
AL = 0 if clock was read or written (via AH=0,1)
withing the current 24-hour period
Otherwise, AL > 0
-----------------------------------------------------------
INT 1A - SET TIME OF DAY
REG AH = 1
CX = high (most signif.) portion of clock count
DX = low (least signif.) portion of clock count
-----------------------------------------------------------
INT 1A - READ REAL TIME CLOCK (PC/AT ONLY)
REG AH = 2
ON RETURN:
REG CH = HOURS
CL = MINUTES
DH = SECONDS
-----------------------------------------------------------
INT 1A - SET REAL TIME CLOCK (PC/AT ONLY)
REG AH = 3
CH = HOURS
CL = MINUTES
DH = SECONDS
DL = 1, IF DAYLIGHT SAVINGS; 0 IF STANDARD TIME
-----------------------------------------------------------
INT 1A - READ DATE FROM REAL TIME CLOCK (PC/AT ONLY)
REG AH = 4
ON RETURN:
REG DL = DAY
DH = MONTH
CL = YEAR
CH = CENTURY (19 OR 20)
-----------------------------------------------------------
INT 1A - SET DATE IN REAL TIME CLOCK (PC/AT ONLY)
REG AH = 5
DL = DAY
DH = MONTH
CL = YEAR
CH = CENTURY (19 OR 20)
-----------------------------------------------------------
INT 1A - SET ALARM (PC/AT ONLY)
REG AH = 6
CH = HOURS
CL = MINUTES
DH = SECONDS
ON RETURN:
INT. 4A = ADDRESS OF ALARM ROUTINE
-----------------------------------------------------------
INT 1A - RESET ALARM (PC/AT ONLY)
REG AH = 7
-----------------------------------------------------------
INT 1B - CTRL-BREAK KEY (on IBM at least)
This interrupt is called when the keyboard scanner of
the IBM machines detects CTRL and BREAK pressed at the same
time. It normally points to a simple IRET so that it does
nothing, but many programs change it to return a CTRL-C scan
code and thus invoke INT 23.
-----------------------------------------------------------
INT 1C - CLOCK TICK (on IBM at least)
This interrupt is called (in the IBM) at the end of
each time-update operation by the real-time clock routines. It
normally points to an IRET unless PRINT.COM has been installed.
-----------------------------------------------------------
INT 20 - PROGRAM TERMINATION (MSDOS generic)
NOTE: NO PARAMETERS - RETURNS TO DOS
-----------------------------------------------------------
INT 21 - PROGRAM TERMINATION (MSDOS generic)
Reg AH = 0
Same action as INT 20; returns to DOS.
-----------------------------------------------------------
INT 21 - KEYBOARD INPUT (MSDOS generic)
REG AH = 1
ON RETURN:
REG AL = CHARACTER READ
-----------------------------------------------------------
INT 21 - DISPLAY OUTPUT (MSDOS generic)
REG AH = 2
REG DL = CHAR
-----------------------------------------------------------
INT 21 - AUX Input (MSDOS generic)
Reg AH = 3
Return with char in reg AL.
NOTE - Waits for char, gives no error
indications.
-----------------------------------------------------------
INT 21 - AUX Output (MSDOS generic)
Reg AH = 4
Reg DL = char to send to AUX
No error indications!!
-----------------------------------------------------------
INT 21 - PRINTER OUTPUT (MSDOS generic)
REG AH = 5
REG DL = CHAR
-----------------------------------------------------------
INT 21 - DIRECT CONSOLE I/O - CHARACTER OUTPUT (MSDOS generic)
REG AH = 06H
REG DL = CHAR
-----------------------------------------------------------
INT 21 - DIRECT CONSOLE I/O - CHARACTER INPUT (MSDOS generic)
REG AH = 06H
REG DL = 0FFH
ON RETURN:
FLAG ZF = SET = NO CHARACTER
CLEAR = CHARACTER RECIEVED
REG AL = CHARACTER
Character is echoed to STDOUT if received.
-----------------------------------------------------------
INT 21 - Direct STDIN Input, no echo (MSDOS generic)
Reg AH = 7
Same as Function 6 for input but char not echoed.
-----------------------------------------------------------
INT 21 - KEYBOARD INPUT - NO ECHO (MSDOS generic)
REG AH = 8
ON RETURN:
REG AL = CHAR
-----------------------------------------------------------
INT 21 - PRINT STRING (MSDOS generic)
REG AH = 9
DS:DX = ADDRESS OF STRING
NOTE: STRING TERMINATED WITH "$"
-----------------------------------------------------------
INT 21 - BUFFERED KEYBOARD INPUT (MSDOS generic)
REG AH = 0AH
DS:DX = ADDRESS OF BUFFER
FIRST BYTE OF BUFFER MUST HAVE MAX LENGTH
ON RETURN SECOND BYTE HAS ACTUAL LENGTH
-----------------------------------------------------------
INT 21 - CHECK STANDARD INPUT STATUS (MSDOS generic)
REG AH = 0BH
ON RETURN:
REG AL = FFH IF CHAR TYPED
00H IF NOT TYPED
-----------------------------------------------------------
INT 21 - Clear Keyboard Buffer (MSDOS generic)
Reg AH = 0CH
Reg AL must be 1, 6, 7, 8, or 0aH.
Flushes all typeahead input, then executes
function specified by AL (by moving it to AH and repeating the
INT 21 call).
-----------------------------------------------------------
INT 21 - Disk Reset (MSDOS generic)
Reg AH = 0DH
Flushes all disk buffers.
-----------------------------------------------------------
INT 21 - SELECT DISK (MSDOS generic)
REG AH = 0EH
REG DL = new default drive number (0 = A, 1 = B, etc.)
ON RETURN:
AL = number of logical drives
-----------------------------------------------------------
INT 21 - OPEN DISK FILE (MSDOS generic)
REG AH = 0FH
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 00 = FILE FOUND
FF = FILE NOT FOUND
-----------------------------------------------------------
INT 21 - CLOSE DISK FILE (MSDOS generic)
REG AH = 10H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
-----------------------------------------------------------
INT 21 - Search First using FCB (MSDOS generic)
REG AH = 11H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
FCB may contain wildcard chars.
On Return:
REG AL = 00 = FILE FOUND
FF = FILE NOT FOUND
If file found, FCB is created at DTA address and
set up to OPEN or DELETE it.
-----------------------------------------------------------
INT 21 - Search Next using FCB (MSDOS generic)
REG AH = 12H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
Search First must have been called earlier.
On Return:
Same as Search First; if AL = 0ffH, no more
left.
-----------------------------------------------------------
INT 21 - Delete File via FCB (MSDOS generic)
REG AH = 13H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
On Return:
REG AL = 00 = FILE FOUND
FF = FILE NOT FOUND
-----------------------------------------------------------
INT 21 - SEQUENTIAL DISK FILE READ (MSDOS generic)
REG AH = 14H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 0 = SUCCESSFUL READ
1 = END OF FILE
2 = DATA TRANSFER AREA TOO SMALL
3 = PARTIAL RECORD, EOF
-----------------------------------------------------------
INT 21 - SEQUENTIAL DISK RECORD WRITE (MSDOS generic)
REG AH = 15H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 0 = SUCCESSFUL WRITE
1 = DISKETTE FULL
2 = DATA TRANSFER AREA TOO SMALL
-----------------------------------------------------------
INT 21 - CREATE A DISK FILE (MSDOS generic)
REG AH = 16H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 00 = SUCCESSFUL CREATION
FF = NO ROOM IN DIRECTORY
-----------------------------------------------------------
INT 21 - Rename File via FCB (MSDOS generic)
REG AH = 17H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
FCB contains new name starting at byte 17H.
On Return:
REG AL = 00 = FILE FOUND
FF = FILE NOT FOUND
-----------------------------------------------------------
INT 21 - Internal - does nothing (MSDOS generic)
REG AH = 18H
On Return:
AL = 0
-----------------------------------------------------------
INT 21 - Default Disk Number (MSDOS generic)
REG AH = 19H
On Return:
AL = current drive number (letter - 'A')
-----------------------------------------------------------
INT 21 - SET DISK TRANSFER AREA ADDRESS (MSDOS generic)
REG AH = 1AH
REG DS = SEGMENT ADDRESS OF BUFFER
REG DX = OFFSET ADDRESS OF BUFFER
ON RETURN:
Registers are unchanged, no error codes
-----------------------------------------------------------
INT 21 - Default Drive Disk Size (MSDOS generic)
REG AH = 1BH
On Return:
DS:BX points to FAT ID byte
DX = number of allocation units on disk
AL = number of sectors per AU
CX = number of bytes per sector
-----------------------------------------------------------
INT 21 - Specific Drive's Disk Size (MSDOS generic)
REG AH = 1CH
Reg DL = Drive Number to check
On Return:
DS:BX points to FAT ID byte
DX = number of allocation units on disk
AL = number of sectors per AU
CX = number of bytes per sector
-----------------------------------------------------------
INT 21 - Internal - does nothing (MSDOS generic)
REG AH = 1DH
On Return:
AL = 0
-----------------------------------------------------------
INT 21 - Internal - does nothing (MSDOS generic)
REG AH = 1EH
On Return:
AL = 0
-----------------------------------------------------------
INT 21 - Internal - unknown but like FN 32 (MSDOS generic)
REG AH = 1fH
Other registers unknown
On Return:
REG AL = 00 = No Error
FF = Error
Unknown vector returned in ES:BX.
-----------------------------------------------------------
INT 21 - Internal - does nothing (MSDOS generic)
REG AH = 20H
On Return:
AL = 0
-----------------------------------------------------------
INT 21 - RANDOM DISK RECORD READ (MSDOS generic)
REG AH = 21H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 0 = SUCCESSFUL READ
1 = END OF FILE
2 = DATA TRANSFER AREA TOO SMALL
3 = PARTIAL RECORD, EOF
-----------------------------------------------------------
INT 21 - Random Disk Write (MSDOS generic)
REG AH = 22H
Same setup as Random Read, but writes to disk
-----------------------------------------------------------
INT 21 - FILE SIZE (MSDOS generic)
REG AH = 23H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
ON RETURN:
REG AL = 00 = FILE FOUND
FF = FILE NOT FOUND
FCB SET TO NO. OF RECORDS
-----------------------------------------------------------
INT 21 - Set Random Record Field (MSDOS generic)
REG AH = 24H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
FCB must be OPEN already
On Return:
Random Record Field of FCB is set to be
same as Current Block and Current Record.
No error code is returned.
-----------------------------------------------------------
INT 21 - Set Interrupt Vector (MSDOS generic)
REG AH = 25H
Reg AL = INT number
DS:DX = new vector to be used for specified INT
On Return:
Registers are unchanged; no error codes
-----------------------------------------------------------
INT 21 - Create PSP (MSDOS generic)
REG AH = 26H
Reg DX = Segment number to set up PSP at
On Return:
Current PSP is copied to specified segment
-----------------------------------------------------------
INT 21 - RANDOM BLOCK READ (MSDOS generic)
REG AH = 27H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
REG CX = NO. OF RECORDS TO BE READ
ON RETURN:
REG AL = 0 = SUCCESSFUL READ
1 = END OF FILE
2 = DATA TRANSFER AREA TOO SMALL
3 = PARTIAL RECORD, EOF
-----------------------------------------------------------
INT 21 - RANDOM BLOCK WRITE (MSDOS generic)
REG AH = 28H
REG DS = SEGMENT ADDRESS OF FCB
REG DX = OFFSET ADDRESS OF FCB
REG CX = NO. OF RECORDS TO BE WRITTEN
ON RETURN:
REG AL = 0 = SUCCESSFUL WRITE
1 = DISKETTE FULL
2 = DATA TRANSFER AREA TOO SMALL
-----------------------------------------------------------
INT 21 - Parse Filename (MSDOS generic)
REG AH = 29H
DS:SI = POINTER TO STRING TO PARSE
ES:DI = POINTER TO MEMORY TO FILL WITH UNOPENED FCB
AL = BIT MASK TO CONTROL PARSING
BIT 0 = 0: PARSING STOPS IF FILE SEPERATOR FOUND
1: LEADING SEPERATOR IGNORED
1 = 0: DRIVE NUMNER IN FCB SET TO DEFAULT IF
STRING CONTAINS NO DRIVE NUMBER
1: DRIVE NUMBER IN FCB NOT CHANGED
2 = 0: FILENAME IN FCB SET TO BLANKS IF NO
FILENAME IN STRING
1: FILENAME IN FCB NOT CHANGED IF STRING
DOES NOT CONTAIN A FILENAME
3 = 0: EXTENSION IN FCB SET TO BLANKS IF NO
EXTENSION IN STRING
1: EXTENSION LEFT UNCHANGED
ON RETURN:
REG AL = 00: NO WILDCARDS IN NAME OR EXTENSION
01: WILDCARDS APPEARED IN NAME OR EXTENSION
DS:SI = POINTER TO FIRST BYTE AFTER PARSED STRING
ES:DI = UNOPENED FCB
-----------------------------------------------------------
INT 21 - GET CURRENT DATE (MSDOS generic)
REG AH = 2AH
ON RETURN:
REG DL = DAY
REG DH = MONTH
REG CX = YEAR
REG AL = DAY OF THE WEEK (0=SUNDAY, 1=MONDAY, ETC.)
-----------------------------------------------------------
INT 21 - Set CURRENT DATE (MSDOS generic)
REG AH = 2bH
REG DL = DAY
REG DH = MONTH
REG CX = YEAR
On Return:
AL = 0 if no error
AL = 0ffH if bad value sent to routine
-----------------------------------------------------------
INT 21 - GET CURRENT TIME (MSDOS generic)
REG AH = 2CH
ON RETURN:
REG CH = HOURS
REG CL = MINUTES
REG DH = SEC
REG DL = SEC/100
NOTE: TIME IS UPDATED EVERY 5/100 SECOND
-----------------------------------------------------------
INT 21 - Set CURRENT TIME (MSDOS generic)
REG AH = 2DH
REG CH = HOURS
REG CL = MINUTES
REG DH = SEC
REG DL = SEC/100
On Return:
AL = 0 if no error
AL = 0ffH if bad value sent to routine
-----------------------------------------------------------
INT 21 - Set Verify Flag (MSDOS generic)
REG AH = 2EH
DL = 0
AL = 1 if VERIFY on
AL = 0 if VERIFY off
-----------------------------------------------------------
INT 21 - Get Disk Transfer Area Address (MSDOS generic)
REG AH = 2FH
On Return:
Reg ES = SEGMENT address of DTA
Reg BX = OFFSET address of DTA
-----------------------------------------------------------
INT 21 - Get DOS Version (MSDOS generic)
REG AH = 30H
On Return:
Reg AL = Major Version number
Reg AH = Minor Version number
(i.e., DOS 2.10 returns AX = 0A02H)
Reg BH = OEM number
Reg BL:CX = 24-bit user number
-----------------------------------------------------------
INT 21 - TERMINATE BUT STAY RESIDENT (MSDOS generic)
REG AH = 31H
REG AL = EXIT CODE
REG DX = PROGRAM SIZE, IN PARAGRAPHS
ADDRESS IN HEX - XX XX 0 -
ON RETURN:
REG AX = RETURN CODE (RETRIEVEABLE BY FUNCTION 4DH)
-----------------------------------------------------------
INT 21 - Internal - unknown (MSDOS generic)
REG AH = 32H
Other registers unknown
On Return:
REG AL = 00 = No Error
FF = Error
Unknown vector returned in ES:BX.
-----------------------------------------------------------
INT 21 - Get or Set CONTROL-BREAK (MSDOS generic)
REG AH = 33H
Reg AL = 0 for Get or 1 for Put
Reg DL = 0 for OFF or 1 for ON
On Return:
DL = 0 if BREAK=OFF or 1 if BREAK=ON
AL = FFH IF ERROR
-----------------------------------------------------------
INT 21 - Internal - Return CritSectFlag Pointer (MSDOS generic)
REG AH = 34H
On Return:
ES:BX points to DOS "Critical Section Flag"
When byte pointed to is zero, DOS is supposed to be
safe to interrupt. NOT RELIABLE according to Chris
Dunford.
Examination of DOS 2.10 code in this area
indicates that the byte immediately FOLLOWING this
"Critical Section Flag" must be 00 to permit the
PRINT.COM interrupt to be called. This suggests that
checking the WORD pointed to, rather than the BYTE,
might increase reliability of the test greatly.
-----------------------------------------------------------
INT 21 - Get Interrupt Vector (MSDOS generic)
REG AH = 35H
Reg AL = INT number
On Return:
Reg ES = Segment address of INT vector
Reg BX = Offset address of INT vector
-----------------------------------------------------------
INT 21 - DISK SPACE (MSDOS generic)
REG AH = 36H
REG DL = DRIVE NUMBER (1-4)
ON RETURN:
REG AX = ? (SIDES)
REG BX = ? (BLOCKS FREE)
REG CX = ? (BLOCK SIZE)
REG DX = ? (TOTAL BLOCKS)
NOTE: MULT AX x CX x BX for FREE SPACE ON DISK
MULT AX x CX x DX for TOTAL DISK SPACE
-----------------------------------------------------------
INT 21 - Internal - multifunction (MSDOS generic)
AH=37h
AL=0 Read switch character (returns current character in DL)
1 Set switch character (specify new character in DL)
2 Read device availability (as set by function AL=3)
3 Set device availability, where:
DL=0 means /DEV/ must preceed device names
DL#0 means /DEV/ need not preceed device names

Returns:

DL = Switch character (if AL=0 or 1)
Device availability flag (if AL=2 or 3)

Error return:

AL=0FFh means the value in AL was not in the range 0-3.

Note:

Functions 2 & 3 appear not to be implemented for dos 3.x
-----------------------------------------------------------
INT 21 - Get Country-Dependent Information (MSDOS generic)
REG AH = 38H
Complex and differs between Dos 2.x and Dos 3.x
See Peter Norton "Programmer's Guide to the IBM PC", p. 305
-----------------------------------------------------------
INT 21 - CREATE A SUBDIRECTORY (MSDOS generic)
REG AH = 39H
Reg DS = SEGMENT address of ASCIIZ pathname
Reg DX = OFFSET address of ASCIIZ pathname
On Return:
Flag CF = 0 = SUCCESSFUL
1 = ERROR
Reg AX = Error Code if any
-----------------------------------------------------------
INT 21 - REMOVE A DIRECTORY ENTRY (MSDOS generic)
REG AH = 3AH
Reg DS = SEGMENT address of ASCIIZ pathname
Reg DX = OFFSET address of ASCIIZ pathname
On Return:
Flag CF = 0 = SUCCESSFUL
1 = ERROR
Reg AX = Error Code if any
-----------------------------------------------------------
INT 21 - CHANGE THE CURRENT DIRECTORY (MSDOS generic)
REG AH = 3BH
Reg DS = SEGMENT address of ASCIIZ
Reg DX = OFFSET address of ASCIIZ
On Return:
Flag CF = 0 = SUCCESSFUL
1 = ERROR
Reg AX = Error Code if any
-----------------------------------------------------------
INT 21 - CREATE A FILE WITH HANDLE (MSDOS generic)
REG AH = 3CH
REG CX = ATTRIBUTES FOR FILE
REG DS = SEGMENT ADDRESS OF ASCIIZ
REG DX = OFFSET ADDRESS OF ASCIIZ
ON RETURN:
FLAG CF = 0 = SUCCESSFUL CREATION
1 = ERROR
REG AX = FILE HANDLE
OR ERROR CODE
-----------------------------------------------------------
INT 21 - OPEN DISK FILE WITH HANDLE (MSDOS generic)
REG AH = 3DH
REG AL = ACCESS CODE
0 = Read Only
1 = Write Only
2 = Read/Write
REG DS = SEGMENT ADDRESS OF ASCIIZ
REG DX = OFFSET ADDRESS OF ASCIIZ
ON RETURN:
FLAG CF = 0 = SUCCESSFUL OPENING
1 = ERROR
REG AX = FILE HANDLE
OR ERROR CODE
-----------------------------------------------------------
INT 21 - CLOSE A FILE WITH HANDLE (MSDOS generic)
REG AH = 3EH
REG BX = FILE HANDLE
ON RETURN:
FLAG CF = 0 = SUCCESSFUL CLOSE
1 = ERROR
REG AX = ERROR CODE IF ERROR
-----------------------------------------------------------
INT 21 - READ FROM FILE WITH HANDLE (MSDOS generic)
REG AH = 3FH
REG BX = FILE HANDLE
REG CX = NO. OF BYTES TO READ
REG DS = SEGMENT ADDRESS OF BUFFER
REG DX = OFFSET ADDRESS OF BUFFER
ON RETURN:
FLAG CF = 0 = SUCCESSFUL READ
1 = ERROR
REG AX = 0 = END OF FILE
OR NO. OF BYTES READ
OR ERROR CODE
-----------------------------------------------------------
INT 21 - WRITE TO FILE WITH HANDLE (MSDOS generic)

REG AH = 40H
REG BX = FILE HANDLE
REG CX = NO. OF BYTES TO Write
REG DS = SEGMENT ADDRESS OF BUFFER
REG DX = OFFSET ADDRESS OF BUFFER
ON RETURN:
FLAG CF = 0 = SUCCESSFUL WRITE
1 = ERROR
REG AX = NO. OF BYTES Writtten
OR ERROR CODE
-----------------------------------------------------------
INT 21 - DELETE A FILE (MSDOS generic)
REG AH = 41H
REG DS = SEGMENT OF ASCIIZ TO DELETE
REG DX = OFFSET OF ASCIIZ TO DELETE
On Return:
Flag CF = 0 = SUCCESSFUL
1 = ERROR
Reg AX = Error Code if any
-----------------------------------------------------------
INT 21 - MOVE FILE READ/WRITE POINTER (MSDOS generic)
REG AH = 42H
REG AL = METHOD VALUE
0 = offset from beginning of file
1 = offset from present location
2 = offset from end of file
REG BX = FILE HANDLE
REG CX = BYTES OFFSET HIGH
REG DX = BYTES OFFSET LOW
ON RETURN:
FLAG CF = 0 = SUCCESSFUL MOVE
1 = ERROR
REG DX = NEW LOC. OF R/W POINTER HIGH
REG AX = NEW LOC. OF R/W POINTER LOW
ERROR CODE IF ERROR
-----------------------------------------------------------
INT 21 - GET/PUT FILE ATTRIBUTES (MSDOS generic)
REG AH = 43H
REG AL = 0 = GET FILE ATTRIBUTES
1 = PUT FILE ATTRIBUTES
REG CX = FILE ATTRIBUTES ON PUT
BIT 0 = READ ONLY
1 = HIDDEN FILE
2 = SYSTEM FILE
3 = VOLUME LABEL
4 = SUBDIRECTORY
5 = WRITTEN SINCE BACKUP
REG DX = POINTER TO FILE ASCIIZ FILE NAME
ON RETURN:
FLAG CF = SET IF ERROR
REG AX = Error Code 1, 3, or 5
REG CX = FILE ATTRIBUTES ON GET
-----------------------------------------------------------
INT 21 - IOCTL (MSDOS generic)
REG AH = 44H
Complex. See T2K manual pages 121-124
-----------------------------------------------------------
INT 21 - Create Duplicate Handle (MSDOS generic)
REG AH = 45H
Reg BX = file handle to duplicate
On Return:
If carry set, AX = Error Code
If carry clear, AX = duplicate handle
-----------------------------------------------------------
INT 21 - Force Duplicate Handle (MSDOS generic)
REG AH = 46H
Reg BX = Existing file handle
Reg CX = new file handle
On Return:
If CF set, AX = Error Code
If clear, both handles now refer to
Existing file
-----------------------------------------------------------
INT 21 - Get Current Directory (MSDOS generic)
REG AH = 47H
Reg DL = drive (0=default, 1=A, etc.)
DS:SI points to 64-byte buffer area
On Return:
If CY set, AX = Error Code
Else DS:DI points to ASCIIZ name of
current directory (not including drive ID)
-----------------------------------------------------------
INT 21 - Allocate Memory (MSDOS generic)
REG AH = 48H
Reg BX = number of 16-byte paragraphs desired
On Return:
If CF set:
BX = Maximum number available
If CF clear:
AX = Segment address of allocated space
-----------------------------------------------------------
INT 21 - Free Memory (MSDOS generic)
REG AH = 49H
Reg ES = Segment address of area to be freed
On Return:
If CF set, AX = Error Code
-----------------------------------------------------------
INT 21 - Adjust Block Size (MSDOS generic)
REG AH = 4AH
Reg ES = Segment address of block to change
Reg BX = New size in paragraphs
On Return:
If CF set, BX = max number available
Else operation was successful
-----------------------------------------------------------
INT 21 - Load or Execute (MSDOS generic)
REG AH = 4BH
Complex. See T2K manual pages 131-133
-----------------------------------------------------------
INT 21 - Quit With Exit Code (MSDOS generic)
REG AH = 4CH
Reg AL = exit code
Does not return. Control passes to DOS
-----------------------------------------------------------
INT 21 - GET EXIT CODE OF SUBPROGRAM (MSDOS generic)
REG AH = 4DH
On Return:
AL = exit code of subprogram (FNs 31H or 4cH)
AH = circumstance which caused termination
0 = Terminate/abort
1 = Control-C
2 = Hard error
3 = Terminate and stay resident
-----------------------------------------------------------
INT 21 - Find First ASCIIZ (MSDOS generic)
REG AH = 4EH
CX = SEARCH ATTRIBUTES
DS:DX = POINTER TO ASCIIZ FILENAME (WITH ATTRIBUTES)
ON RETURN:
IF CF SET, REG AX = ERROR CODE
ELSE, DATA BLOCK WRITTEN AT CURRENT DTA
-----------------------------------------------------------
INT 21 - Find Next ASCIIZ (MSDOS generic)
REG AH = 4FH
ON RETURN:
IF CF SET, AX = ERROR CODE
ELSE, DATA BLOCK WRITTEN AT CURRENT DTA
-----------------------------------------------------------
INT 21 - Internal - Set PSP Segment (MSDOS generic)
REG AH = 50H
Reg BX = Segment address of new PSP
On Return:
No return codes
-----------------------------------------------------------
INT 21 - Internal - Get PSP Segment (MSDOS generic)
REG AH = 51H
On Return:
BX = Current PSP Segment
-----------------------------------------------------------
INT 21 - Internal - Unknown (MSDOS generic)
REG AH = 52H
On Return:
Unknown pointer in ES:BX
-----------------------------------------------------------
INT 21 - Internal - Unknown (MSDOS generic)
REG AH = 53H
On Return:
Unknown
-----------------------------------------------------------
INT 21 - Get Verify Flag (MSDOS generic)
REG AH = 54H
On Return:
AL = 0 if flag OFF
AL = 1 if flag ON
-----------------------------------------------------------
INT 21 - Internal - Create PSP (MSDOS generic)
REG AH = 55H
Like FN 26H but creates "child" PSP rather
than copying existing one.
-----------------------------------------------------------
INT 21 - RENAME A FILE (MSDOS generic)
REG AH = 56H
REG DS = SEGMENT OF ASCIIZ OLD NAME
REG DX = OFFSET OF ASCIIZ OLD NAME
REG ES = SEGMENT OF ASCIIZ NEW NAME
REG DI = OFFSET OF ASCIIZ NEW NAME
ON RETURN:
FLAG CF = CLEARED = SUCCESSFULL RENAME
SET = ERROR &
REG AX = ERROR CODE
-----------------------------------------------------------
INT 21 - Get/Put Date/Time (MSDOS generic)
REG AH = 57H
AL = FUNCTION CODE
0 = GET DATE AND TIME
1 = SET DATE AND TIME
BX = FILE HANDLE
CX = TIME TO BE SET (IF AL = 1)
DX = DATE TO BE SET (IF AL = 1)
ON RETURN:
IF CF SET:
REG AX = ERROR CODE
IF CF NOT SET:
REG CX = TIME OF LAST WRITE (IF AL = 0)
DX = DATE OF LAST WRITE (IF AL = 0)
-----------------------------------------------------------
INT 21 - GET EXTENDED ERROR CODE (DOS 3.X generic)
REG AH = 59H
BX = VERSION CODE (0000 FOR DOS 3.0)
ON RETURN:
REG AX = EXTENDED ERROR CODE
BH = CLASS OF ERROR
BL = SUGGESTED ACTION CODE
CH = LOCUS (WHERE ERROR OCCURRED)
-----------------------------------------------------------
INT 21 - CREATE TMEPORARY FILE (DOS 3.x generic)
REG AH = 5AH
DS:DX = POINTER TO DIRECTORY PATH NAME
CX = FILE ATTRIBUTE
ON RETURN:
REG AX = ERROR CODE (IF CF SET)
DS:DX = PATH NAME (IF CF NOT SET)

NOTE: THE FILE CREATED IS NOT TRULY "TEMPORARY". IT MUST BE
REMOVED BY THE USER.
-----------------------------------------------------------
INT 21 - CREATE NEW FILE (DOS 3.x generic)
REG AH = 5BH
DS:DX = POINTER TO DIRECTORY PATH NAME
CX = FILE ATTRIBUTE
ON RETURN:
REG AX = ERROR CODE (IF CF SET)
DS:DX = PATH NAME (IF CF NOT SET)

NOTE: UNLIKE FUNCTION 3CH, FUNCTION 5BH WILL FAIL IF THE
ALREADY EXISTS.
-----------------------------------------------------------
INT 21 - LOCK/UNLOCK FILE ACCESS (DOS 3.x generic)
REG AH = 5CH
AL = 0 IF LOCK
1 IF UNLOCK
BX = FILE HANDLE
CX:DX = OFFSET TO LOCK
SI:DI = AMOUNT TO LOCK
ON RETURN:
REG AX = ERROR CODE (IF CF SET)
-----------------------------------------------------------
INT 21 - GET PSP ADDRESS (DOS 3.x generic)
REG AH = 62H
ON RETURN:
REG BX = SEGMENT ADDRESS OF PSP
-----------------------------------------------------------
INT 22 - TERMINATE ADDRESS (MSDOS generic)
FAR (DWORD) address of routine to be executed
when program "returns to DOS". Should NOT ever be called.
-----------------------------------------------------------
INT 23 - CONTROL "C" EXIT ADDRESS (MSDOS generic)
Automatically called from keyboard scanner when
CTRL-C or CTRL-BREAK is detected. Normally aborts program
and returns to DOS, but may be changed.
-----------------------------------------------------------
INT 24 - FATAL ERROR ABORT ADDRESS (MSDOS generic)
Automatically called upon detection of unrecoverable
disk error. Normally prints "Abort, Retry, or Ignore?" message
and takes the reply, but may be changed if desired.
-----------------------------------------------------------
INT 25 - ABSOLUTE DISK READ (MSDOS generic)
Similar to INT 13 function, but this one is generic
for all MSDOS rather than being machine specific.
ENTRY CONDITIONS:
AL = Drive number (0=A, 1=B, etc)
DS:BX = Disk Transfer Address (buffer)
CX = Number of sectors to read
DX = First relative sector to read. 0 reads boot
sector, 1 reads FAT, etc.
EXIT:
If carry set, AL=error code.
If carry not set, operation successful.
NOTE: This routine PUSHes the flags onto the stack when it
is called, and does NOT remove them at exit. Be sure
to POP the stack immediately after returning, to
prevent overflow. All of the registers, not just
those listed, are changed by the routine.
-----------------------------------------------------------
INT 26 - ABSOLUTE DISK WRITE (MSDOS generic)
All parameters and conditions are the same as for
INT 25, except that this routine WRITES to the disk
rather than READing from it. Note that it does NOT
update the FAT, directories, etc., and can easily
destroy a disk unless carefully used.
-----------------------------------------------------------
INT 27 - TERMINATE BUT STAY RESIDENT (MSDOS generic)
REG CS = CURRENT PROGRAM SEGMENT
REG DX = LAST PROGRAM BYTE + 1
NOTE: RETURN IS TO DOS
-----------------------------------------------------------
INT 28 - Internal routine for MSDOS
This interrupt is called from inside the "get input
from keyboard" routine in DOS, if and only if it is safe to use
INT 21 to access the disk at that time. It is used primarily by
the PRINT.COM routines, but any number of other routines could
be chained to it by saving the original vector, and calling it
with a FAR call (or just JMPing to it) at the end of the new
routine.
Until PRINT.COM installs its own routine, this
interrupt vector simply points to an IRET opcode.
-----------------------------------------------------------
INT 29 - Internal routine for MSDOS
This interrupt is called from the DOS output routines
if output is going to a device rather than a file, and the
device driver's attribute word has bit 3 (04H) set to "1".
Nothing more is known about it at this time.
-----------------------------------------------------------
INT 2E - UNKNOWN
-----------------------------------------------------------
INT 30 - UNKNOWN
-----------------------------------------------------------
INT 31 - UNKNOWN
-----------------------------------------------------------
INT F8 - INTERVAL TIMER (10 MSEC)
PARAMETERS UNKNOWN
-----------------------------------------------------------
INT FA - USART READY (RS-232C)
PARAMETERS UNKNOWN
-----------------------------------------------------------
INT FB - USART Rx READY (keyboard)
PARAMETERS UNKNOWN
-----------------------------------------------------------

------------------------------------------------------------------
Ross M. Greenberg @ Time Inc, New York



 December 13, 2017  Add comments

Leave a Reply