Phil Storrs PC Hardware book

The list of standard Interrupt assignments

The INTERRUPT VECTOR TABLE (I.V.T.) is stored in RAM memory in the first 1024 bytes of the computers addressable memory space. This table consists of 256 Vectors. Each Vector requires four bytes because addresses must be specified in Segment and Offset format. This is necessary because the 8088 processor used in the first PC's has only 16 bit registers and a 20 bit number is required to define a 20 bit address. The 20 bit number is made from two 16 bit numbers by adding the "Offset" to the "Segment" with a four bit offset.

The Vectors stored in the Interrupt Vector Table are used to locate the Interrupt Service Routines that service the interrupts available to the BIOS, to DOS and to Applications.

Int. Num. Address in I.V.T. Description
0 00-03 CPU divide by zero
1 04-07 Debug single step
2 08-0B Non Maskable Interrupt (NMI input on processor)
3 0C-0F Debug breakpoints
4 10-13 Arithmetic overflow
5 14-17 BIOS provided Print Screen routine
6 18-1B Reserved
7 1C-1F Reserved
8 20-23 IRQ0, Time of day hardware services
9 24-27 IRQ1, Keyboard Interface
A 28-2B IRQ2, ISA Bus cascade services for second 8259
B 2C-2F IRQ3, Com 2 hardware
C 30-33 IRQ4, Com1 hardware
D 34-37 IRQ5, LPT2, Parallel port hardware (Hard Disk on XT)
E 38-3B IRQ6, Floppy Disk adaptor
F 3C-3F IRQ7, LPT1, Parallel port hardware
10 40-43 Video services, see note 1
11 44-47 Equipment check
12 48-4B Memory size determination
13 4C-4F Floppy I/O routines
14 50-53 Serial port I/O routines
15 54-57 PC used for Cassette tape services
16 58-5B Keyboard I/O routines
17 5C-5F Printer I/O routines
18 60-63 Points to basic interpreter in a "real" IBM PC
19 64-67 Bootstrap loader
1A 68-6B Time of day services
1B 6C-6F Services Ctrl-Break service
1C 70-73 Timer tick (provides 18.2 ticks per second)
1D 74-77 Video parameters
1E 78-7B Disk parameters
1F 7C-7F Video graphics
20 80-83 Program termination (obsolete)
21 84-87 All DOS services available through this Interrupt
22 88-8B Terminate address
23 8C-8B Ctrl-Break exit address
24 90-93 Critical error handler
25 94-97 Read logical sectors
26 98-9B Write logical sectors
27 9C-9F Terminate and stay resident routines (obsolete)
28 to 3F A0-A3 to FC-FF Reserved for DOS
40 to 4F 100-103 to 13C-13F Reserved for BIOS
50 140-143 Reserved for BIOS
51 144-147 Mouse functions
52 to 59 148-14B to 164-167 Reserved for BIOS
5A 168-16B Reserved for BIOS
5B 16C-16F Reserved for BIOS
5D 174-177 Reserved for BIOS
5E 178-17B Reserved for BIOS
5F 17C-17F Reserved for BIOS
60 to 66 180-183 to 198-19B Reserved for User programs
67 19C-19F Used for EMS functions
68 to 6F 1A0-1A3 to 1BC-1BF Unused
70 1C0-1C3 IRQ8, ISA bus Real time clock
71 1C4-1C7 IRQ9, takes the place of IRQ2
72 1C8-1CB IRQ10 (available hardware interrupt)
73 1CC-1CF IRQ11 (available hardware interrupt)
74 1D0-1D3 IRQ12 (available hardware interrupt)
75 1D4-1D7 IRQ13, maths co-processor
76 1D8-1DB IRQ14, ISA bus hard disk controller
77 1DC-1DF IRQ15, (available hardware interrupt)
78 to 7F 1E0-1E3 to 1FC-1FF Unused
80 to 85 200-203 to 214-217 Reserved for basic
86 to F0 218-21B to 3C0-3C3 Used by basic
F1 to FF 3C4-3C7 to 3C4-3FF Unused

Many of the Software Interrupt Service Routines provide multiple services. When programmers are writing routines that make use of an Interrupt Service Routine they must put a number that indicates which function they require form that service routine into the processors "A" register before they call the service routine. See exercise 12 for more details. The functions provided by the various service routines and the numbers required to access each function are described in great detail in the various DOS programming manuals. As hardware people we need not know anything about all of this but it is interesting to have a very basic understanding of what is happening.

The Video Services Routine

A good example of the functions available in an Interrupt Service Routine is what we find in the Video Services Routine, INT10 Hex. Here is a list of these functions.

Function Number Description
0 Set Video Mode
1 Set cursor size
2 Set cursor position
3 Read cursor position
4 Read Light-pen position
5 Set active display page
6 Scroll window up
7 Scroll window down
8 Read character and attribute
9 Write character and attribute
A Write character
B Set colour palette
C Write Pixel dot
D Read Pixel dot
E Write character as TTY
F Get current Video Mode

In exercise 12 we use Function 1 of INT 10 to change the size of the Cursor.

We put a number that indicates the start of the cursor into the "high" part of the "C" register (CH) and a number that represents the end of the cursor into the "low" part of the "C" register (CL). The registers are 16 bit long but can be looked at as two eight bit registers.

The cursor is made up out of up to eight horizontal lines. The "start" and "end" numbers above indicate how many of these lines are used and so determine the size (height and position) of the cursor.

A look at the contents of the IVT

We can examine the contents of the Interrupt Vector Table using DEBUG. Debug is a MACHINE LANGUGE MONITOR and it is supplied as a DOS EXTERNAL command.

Debug is a very low level high level language and uses very simple single letter commands. The DUMP command can be used to display the contents of memory loctaions.

DUMP - Displays memory contents.

Example to display the first four address we would use either of these two lines :-

Back to the Interrupt chapter Back to the opening index Book two index


Copyright © Phil. Storr, last updated 26th December 1998