Microprocessor - 8086 Interrupts - Tutorialspoint PDF
Microprocessor - 8086 Interrupts - Tutorialspoint PDF
Interrupt is the method of creating a temporary halt during program execution and allows peripheral
devices to access the microprocessor. The microprocessor responds to that interrupt with an ISR
(Interrupt Service Routine), which is a short program to instruct the microprocessor on how to handle the
interrupt.
The following image shows the types of interrupts we have in a 8086 microprocessor −
Hardware Interrupts
Hardware interrupt is caused by any peripheral device by sending a signal through a specified pin to the
microprocessor.
The 8086 has two hardware interrupt pins, i.e. NMI and INTR. NMI is a non-maskable interrupt and INTR
is a maskable interrupt having lower priority. One more interrupt pin associated is INTA called interrupt
acknowledge.
NMI
It is a single non-maskable interrupt pin (NMI) having higher priority than the maskable interrupt request
pin (INTR)and it is of type 2 interrupt.
https://www.tutorialspoint.com/microprocessor/microprocessor_8086_interrupts.htm 1/3
3/26/2020 Microprocessor - 8086 Interrupts - Tutorialspoint
Pushes the CS (code segment) value and IP (instruction pointer) value of the return address on
to the stack.
INTR
The INTR is a maskable interrupt because the microprocessor will be interrupted only if interrupts are
enabled using set interrupt flag instruction. It should not be enabled using clear interrupt Flag instruction.
The INTR interrupt is activated by an I/O port. If the interrupt is enabled and NMI is disabled, then the
microprocessor first completes the current execution and sends ‘0’ on INTA pin twice. The first ‘0’ means
INTA informs the external device to get ready and during the second ‘0’ the microprocessor receives the 8
bit, say X, from the programmable interrupt controller.
Software Interrupts
Some instructions are inserted at the desired position into the program to create interrupts. These
interrupt instructions can be used to test the working of various interrupt handlers. It includes −
It is 2-byte instruction. First byte provides the op-code and the second byte provides the interrupt type
number. There are 256 interrupt types under this group.
https://www.tutorialspoint.com/microprocessor/microprocessor_8086_interrupts.htm 2/3
3/26/2020 Microprocessor - 8086 Interrupts - Tutorialspoint
The starting address for type0 interrupt is 000000H, for type1 interrupt is 00004H similarly for type2 is
00008H and ……so on. The first five pointers are dedicated interrupt pointers. i.e. −
TYPE 0 interrupt represents division by zero situation.
TYPE 1 interrupt represents single-step execution during the debugging of a program.
The interrupts from Type 5 to Type 31 are reserved for other advanced microprocessors, and interrupts
from 32 to Type 255 are available for hardware and software interrupts.
It is a 1-byte instruction having op-code is CCH. These instructions are inserted into the program so that
when the processor reaches there, then it stops the normal execution of program and follows the break-
point procedure.
Its execution includes the following steps −
It is a 1-byte instruction and their mnemonic INTO. The op-code for this instruction is CEH. As the name
suggests it is a conditional interrupt instruction, i.e. it is active only when the overflow flag is set to 1 and
branches to the interrupt handler whose interrupt type number is 4. If the overflow flag is reset then, the
execution continues to the next instruction.
CS value of the return address and IP value of the return address are pushed on to the stack.
IP is loaded from the contents of word location 4×4 = 00010H
https://www.tutorialspoint.com/microprocessor/microprocessor_8086_interrupts.htm 3/3