Invoking an interrupt can be done using the INTx86assembly language instruction. For example, to print a character to the screen using BIOS interrupt 0x10, the following x86 assembly language instructions would be executed:
mov ah, 0x0e
mov al, '!'
int 0x10
Interrupt table
A list of common BIOS interrupts can be found below. Note that some BIOSes (particularly old ones) will not support all of these interrupts.
Interrupt vector
Description
00h
CPU: Executed after an attempt to divide by zero or when the quotient does not fit in the destination
01h
CPU: Executed after every instruction while the trace flag is set
Routines for communicating via the serial port. Used by software programs.
AH
Description
00h
Serial Port Initialization
01h
Transmit Character
02h
Receive Character
03h
Status
15h
Miscellaneous (System services support routines)
AH
AL
AX
Description
00h
Turn on cassette drive motor
01h
Turn off cassette drive motor
02h
Read data blocks from cassette
03h
Write data blocks to cassette
4Fh
Keyboard Intercept
83h
Event Wait
84h
Read Joystick
85h
Sysreq Key Callout
86h
Wait
87h
Move Block
88h
Get Extended Memory Size
C0h
Get System Parameters
C1h
Get Extended BIOS Data Area Segment
C2h
Pointing Device Functions
E8h
01h
E801h
Get Extended Memory Size (Newer function, since 1994). Gives results for memory size above 64 Mb.
E8h
20h
E820h
Query System Address Map. The information returned from e820 supersedes what is returned from the older AX=E801h and AH=88h interfaces.
16h
Implemented by the BIOS or operating system. Provides routines to be called by software programs which communicate with the keyboard.
AH
Description
00h
Read Character
01h
Read Input Status
02h
Read Keyboard Shift Status
10h
Read Character Extended
11h
Read Input Status Extended
12h
Read Keyboard Shift Status Extended
17h
Print Services - used by software programs to communicate with the printer
AH
Description
00h
Print Character to Printer
01h
Initialize Printer
02h
Check Printer Status
18h
Execute Cassette BASIC: True IBM computers contain BASIC in the ROM to be interpreted and executed by this routine in the event of a boot failure (called by the BIOS)
19h
After POST this interrupt is used by BIOS to load the operating system.
1Ah
Real Time Clock Services - called by software programs to communicate with the RTC
Installed by the operating system; automatically called by INT 9 when Ctrl-Break has been pressed
1Ch
Called automatically by INT 08; available for use by software programs when a routine needs to be executed regularly
1Dh
Not to be called; simply a pointer to the VPT (Video Parameter Table), which contains data on video modes
1Eh
Not to be called; simply a pointer to the DPT (Diskette Parameter Table), containing a variety of information concerning the diskette drives
1Fh
Not to be called; simply a pointer to the VGCT (Video Graphics Character Table), which contains the data for ASCII characters 80h to FFh
41h
Address pointer: FDPT = Fixed Disk Parameter Table (1st hard drive)
46h
Address pointer: FDPT = Fixed Disk Parameter Table (2nd hard drive)
4Ah
Called by RTC for alarm
70h
IRQ8: Called by RTC
74h
IRQ12: Called by mouse
75h
IRQ13: Called by math coprocessor
76h
IRQ14: Called by primary IDE controller
77h
IRQ15: Called by secondary IDE controller
DOS hooks
On MS-DOS systems IO.SYS hooks INT 13 for floppy disc change detection, tracking formatting calls, correcting DMA boundary errors, working around problems in IBM's ROM BIOS "01/10/84" with model code 0xFC before the first call. The interrupt vector 0x13 may point to a software hook rather than the BIOS routine, which some Bulgarian viruses are known to use against virus monitoring software. [1]
INT 18h: execute BASIC
INT 18h traditionally jumped to an implementation of BASIC stored in ROM. This call would typically be invoked if the BIOS was unable to identify any bootable volumes on startup. (At the time the original IBM PC was released in 1981, the BASIC in ROM was a key feature.) As time went on and BASIC was no longer shipped on all PCs, this interrupt would simply display an error message indicating that no bootable volume was found (famously, "No ROM BASIC", or more explanatory messages in later BIOS versions); in other BIOS versions it would prompt the user to insert a bootable volume and press a key, and then after the user did so it would loop back to the bootstrap loader to try booting again.