Aninterrupt vector table (IVT) is adata structure that associates a list ofinterrupt handlers with a list ofinterrupt requests in a table of interrupt vectors. Each entry of the interrupt vector table, called an interrupt vector, is the address of an interrupt handler (also known asISR). While the concept is common across processor architectures, IVTs may be implemented in architecture-specific fashions. For example, adispatch table is one method of implementing an interrupt vector table.
Most processors have an interrupt vector table, including chips fromIntel,AMD,Infineon, Microchip[1]Atmel,[2] NXP,ARM,[3][4] etc.
An interrupt vector table is used in the three most popular methods of finding the starting address of the interrupt service routine:
The "predefined" method loads theprogram counter (PC) directly with the address of some entry inside the interrupt vector table. Thejump table itself contains executable code. While in principle an extremely short interrupt handler could be stored entirely inside the interrupt vector table, in practice the code at each entry is a single jump instruction that jumps to the full interrupt service routine (ISR) for that interrupt. The Intel8080,[5] Atmel AVR[6][7] and all 8051 and Microchip microcontrollers[8] use the predefined approach.
The "fetch" method loads the PC indirectly, using the address of some entry inside the interrupt vector table to pull an address out of that table, and then loading the PC with that address.[8] Each and every entry of the IVT is the address of an interrupt service routine. All Motorola/Freescale microcontrollers use the fetch method.[8]
For the "interrupt acknowledge" method, the external device gives the CPU an interrupt handler number. The interrupt acknowledge method is used by the Intel Pentium and many older microprocessors.[8]
When the CPU is affected by aninterrupt, it looks up theinterrupt handler in the interrupt vector table, and transfers control to it.