8086 Interrupts
8086 Interrupts
When you are studying then your cell phone rings – what will you do?
When you finish talking on the phone then you will continue with
your study.
Now your phone rings again and someone also knocking at your
door then what will you do?
Sources of Interrupts:
Three types of interrupts sources are there:
1. An external signal applied to NMI or INTR input pin( hardware
interrupt)
2. Execution of Interrupt instruction( software interrupt)
3. Interrupt raised due to some error condition produced in 8086
instruction execution process. (Divide by zero, overflow errors
etc)
8086 Interrupt Sources
An 8086 interrupt can come from any one of the following three sources:
Polling-based
Interrupt-based
Example: Polling Vs Interrupt
Interrupt-based approach
The CPU executes other program, as soon as a key is
pressed, the Keyboard generates an interrupt. The CPU
will response to the interrupt – read the data. After
that returns to the original program. So by proper use
of interrupt, the CPU can serve many devices at the
“same time”
Example of interrupt
Interrupt
Keeping moving until interrupted by the sensor
Move forward
Move forward
Check sensor
Y
obstacle
program memory.
Available Interrupts
(224)
Type 21H Interrupt (Available)
00084H
Type 20H Interrupt (Available)
00080H
Type 1FH Interrupt (Reserved)
0007CH
Reserved Interrupts
(27)
1 KB
CS LSB MSB
Offset = 02 x 4 = 08
= 00008h
256 Interrupts Of 8086 are Divided in To 3 Groups
INT 11H:- Determine the type of equipment installed. Register AX should contain
FFFFH and instruction INT 11H to be executed. On return, register AX will
indicate the equipment's attached to computer
INT14H:- Control the serial communication port attached to the computer. Ah
should contain the function call
a) Function Call 00:initialize The Com Port
b) Function Call 01: Send A Character
c) Function Call 02:receive A Character
INT 16H:- Keyboard interrupt AH should contain the function call
a) Function call 00: Read keyboard character, It will return ASCII code of the
character
b) Function call 01: Get key board status