A COM file holds only code and data, so what it does is largely a matter of which
services it asks for. A program calls DOS or the BIOS with an INT
instruction: the interrupt number picks the system, a value in AH picks the
service, and many services take a subfunction in AL. These tables are what
the explorer’s Interrupt calls table
uses, so every name it shows is listed here.
The numbers come from Microsoft’s and IBM’s references and from Ralf Brown’s Interrupt List. Functions marked undocumented are ones DOS has but Microsoft’s reference did not describe at the time; they are all listed in Ralf Brown’s list, and many programs used them. The list is not a file format and has no end: vendors added their own services to many interrupts, and only the documented and widely used ones are here.
The interrupts
| Interrupt | Meaning |
|---|---|
00h | CPU: divide error |
01h | CPU: single step |
02h | CPU: non-maskable interrupt |
03h | CPU: breakpoint |
04h | CPU: overflow |
05h | BIOS print screen |
06h | CPU: invalid opcode |
07h | CPU: no coprocessor |
08h–0Fh | Hardware interrupts IRQ 0 to 7: timer, keyboard, cascade, COM2, COM1, LPT2 or sound card, diskette, LPT1 |
10h | BIOS video |
11h | BIOS equipment list |
12h | BIOS memory size |
13h | BIOS disk |
14h | BIOS serial port |
15h | BIOS system services |
16h | BIOS keyboard |
17h | BIOS printer |
18h | ROM BASIC, or no boot device |
19h | BIOS bootstrap: restart from the boot device |
1Ah | BIOS clock |
1Bh | Ctrl-Break handler, called by the BIOS |
1Ch | Timer tick handler, about 18.2 times a second |
1Dh–1Fh | Pointers to the video parameters, diskette parameters and graphics characters, not calls |
20h | DOS: terminate the program; CS must be the PSP’s segment |
21h | DOS services |
22h | DOS: terminate address (a pointer, not a call) |
23h | DOS: Ctrl-C handler |
24h | DOS: critical error handler |
25h | DOS absolute disk read |
26h | DOS absolute disk write |
27h | DOS: terminate and stay resident, keeping up to offset DX |
28h | DOS idle: called while waiting for a key |
29h | DOS fast console output |
2Ah | Network and critical sections |
2Eh | Run a shell command |
2Fh | Multiplex |
31h | DPMI services, for programs in protected mode |
33h | Mouse driver |
34h–3Eh | Floating-point emulation by Microsoft and Borland compilers |
3Fh | Overlay manager |
40h | BIOS diskette services, moved here on machines with a hard disk |
41h, 46h | Hard disk parameter tables (pointers, not calls) |
42h | The BIOS video services, moved here by the EGA |
43h | EGA character table (a pointer, not a call) |
4Ah | BIOS alarm handler |
5Ch | NetBIOS |
67h | EMS (expanded memory) |
70h–77h | Hardware interrupts IRQ 8 to 15: clock, IRQ 9 to 11, PS/2 mouse, coprocessor, first and second IDE channels |
INT 21h: DOS
The service is in AH. Most return with carry clear on success and carry
set and an error code in AX on failure, from the handle-based services of
DOS 2 onwards. The “from” column is the first version of DOS with the service.
| AH | Service | From |
|---|---|---|
00h | Terminate the program | 1.0 |
01h | Read a key, with echo | 1.0 |
02h | Write a character (DL) | 1.0 |
03h | Read a character from the auxiliary device | 1.0 |
04h | Write a character to the auxiliary device | 1.0 |
05h | Write a character to the printer (DL) | 1.0 |
06h | Direct console input or output: DL = FFh reads a key without waiting, otherwise writes DL | 1.0 |
07h | Read a key, no echo, no Ctrl-C check | 1.0 |
08h | Read a key, no echo | 1.0 |
09h | Write a $-terminated string at DS:DX | 1.0 |
0Ah | Read a line into the buffer at DS:DX | 1.0 |
0Bh | Check for a key | 1.0 |
0Ch | Flush the keyboard buffer, then run the input service in AL | 1.0 |
0Dh | Reset the disks | 1.0 |
0Eh | Select the default drive (DL, 0 = A:) | 1.0 |
0Fh | Open a file (FCB at DS:DX) | 1.0 |
10h | Close a file (FCB) | 1.0 |
11h | Find the first file (FCB) | 1.0 |
12h | Find the next file (FCB) | 1.0 |
13h | Delete files (FCB) | 1.0 |
14h | Read the next record (FCB) | 1.0 |
15h | Write the next record (FCB) | 1.0 |
16h | Create a file (FCB) | 1.0 |
17h | Rename files (FCB) | 1.0 |
18h | Reserved (from CP/M); does nothing | 1.0 |
19h | Get the default drive | 1.0 |
1Ah | Set the disk transfer address to DS:DX | 1.0 |
1Bh | Get allocation information for the default drive | 1.0 |
1Ch | Get allocation information for the drive in DL (0 = default) | 1.0 |
1Dh, 1Eh | Reserved (from CP/M); do nothing | 1.0 |
1Fh | Get the default drive’s parameter block (undocumented) | 1.0 |
20h | Reserved (from CP/M); does nothing | 1.0 |
21h | Read a record (FCB) | 1.0 |
22h | Write a record (FCB) | 1.0 |
23h | Get a file’s size in records (FCB) | 1.0 |
24h | Set the random record field (FCB) | 1.0 |
25h | Set the interrupt vector AL to DS:DX | 1.0 |
26h | Create a PSP at segment DX | 1.0 |
27h | Read records (FCB) | 1.0 |
28h | Write records (FCB) | 1.0 |
29h | Parse the name at DS:SI into the FCB at ES:DI; AL holds the parsing options | 1.0 |
2Ah | Get the date | 1.0 |
2Bh | Set the date (CX year, DH month, DL day) | 1.0 |
2Ch | Get the time | 1.0 |
2Dh | Set the time (CH, CL, DH, DL) | 1.0 |
2Eh | Set the verify flag (AL = 0 off, 1 on) | 1.0 |
2Fh | Get the disk transfer address | 2.0 |
30h | Get the DOS version | 2.0 |
31h | Terminate and stay resident, keeping DX paragraphs, return code AL | 2.0 |
32h | Get a drive’s parameter block (undocumented) | 2.0 |
33h | Get or set Ctrl-Break checking: subfunctions | 2.0 |
34h | Get the address of the InDOS flag | 2.0 |
35h | Get the interrupt vector AL | 2.0 |
36h | Get the free disk space on the drive in DL (0 = default) | 2.0 |
37h | Get or set the switch character (undocumented): subfunctions | 2.0 |
38h | Get or set the country information: AL = 0 the current country, FFh the country in BX, otherwise the country code; DX = FFFFh sets it | 2.0 |
39h | Create a directory (name at DS:DX) | 2.0 |
3Ah | Remove a directory | 2.0 |
3Bh | Change the current directory | 2.0 |
3Ch | Create a file (name at DS:DX, attributes CX) | 2.0 |
3Dh | Open a file (name at DS:DX, access mode AL) | 2.0 |
3Eh | Close the handle BX | 2.0 |
3Fh | Read CX bytes from handle BX into DS:DX | 2.0 |
40h | Write CX bytes from DS:DX to handle BX | 2.0 |
41h | Delete a file (name at DS:DX) | 2.0 |
42h | Move the file pointer of handle BX by CX:DX, from the origin in AL | 2.0 |
43h | Get or set file attributes: subfunctions | 2.0 |
44h | Device I/O control (IOCTL): subfunctions | 2.0 |
45h | Duplicate the handle BX | 2.0 |
46h | Force handle CX to refer to the same file as BX | 2.0 |
47h | Get the current directory of the drive in DL (0 = default) into DS:SI | 2.0 |
48h | Allocate BX paragraphs of memory | 2.0 |
49h | Free the memory block at segment ES | 2.0 |
4Ah | Resize the memory block at ES to BX paragraphs | 2.0 |
4Bh | Load or run a program: subfunctions | 2.0 |
4Ch | Terminate with the return code in AL | 2.0 |
4Dh | Get the return code of a child program | 2.0 |
4Eh | Find the first file (pattern at DS:DX, attributes CX) | 2.0 |
4Fh | Find the next file | 2.0 |
50h | Set the current PSP (undocumented) | 2.0 |
51h | Get the current PSP | 2.0 |
52h | Get the list of lists (undocumented) | 2.0 |
53h | Translate a BIOS parameter block (undocumented) | 2.0 |
54h | Get the verify flag | 2.0 |
55h | Create a child PSP (undocumented) | 2.0 |
56h | Rename a file (old name at DS:DX, new at ES:DI) | 2.0 |
57h | Get or set a file’s date and time: subfunctions | 2.0 |
58h | Get or set the memory allocation strategy: subfunctions | 2.11 |
59h | Get extended error information | 3.0 |
5Ah | Create a temporary file in the directory at DS:DX | 3.0 |
5Bh | Create a new file, failing if it exists | 3.0 |
5Ch | Lock or unlock part of a file: subfunctions | 3.0 |
5Dh | Network and SHARE functions (undocumented): subfunctions | 3.0 |
5Eh | Network machine name and printer setup: subfunctions | 3.0 |
5Fh | Network device redirection: subfunctions | 3.0 |
60h | Get the fully qualified file name (undocumented) | 3.0 |
61h | Reserved | 3.0 |
62h | Get the current PSP | 3.0 |
63h | Get the lead byte table for double-byte text | 3.0 |
64h | Set the device driver lookahead flag (undocumented) | 3.2 |
65h | Get extended country information: subfunctions | 3.3 |
66h | Get or set the code page: subfunctions | 3.3 |
67h | Set the number of handles to BX | 3.3 |
68h | Commit the file of handle BX | 3.3 |
69h | Get or set the disk serial number: subfunctions | 4.0 |
6Ah | Commit the file of handle BX | 4.0 |
6Bh | Reserved | 4.0 |
6Ch | Extended open or create: parameters | 4.0 |
71h | Long file name functions: subfunctions | Windows 95 |
73h | FAT32 functions: subfunctions | Windows 95 OSR2 |
AH = 33h, Ctrl-Break and boot drive
| AL | Function |
|---|---|
00h | Get Ctrl-Break checking |
01h | Set Ctrl-Break checking (DL) |
02h | Get and set Ctrl-Break checking |
05h | Get the boot drive |
06h | Get the true DOS version, unaffected by SETVER |
AH = 37h, switch character (undocumented)
| AL | Function |
|---|---|
00h | Get the switch character |
01h | Set the switch character |
02h | Get device availability |
03h | Set device availability |
AH = 3Dh, the access mode in AL
| Bits | Value | Meaning |
|---|---|---|
| 0–2 | 0 | Read only |
| 1 | Write only | |
| 2 | Read and write | |
| 3 | Reserved, 0 | |
| 4–6 | 0 | Compatibility mode |
| 1 | Deny others read and write | |
| 2 | Deny others write | |
| 3 | Deny others read | |
| 4 | Deny others nothing | |
| 7 | 0 | The handle is inherited by child programs |
| 1 | The handle is private |
AH = 42h, the origin in AL
| AL | Moves from |
|---|---|
00h | The start of the file |
01h | The current position |
02h | The end of the file |
AH = 43h, file attributes
| AL | Function |
|---|---|
00h | Get the attributes into CX |
01h | Set the attributes from CX |
In CX: bit 0 read only, bit 1 hidden, bit 2 system, bit 3 volume label,
bit 4 directory, bit 5 archive.
AH = 44h, device I/O control (IOCTL)
| AL | Function |
|---|---|
00h | Get device information (BX handle) |
01h | Set device information |
02h | Read from a character device’s control channel |
03h | Write to a character device’s control channel |
04h | Read from a block device’s control channel (BL drive) |
05h | Write to a block device’s control channel |
06h | Get input status |
07h | Get output status |
08h | Check whether a block device is removable |
09h | Check whether a block device is remote |
0Ah | Check whether a handle is remote |
0Bh | Set the sharing retry count |
0Ch | Generic character device request (BX handle, CH category, CL minor code) |
0Dh | Generic block device request (BL drive, CH category, CL minor code) |
0Eh | Get the logical drive map |
0Fh | Set the logical drive map |
10h | Query generic IOCTL capability for a handle |
11h | Query generic IOCTL capability for a drive |
The block device requests (0Dh) use category 08h for a disk
and 48h for a FAT32 disk. Their minor codes in CL:
| CL | Function |
|---|---|
40h | Set the device parameters |
41h | Write a track |
42h | Format and verify a track |
46h | Set the volume serial number |
47h | Set the access flag |
4Ah | Lock a logical volume |
4Bh | Lock a physical volume |
60h | Get the device parameters |
61h | Read a track |
62h | Verify a track |
66h | Get the volume serial number |
67h | Get the access flag |
68h | Sense the media type |
6Ah | Unlock a logical volume |
6Bh | Unlock a physical volume |
6Ch | Get the lock flag |
6Dh | Enumerate open files |
6Eh | Find the swap file |
70h | Get the current lock state |
71h | Get the first cluster |
The character device requests (0Ch), minor codes in CL:
| CL | Function |
|---|---|
45h | Set the iteration count |
4Ah | Select the code page |
4Ch | Start code page preparation |
4Dh | End code page preparation |
5Fh | Set the display mode |
65h | Get the iteration count |
6Ah | Query the selected code page |
6Bh | Query the code page list |
7Fh | Get the display mode |
AH = 4Bh, load or run a program
The name is at DS:DX and the parameter block at ES:BX.
| AL | Function |
|---|---|
00h | Load and run the program |
01h | Load the program but do not run it (undocumented) |
03h | Load an overlay |
04h | Load and run in the background (multitasking MS-DOS 4) |
05h | Set the execution state (DOS 5) |
AH = 57h, date and time
| AL | Function |
|---|---|
00h | Get the last-written date and time |
01h | Set the last-written date and time |
02h | Get extended attributes |
03h | Set extended attributes |
04h | Get the extended attribute list |
05h | Set the last-access date and time (Windows 95) |
06h | Get the creation date and time (Windows 95) |
07h | Set the creation date and time (Windows 95) |
AH = 58h, allocation strategy
| AL | Function |
|---|---|
00h | Get the allocation strategy |
01h | Set the allocation strategy (BL: 0 first fit, 1 best fit, 2 last fit; bit 6 upper memory only, bit 7 upper memory first) |
02h | Get the upper memory link state |
03h | Set the upper memory link state |
AH = 5Ch, lock or unlock
Handle BX, offset CX:DX, length SI:DI.
| AL | Function |
|---|---|
00h | Lock part of a file |
01h | Unlock part of a file |
AH = 5Dh, network and SHARE (undocumented)
| AL | Function |
|---|---|
00h | Server function call |
01h | Commit all files of a computer |
02h | SHARE: close a file by name |
03h | SHARE: close all files of a computer |
04h | SHARE: close all files of a process |
05h | SHARE: get an open file list entry |
06h | Get the address of the swappable data area |
07h | Get the redirected printer mode |
08h | Set the redirected printer mode |
09h | Flush redirected printer output |
0Ah | Set extended error information |
0Bh | Get the swappable data areas |
AH = 5Eh, network machine name and printer
| AL | Function |
|---|---|
00h | Get the machine name |
01h | Set the machine name |
02h | Set the printer setup |
03h | Get the printer setup |
04h | Set the printer mode |
05h | Get the printer mode |
AH = 5Fh, network redirection
| AL | Function |
|---|---|
00h | Get the redirection mode |
01h | Set the redirection mode |
02h | Get a redirection list entry |
03h | Redirect a device |
04h | Cancel a redirection |
05h | Get an extended redirection entry |
07h | Enable a drive |
08h | Disable a drive |
AH = 65h, extended country information
| AL | Function |
|---|---|
01h | Get general country information |
02h | Get the upper-case table |
04h | Get the file name upper-case table |
05h | Get the file name terminator table |
06h | Get the collating table |
07h | Get the double-byte character table |
20h | Convert a character to upper case |
21h | Convert a string to upper case |
22h | Convert a zero-terminated string to upper case |
23h | Check a yes-or-no character |
AH = 66h, code page
| AL | Function |
|---|---|
01h | Get the global code page |
02h | Set the global code page |
AH = 69h, disk serial number
| AL | Function |
|---|---|
00h | Get the disk serial number |
01h | Set the disk serial number |
AH = 6Ch, extended open or create
AL is 0. The name is at DS:SI, BX is the
access mode, CX the attributes for a new file,
and DX what to do: the low four bits say what happens if the file exists
(0 fail, 1 open, 2 replace) and the next four if it is missing (0 fail, 1 create).
AH = 71h, long file names (Windows 95)
| AL | Function |
|---|---|
0Dh | Reset a drive |
39h | Create a directory |
3Ah | Remove a directory |
3Bh | Change the current directory |
41h | Delete files |
43h | Get or set file attributes |
47h | Get the current directory |
4Eh | Find the first file |
4Fh | Find the next file |
56h | Rename a file |
60h | Get a canonical file name |
6Ch | Create or open a file |
A0h | Get the volume information |
A1h | End a file search |
A6h | Get file information by handle |
A7h | Convert file time |
A8h | Generate a short name |
A9h | Server: create or open a file |
AAh | Create or end a substitution |
AH = 73h, FAT32 (Windows 95 OSR2)
| AL | Function |
|---|---|
02h | Get the extended drive parameter block |
03h | Get the extended free space |
04h | Set the drive parameter block |
05h | Extended absolute disk read or write |
INT 10h: video BIOS
| AH | Service |
|---|---|
00h | Set the video mode (AL; bit 7 keeps the screen) |
01h | Set the cursor shape (CH, CL: scan lines) |
02h | Set the cursor position (DH row, DL column, BH page) |
03h | Get the cursor position |
04h | Read the light pen position |
05h | Select the display page (AL) |
06h | Scroll a window up (AL lines; 0 clears it) |
07h | Scroll a window down |
08h | Read the character and attribute at the cursor |
09h | Write a character and attribute |
0Ah | Write a character |
0Bh | Set the palette or border |
0Ch | Write a pixel |
0Dh | Read a pixel |
0Eh | Write a character as a teletype (AL) |
0Fh | Get the video mode |
10h | Set the palette registers (EGA, VGA): subfunctions |
11h | The character generator (EGA, VGA): subfunctions |
12h | Alternate select (EGA, VGA): subfunctions in BL |
13h | Write a string |
14h | Load an LCD character font (PC Convertible) |
15h | Get the physical display parameters (PC Convertible) |
1Ah | Get (AL = 0) or set (1) the display combination (VGA) |
1Bh | Get the video state information (VGA) |
1Ch | Save or restore the video state (VGA): AL 0 size, 1 save, 2 restore |
4Fh | VESA BIOS Extensions: subfunctions |
Standard video modes (AH = 00h)
| Mode | Display |
|---|---|
00h | 40×25 text, grey |
01h | 40×25 text, colour |
02h | 80×25 text, grey |
03h | 80×25 text, colour |
04h | 320×200, 4 colours |
05h | 320×200, grey |
06h | 640×200, 2 colours |
07h | 80×25 text, monochrome |
0Dh | 320×200, 16 colours |
0Eh | 640×200, 16 colours |
0Fh | 640×350, monochrome |
10h | 640×350, 16 colours |
11h | 640×480, 2 colours |
12h | 640×480, 16 colours |
13h | 320×200, 256 colours |
AH = 10h, palette registers
| AL | Function |
|---|---|
00h | Set one palette register |
01h | Set the border colour |
02h | Set all the palette registers and the border |
03h | Toggle blinking or intensity |
07h | Read one palette register |
08h | Read the border colour |
09h | Read all the palette registers and the border |
10h | Set one DAC colour register |
12h | Set a block of DAC colour registers |
13h | Select the colour page |
15h | Read one DAC colour register |
17h | Read a block of DAC colour registers |
18h | Set the PEL mask |
19h | Read the PEL mask |
1Ah | Read the colour page state |
1Bh | Convert DAC registers to grey |
AH = 11h, the character generator
| AL | Function |
|---|---|
00h | Load a user font |
01h | Load the ROM 8×14 font |
02h | Load the ROM 8×8 font |
03h | Set the block specifier |
04h | Load the ROM 8×16 font |
10h | Load a user font and adjust the display |
11h | Load the ROM 8×14 font and adjust the display |
12h | Load the ROM 8×8 font and adjust the display |
14h | Load the ROM 8×16 font and adjust the display |
20h | Set the INT 1Fh graphics font pointer |
21h | Set the INT 43h graphics font (user) |
22h | Set the INT 43h graphics font (ROM 8×14) |
23h | Set the INT 43h graphics font (ROM 8×8) |
24h | Set the INT 43h graphics font (ROM 8×16) |
30h | Get font information |
AH = 12h, alternate select
| BL | Function |
|---|---|
10h | Get EGA information |
20h | Select the alternate print screen |
30h | Select the number of scan lines |
31h | Enable or disable palette loading on a mode set |
32h | Enable or disable video addressing |
33h | Enable or disable grey-scale summing |
34h | Enable or disable cursor emulation |
35h | Switch display |
36h | Enable or disable the screen |
AH = 4Fh, VESA BIOS Extensions
| AL | Function |
|---|---|
00h | Get controller information |
01h | Get mode information |
02h | Set a VESA mode |
03h | Get the current VESA mode |
04h | Save or restore state |
05h | Memory window control |
06h | Logical scan line length |
07h | Display start |
08h | DAC palette width |
09h | Load or read the palette |
0Ah | Get the protected-mode interface |
0Bh | Get or set the pixel clock |
10h | Power management |
15h | Read the display identification (EDID) |
INT 13h: disk BIOS
The drive is in DL: 00h up for diskettes, 80h
up for hard disks. The classic calls give the place in CH (cylinder, low
bits), CL (sector, with the cylinder’s top two bits in bits 6 and 7) and
DH (head), and the count in AL.
| AH | Service |
|---|---|
00h | Reset the disk system |
01h | Get the status of the last operation |
02h | Read sectors |
03h | Write sectors |
04h | Verify sectors |
05h | Format a track |
06h | Format a track and set bad sector flags (XT) |
07h | Format the drive from a track (XT) |
08h | Get the drive parameters |
09h | Initialise the drive characteristics |
0Ah | Read long sectors |
0Bh | Write long sectors |
0Ch | Seek |
0Dh | Alternate disk reset |
0Eh | Read the sector buffer (XT) |
0Fh | Write the sector buffer (XT) |
10h | Check that the drive is ready |
11h | Recalibrate the drive |
12h | Controller RAM diagnostic (XT) |
13h | Drive diagnostic (XT) |
14h | Controller diagnostic |
15h | Get the disk type |
16h | Detect a disk change |
17h | Set the disk type for format |
18h | Set the media type for format |
19h | Park the heads (PS/2) |
41h | Check for the extensions (EDD) |
42h | Extended read |
43h | Extended write |
44h | Extended verify |
45h | Lock or unlock a drive |
46h | Eject a drive |
47h | Extended seek |
48h | Get the extended drive parameters |
49h | Get the extended disk change status |
4Ah | Start disk emulation (El Torito) |
4Bh | End disk emulation (El Torito) |
4Ch | Start disk emulation and boot (El Torito) |
4Dh | Return the boot catalogue (El Torito) |
4Eh | Set the hardware configuration |
INT 14h: serial port
The port is in DX: 0 is COM1.
| AH | Service |
|---|---|
00h | Initialise a port |
01h | Write a character |
02h | Read a character |
03h | Get the port status |
04h | Extended initialise (PS/2) |
05h | Extended port control (PS/2) |
INT 15h: system services
| AH | Service |
|---|---|
00h–03h | Cassette motor on, motor off, read, write (original PC) |
0Fh | Format unit periodic interrupt (PS/2) |
21h | Read or write the POST error log (PS/2) |
24h | A20 gate control: AL 0 disable, 1 enable, 2 get the state, 3 get support |
4Fh | Keyboard intercept |
53h | Advanced Power Management: subfunctions |
80h | Device open |
81h | Device close |
82h | Process termination |
83h | Wait for an event: AL 0 set, 1 cancel |
84h | Read the joystick |
85h | SysRq key pressed |
86h | Wait CX:DX microseconds |
87h | Move a block of extended memory |
88h | Get the extended memory size |
89h | Switch to protected mode |
90h | Device busy |
91h | Device ready |
C0h | Get the system configuration |
C1h | Get the extended BIOS data area segment |
C2h | PS/2 mouse: AL 0 enable or disable, 1 reset, 2 sample rate, 3 resolution, 4 device type, 5 initialise, 6 extended commands, 7 set the handler, 8 write, 9 read |
C3h | Watchdog timer (PS/2) |
C4h | Programmable option select (PS/2) |
D8h | EISA system services |
E8h | Extended memory map: AL 01h memory size over 64 MB, 20h the system memory map, 81h memory size (32-bit) |
AH = 53h, Advanced Power Management
| AL | Function |
|---|---|
00h | Installation check |
01h | Connect in real mode |
02h | Connect in 16-bit protected mode |
03h | Connect in 32-bit protected mode |
04h | Disconnect |
05h | CPU idle |
06h | CPU busy |
07h | Set the power state |
08h | Enable or disable power management |
09h | Restore the defaults |
0Ah | Get the power status |
0Bh | Get a power event |
0Ch | Get the power state |
0Dh | Enable or disable device power management |
0Eh | Driver version |
0Fh | Engage or disengage power management |
10h | Get the capabilities |
INT 16h: keyboard
| AH | Service |
|---|---|
00h | Read a key |
01h | Check for a key |
02h | Get the shift flags |
03h | Set the typematic rate |
04h | Turn the key click on or off |
05h | Store a key in the buffer |
09h | Get the keyboard capabilities |
0Ah | Get the keyboard identifier |
10h | Read a key (enhanced keyboard) |
11h | Check for a key (enhanced keyboard) |
12h | Get the shift flags (enhanced keyboard) |
20h | Read a key (122-key keyboard) |
21h | Check for a key (122-key keyboard) |
22h | Get the shift flags (122-key keyboard) |
INT 17h: printer
The port is in DX: 0 is LPT1.
| AH | Service |
|---|---|
00h | Write a character (AL) |
01h | Initialise the printer |
02h | Get the printer status |
INT 1Ah: clock
| AH | Service |
|---|---|
00h | Read the tick count |
01h | Set the tick count |
02h | Read the real-time clock’s time |
03h | Set the real-time clock’s time |
04h | Read the real-time clock’s date |
05h | Set the real-time clock’s date |
06h | Set the alarm |
07h | Reset the alarm |
08h | Set the power-on alarm (PC Convertible) |
09h | Read the alarm (PC Convertible) |
0Ah | Read the day counter (PS/2) |
0Bh | Set the day counter (PS/2) |
80h | Set up the sound multiplexer (PCjr) |
B1h | PCI BIOS: AL 01h installation check, 02h find a device, 03h find a device by class, 06h special cycle, 08h–0Ah read configuration byte, word, double word, 0Bh–0Dh write them, 0Eh get the interrupt routing, 0Fh set a PCI interrupt |
INT 2Fh: the multiplex interrupt
Resident programs and parts of DOS share this one interrupt. Each takes a number in
AH, and AL says what it should do; AL = 0 usually
asks whether it is installed.
| AH | Program | AL |
|---|---|---|
01h | ||
05h | Critical error messages | |
06h | ASSIGN | |
08h | DRIVER.SYS | |
10h | SHARE | |
11h | Network redirector | |
12h | DOS internal functions | |
13h | Set the disk handler | |
14h | NLSFUNC | |
15h | CD-ROM extensions (MSCDEX) | 00h installation check, 0Bh check a drive, 0Ch get the version, 0Dh get the drive letters, 10h send a device request |
16h | Windows and DPMI | 00h Windows installation check, 0Ah get the Windows version, 80h release the time slice, 81h, 82h begin and end a critical section, 83h get the current virtual machine, 84h get a device entry point, 85h switch virtual machines, 86h get the CPU mode, 87h get the DPMI entry point, 89h wait for a key |
17h | Windows clipboard | |
19h | SHELLB | |
1Ah | ANSI.SYS | |
40h | Windows and OS/2 virtual DOS | |
43h | XMS (extended memory) | 00h installation check, 10h get the driver’s entry point |
48h | DOSKEY | 00h installation check, 10h read a line of input |
4Ah | High memory area | 01h query the free high memory, 02h allocate it, 03h get its segment |
4Bh | DOS 5 task switcher | |
ADh | Code page utilities (DISPLAY.SYS) | |
AEh | Installable commands | |
B0h | GRAFTABL | |
B7h | APPEND |
INT 33h: mouse driver
Unlike DOS, the mouse driver takes its function in the whole of AX.
| AX | Function |
|---|---|
0000h | Reset the mouse driver |
0001h | Show the pointer |
0002h | Hide the pointer |
0003h | Get the position and buttons |
0004h | Move the pointer |
0005h | Get the button press information |
0006h | Get the button release information |
0007h | Set the horizontal range |
0008h | Set the vertical range |
0009h | Set the graphics cursor |
000Ah | Set the text cursor |
000Bh | Read the motion counters |
000Ch | Set an event handler |
000Dh | Turn on light-pen emulation |
000Eh | Turn off light-pen emulation |
000Fh | Set the mickey-to-pixel ratio |
0010h | Hide the pointer in an area |
0013h | Set the double-speed threshold |
0014h | Swap event handlers |
0015h | Get the state buffer size |
0016h | Save the state |
0017h | Restore the state |
0018h | Set an alternate event handler |
0019h | Get an alternate event handler |
001Ah | Set the sensitivity |
001Bh | Get the sensitivity |
001Ch | Set the interrupt rate |
001Dh | Set the CRT page |
001Eh | Get the CRT page |
001Fh | Disable the driver |
0020h | Enable the driver |
0021h | Reset the software |
0022h | Set the message language |
0023h | Get the message language |
0024h | Get the driver version and type |
0025h | Get the driver information |
0026h | Get the maximum coordinates |
0027h | Get the cursor masks and counters |
0028h | Set the video mode |
0029h | Enumerate the video modes |
002Ah | Get the cursor hot spot |
002Bh | Load the acceleration curves |
002Ch | Read the acceleration curves |
002Dh | Set or get the active acceleration curve |
002Fh | Hardware reset |
0030h | Set or get the ballpoint information |
0031h | Get the virtual coordinates |
0032h | Get the supported functions |
0033h | Get the switch settings |
0034h | Get the MOUSE.INI path |
INT 67h: expanded memory (EMS)
| AH | Function | AL |
|---|---|---|
40h | Get the manager status | |
41h | Get the page frame segment | |
42h | Get the number of pages | |
43h | Allocate pages | |
44h | Map a page | |
45h | Free pages | |
46h | Get the EMS version | |
47h | Save the page map | |
48h | Restore the page map | |
4Bh | Get the number of handles | |
4Ch | Get the pages owned by a handle | |
4Dh | Get the pages of all handles | |
4Eh | Get or set the page map | 0 get, 1 set, 2 get and set, 3 get the size |
4Fh | Get or set a partial page map | 0 get, 1 set, 2 get the size |
50h | Map several pages | 0 by page number, 1 by segment |
51h | Reallocate pages | |
52h | Handle attributes | 0 get, 1 set, 2 get the capability |
53h | Handle name | 0 get, 1 set |
54h | Handle directory | 0 get all names, 1 search by name, 2 get the total |
55h | Alter the page map and jump | 0 by page number, 1 by segment |
56h | Alter the page map and call | 0 by page number, 1 by segment, 2 get the stack size |
57h | Move or exchange a memory region | 0 move, 1 exchange |
58h | Get the mappable page array | 0 get the array, 1 get the number of entries |
59h | Hardware information | 0 configuration, 1 raw pages |
5Ah | Allocate standard or raw pages | 0 standard, 1 raw |
5Bh | Alternate map registers | 0 get, 1 set, 2 get the size, 3 allocate a set, 4 free a set, 5 allocate a DMA set, 6 enable DMA, 7 disable DMA, 8 free a DMA set |
5Ch | Prepare for a warm boot | |
5Dh | Operating system functions | 0 enable, 1 disable, 2 return the access key |
How the explorer works out the registers
The explorer follows the code from the entry point (see
Code and data) and keeps track
of the registers it can be sure of: a mov of a number or of another known
register, a register cleared with xor or sub, and an address
loaded with lea. Everything else makes the register unknown. It forgets
the registers at each jump target and after each call, and after an
INT it forgets AX, and the other registers too if the
service is one that returns values in them.
Where a register is not known, the service column says so and the parameter is
left out. Text at DS:DX is read only while DS is still the
program’s segment: a program that sets DS to anything else shows only the
offset.