7.3 System Interrupts

On most computers, Interrupt 05h and Interrupts 10h through 1Fh are reserved for use by ROM BIOS routines. Although these interrupts provide an interface to low-level services for the computer, a program that uses these services cannot be guaranteed to run correctly on all MS-DOS computers.

The following are typical low-level services:

Interrupt Service

05h Print screen (issued when SHIFT+PRINT SCREEN is pressed)
08h Timer tick
09h Keyboard
0Ah Slave interrupt controller
0Bh COM1
0Ch COM2
0Dh LPT2
0Eh Floppy disk
0Fh LPT1
10h Video services
11h Peripheral equipment list
12h Memory size
13h Disk services
14h Serial-port services
15h Miscellaneous system services
16h Keyboard services
17h Printer services
18h ROM Basic
19h Restart computer
1Ah Time of day
1Bh Break (issued when CTRL+BREAK is pressed)
1Ch Timer
1Dh Video parameters (address only)
1Eh Diskette parameters (address only)
1Fh Graphics fonts (address only)
70h Real-time clock
75h Numeric coprocessor
76h Hard disk

In some cases, MS-DOS may replace or extend ROM BIOS routines and other device-specific interrupt handlers for the following interrupts: MS-DOS replacement>MS-DOS extension>MS-DOS replacement>MS-DOS extension>

Interrupt MS-DOS handler action

00h Displays “divide overflow” message and terminates program
01h Returns immediately
02h* Switches stack
03h Returns immediately
04h Returns immediately
08h-0Eh* Switches stack
15h If CTRL+ALT+DEL is detected, prepares MS-DOS before restarting computer
19h Prepares MS-DOS before restarting computer
1Bh Places CTRL+C character value (03h) at top of keyboard input buffer
70h* Switches stack
72h-74h* Switches stack
76h-77h* Switches stack

Stack-switching interrupt handlers (marked * in the preceding list) are used in conjunction with routines that support hardware interrupts. A stack-switching handler sets up a new stack when a hardware interrupt occurs, allowing the corresponding interrupt routine to carry out operations without inadvertently overflowing the stack that was active when the interrupt occurred. The stack-switching handler restores the original stack when the interrupt routine returns. Stack-switching interrupt handlers are enabled only if the stacks command in the CONFIG.SYS file specifies eight or more stacks. stack command>