Diptopol Dam
Diptopol Dam

Reputation: 815

Interrupt service procedure of 8086

I could not find any suitable resource in interrupt service procedure of 8086 .I want to know how 8086 process different interrupts . Please help me out.

Upvotes: 0

Views: 1792

Answers (2)

Stephen Duffy
Stephen Duffy

Reputation: 505

A PC boots up by loading the contents at the start of the disk into the start of ram. These contents once in ram are expected to partially overwrite themself, with the first kilobyte of ram dedicated to the "INTERRUPT VECTOR TABLE" (IVT).

The IVT consists of 256 records of SEG:ADDRESS which are "called" according to INT number.

So for example if I were to say INT 10h, the processor looks up the 16th record in the IVT (at memory address 0000:0040h), sets CS to the value of the first word at that address and sets IP to the second word at that address so the machine continues executing from the new address at CS:IP until it reaches an IRET instruction where it sets the CS:IP to the next instruction before the interrupt was called.

Thats the basic mechanism, however you will not that interrupts can also be called from things which are external to the program in execution executing. The 8086 has a pair of cascaded interrupt controllers which can generate an interrupt request at any time without the processor being prepared in advance so while the machine has to store the CS:IP on the stack before jumping to the address indexed by the IVT, it also has to push all the other registers, including flags, on the stack also. Similarly they must be popped off the stack at IRET.

Upvotes: 2

Trevor Arjeski
Trevor Arjeski

Reputation: 2168

When an interrupt is called, the processor knows to save it's state and execute the interrupt instruction immediately, then restore the previous state. Basically, when an interrupt is called the program counter stops, executes the interrupt, and proceeds with the next instruction.

You may find this link helpful: Hardware Interrupts

Upvotes: 0

Related Questions