Classification of Interrupts
Classification of Interrupts
The software interrupts are program instructions. These instructions are inserted at
desired locations in a program. While running a program, if software interrupt
instruction is encountered then the processor initiates an interrupt. The 8086
processor has 256 types of software interrupts. The software interrupt instruction is
INT n, where n is the type number in the range 0 to 255.
The processor has the facility for accepting or rejecting hardware interrupts.
Programming the processor to reject an interrupt is referred to as masking or
disabling and programming the processor to accept an interrupt is referred to as
unmasking or enabling. In 8086 the interrupt flag (IF) can be set to one to unmask
or enable all hardware interrupts and IF is cleared to zero to mask or disable a
hardware interrupts except NMI.
The interrupts whose request can be either accepted or rejected by the processor
are called maskable interrupts. The interrupts whose request has to be definitely
accepted (or cannot be rejected) by the processor are called non-maskable
interrupts. Whenever a request is made by non-maskable interrupt, the processor
has to definitely accept that request and service that interrupt by suspending its
current program and executing an ISR. In 8086 processor all the hardware
interrupts initiated through INTR pin are maskable by clearing interrupt flag (IF).
The interrupt initiated through NMI pin and all software interrupts are non-
maskable.
An interrupt in 8086 can come from one of the following three sources.
1. One source is from an external signal applied to NMI or INTR input pin of the
processor. The interrupts initiated by applying appropriate signals to these input
pins are called hardware interrupts.
2. A second source of an interrupt is execution of the interrupt instruction "INT n",
where n is the type number. The interrupts initiated by "INT n" instructions are
called software interrupts.
3. The third source of an interrupt is from some condition produced in the 8086 by
the execution of an instruction. An example of this type of interrupt is divide by
zero interrupt. Program execution will be automatically interrupted if you attempt
to divide an operand by zero. Such conditional interrupts are also known as
exceptions.