Chapter 8
Chapter 8
Interrupt
Interrupt
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.
An interrupt is a hardware initialized procedure that interrupts whatever
program is currently executing.
Interrupts are particularly useful when interfacing I/O devices that provide
or require data at relatively low data transfer rates.
Interrupt is a signal which has highest priority from hardware or software
which processor should process its signal immediately.
SOURCES OF INTERRUPTS IN 8086
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.
Types of Interrupt
There are two types of interrupts which are as follows:-
1) HARDWARE INTERRUPTS
If the signal for the processor is from external device or hardware is
called hardware interrupts.
The interrupt signal generated from external devices and i/o devices are
made interrupt to CPU when the instructions are ready.
For example: In a keyboard if we press a key to do some action this
pressing of the keyboard generates a signal that is given to the processor to
do action, such interrupts are called hardware interrupts.
Hardware interrupts are classified into two types which are as follows −
Maskable Interrupt:- The hardware interrupts that can be delayed when
a highest priority interrupt has occurred to the processor.
Non Maskable Interrupt:- The hardware that cannot be delayed and
immediately be serviced by the processor.
Mask able interrupt (INTR)