Vectored interrupt
In computer science, a vectored interrupt is a processing technique in which the interrupting device directs the processor to the appropriate interrupt service routine. This is in contrast to a polled interrupt system, in which a single interrupt service routine must determine the source of the interrupt by checking all potential interrupt sources, a slow and relatively laborious process. Vectored interrupts are achieved by assigning each interrupting device a unique code, typically four to eight bits in length. When a device's interrupt is acknowledged, the device sends its unique code over the data bus to the processor, telling the processor which interrupt service routine to execute.
Implementation
Vectored interrupts are often implented in microprocessors. Even the very first commercially-available 8-bit microprocessor, the Intel 8008 from 1971, supported at least seven vectors, though curiously it had no capability to save its state during an interrupt. Here are a few examples of vectored interrupts as implemented on microprocessors:Intel 8080
The Intel 8080 from 1974 can support seven vectors with little hardware or up to 64 vectors using the Intel 8259.The minimal hardware method requires the external hardware to jam a single-byte instruction associated with the interrupting device onto the bus. The restart instruction is a call to one of eight locations: 0, 8, 16, 24, 32, 40, 48, and 56, allowing seven directly-accessible interrupt service routines.
When using an Intel 8259, a instruction can be issued instead of allowing the interrupt to be sent to any place in memory. Up to nine 8259s can be cascaded to allow up to 64 vectors.