0% found this document useful (0 votes)
147 views

8086 Interrupts

The 8086 microprocessor allows program execution to be interrupted by external signals or software interrupts. There are three sources of interrupts: external hardware signals, software interrupts using the INT instruction, and error conditions. When an interrupt occurs, the 8086 saves context and calls an interrupt service procedure. There are 256 possible interrupt vectors stored in an interrupt vector table. Common 8086 interrupt types include divide by zero, single step, non-maskable, and overflow interrupts. An 8259A programmable interrupt controller prioritizes and directs interrupts to the 8086.

Uploaded by

Towsif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views

8086 Interrupts

The 8086 microprocessor allows program execution to be interrupted by external signals or software interrupts. There are three sources of interrupts: external hardware signals, software interrupts using the INT instruction, and error conditions. When an interrupt occurs, the 8086 saves context and calls an interrupt service procedure. There are 256 possible interrupt vectors stored in an interrupt vector table. Common 8086 interrupt types include divide by zero, single step, non-maskable, and overflow interrupts. An 8259A programmable interrupt controller prioritizes and directs interrupts to the 8086.

Uploaded by

Towsif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

8086 Interrupts

Mr. Sunanda Das


• Most Microprocessors allow normal program execution to be
interrupted by some external signal or by a special instruction in the
program.

• In response to an interrupt, the microprocessor stops executing it’s


current program and call a procedure which serves the interrupt.
Sources
An 8086 interrupt can come from any one of the three sources.
1. External signal applied to NMI pin or INTR input pin . . . . Hardware
interrupt
2. Execution of Interrupt instruction, INT . . . . software interrupt
3. Some error condition produced by executing an instruction i.e.
divide by zero
• If an interrupt has been requested, the 8086 responds to the interrupt
by stepping through the following series of major actions.
• There are 256 interrupt procedures.
• The starting address of an interrupt service procedure is called
interrupt vector/interrupt pointer. So, the table is referred to as the
interrupt-vector table or the interrupt pointer table.
Interrupt pointer table
8086 interrupt types
• Type 0 : divide by zero interrupt
• Type 1 : single step interrupt

Set trap flag:


PUSHF
MOV BP, SP
OR WORD PTR[BP+0],0100H
POPF
• Type 2 : Non-maskable interrupt
• Type 3 : Breakpoint interrupt
• Execution of INT 3 Instruction
• Type 4 : Overflow interrupt
• Two major ways to detect and respond to an overflow error.
• JO (jump if overflow)
• INTO (interrupt on overflow)
Software Interrupts
• INT instruction can be used to cause the 8086 to do any one of the
256 possible interrupt types.
INTR interrupts
• If the IF flag is cleaned then the INTR input is disabled.
• IF flag can be cleaned using CLI (Clear interrupt) instruction.
• INTR can be disabled using CLI (Clear interrupt) instruction
• To enable INTR we have to set IF flag with STI (Set Interrupt)
• IF (Interrupt Flag) is automatically cleared as part of the response of
an 8086 to an interrupt.
• Two reasons
8259A priority interrupt controller (PIC)
• 8259A sends interrupt request signal to the INTR input of 8086
• 8086 does two interrupt-acknowledge machine cycle.
• Sends an interrupt acknowledgement pulse on its INTA output pin
which tells the 829A to get ready.
• In response to the second INTA pulse the 8059A puts the interrupt
type on the lower eight lines of the data bus.
Priority of 8086 Interrupts
a. Divide by Zero Vs INTR
b. Divide by Zero Vs NMI
8259A (PIC)
• Act as a funnel
8259A Internal Block Diagram
• IR0 input has the highest priority

07/03/2020 18
07/03/2020 19
07/03/2020 20
8259A System Connections and Cascading

07/03/2020 21
Reference
• Microprocessors and interfacing by D.V. Hall

07/03/2020 22

You might also like