8086 Interrupt Vector Table (IVT) & Dedicated Types 0–4
1 KB Interrupt Vector Table, 256 vector types, dedicated Divide Error/NMI/Breakpoint/Overflow interrupts, and IRET.
Knova editors10 min readQuick checkSources
8086 Interrupt System and Vector Table
The 8086 processor features a comprehensive, multi-priority interrupt structure supporting up to 256 distinct interrupt sources. An interrupt can be generated by three mechanisms:
- External Hardware Interrupts: Applied to the physical
NMI(Non-Maskable Interrupt) orINTR(Interrupt Request) pins. - Software Interrupts: Explicitly invoked by the programmer using the
INT ninstruction, where . - Internal Processor Exceptions: Automatically triggered by abnormal arithmetic conditions (e.g. divide by zero, signed overflow).
The Interrupt Vector Table (IVT)
The first bytes () of physical memory, ranging from to , are reserved exclusively for the Interrupt Vector Table (IVT).
The table stores the 4-byte starting addresses for all 256 Interrupt Service Routines (ISRs). Each entry consists of:
- 2 bytes for the new offset address (Instruction Pointer, )
- 2 bytes for the new segment base (Code Segment, )
| Interrupt Type | IVT Address Range (Hex) | Dedicated Function / Assignment |
|---|---|---|
| Type 0 | Divide Error (Division by zero or quotient overflow) | |
| Type 1 | ||
| Type 2 | NMI (Non-Maskable Hardware Interrupt pin) | |
| Type 3 | ||
| Type 4 | ||
| Type 5 - 31 | Reserved by Intel for processor expansion | |
| Type 32 - 255 |
The Five Dedicated Interrupts (Type 0 - Type 4)
- Type 0 (Divide Error): Generated automatically by the processor whenever a
DIVorIDIVinstruction attempts division by zero, or when the quotient is too large to fit in the destination register (e.g. dividing a 16-bit word by an 8-bit divisor where quotient ). - Type 1 (Single Step): Activated when the Trap Flag () is set to . The processor executes one instruction and immediately jumps to the Type 1 ISR, enabling debuggers to inspect registers and memory step-by-step.
- Type 2 (NMI): Edge-triggered on the rising edge of the
NMIinput pin. Cannot be masked by software (CLIhas no effect). Reserved for critical system failures such as power loss detection, parity errors, and watchdog timers. - Type 3 (Breakpoint): Generated by the instruction
INT 3. It is encoded as a single byte (), allowing debuggers to insert it anywhere in code by temporarily overwriting a single opcode byte. - Type 4 (Overflow): Software conditional interrupt invoked by
INTO(Interrupt on Overflow). If the Overflow Flag () is set following signed arithmetic, the processor jumps to Type 4 ISR; if , execution continues with the next sequential instruction.
Step-by-Step Interrupt Processing Sequence
When an interrupt is accepted at the end of the current instruction cycle, the 8086 performs the following automated hardware sequence:
- Decrements Stack Pointer by 2 () and pushes the 16-bit Flag Register onto the stack.
- Clears the Interrupt Flag () to prevent further maskable interrupts, and clears the Trap Flag () to disable single-step debugging inside the ISR.
- Decrements by 2 and pushes the current Code Segment () onto the stack.
- Decrements by 2 and pushes the current Instruction Pointer () onto the stack.
- Computes the vector address in the IVT:
- Fetches the new from locations and , and fetches the new from locations and .
- Begins executing the Interrupt Service Routine.