Module - III (A&B)
Module - III (A&B)
Module - III (A&B)
Interrupt N
Req
Accept N
Interrupt
Get interrupt
vector
Jump to ISR
Save PC
Load PC
Interrupt Vector or Interrupt pointer
Each Interrupt service procedure (ISR) will have a 4
byte physical address(CS+IP)
Each ISR(Interrupt Service Routine) should have 4
memory locations for giving the starting address of
ISR.
Total 1 Kb memory is reserved in 8086 for interrupts.
So totally 256 interrupts are possible.
The starting address of interrupt service procedure is
called as Interrupt Vector or Interrupt pointer.
The 256 interrupts procedures can be stored in the
table known as Interrupt vector table or Interrupt
pointer table.
When an interrupt occurs (shown in above figure),
regardless of source, the 80x86 does the following:
1. The CPU pushes the flags register onto the
stack.
2. The CPU pushes a far return address (segment:
offset) onto the stack, segment value first.
3. The CPU determines the cause of the interrupt
(i.e., the interrupt number) and fetches the four
byte interrupt vector from address 0:vector*4.
4. The CPU transfers control to the routine
specified by the interrupt vector table entry.
Hardware Interrupts – Interrupt pins and timing
x86 Interrupt Pins
INTR: Interrupt Request. Activated by a peripheral device to interrupt the processor.
Level triggered. Activated with a logic 1.
INTA: Interrupt Acknowledge. Activated by the processor to inform the interrupting device
the the interrupt request (INTR) is accepted.
Level triggered. Activated with a logic 0.
NMI: Non-Maskable Interrupt. Used for major system faults such as parity errors and power
failures.
Edge triggered. Activated with a positive edge (0 to 1) transition.
Must remain at logic 1, until it is accepted by the processor.
Before the 0 to 1 transition, NMI must be at logic 0 for at least 2 clock cycles.
No need for interrupt acknowledgement.
INTR
INTA΄
D7-D0 Vector
The Intel x86 Vector Interrupts:- Protected
Mode (32-bit)
In the 80386/80486/Pentium processors operating in the Protected Mode
(32-bit operation), the interrupt vector is a pointer to the Interrupt
Descriptor Table.
The Interrupt Descriptor Table can be located anywhere in the memory.
Its starting address is pointed by the Interrupt Descriptor Table
Register (IDTR).
Each entry in the Interrupt Vector Table is 8 bytes long:
Four bytes represent the 32-bit offset address, two the segment
selector and the rest information such as the privilege level.
The first 32 vectors are reserved by Intel to be used by the processor.
The vectors 33 to 255 are free to be used by the user.
7 Offset (A31 - A16) 6
Interrupt Priority
Data bit1
Data bit2 Data bit3 Data bit4 Data bit5 Data bit6 Data bit7 Data bit8 Sync1 Sync2