SlideShare a Scribd company logo
Chapter 12: interrupts
Prepared by: Afrah Salman
Supervised by: Dr. Hassan A.
Introduction
 In this chapter, the coverage of basic I/O and programmable peripheral interfaces is expanded by examining a
technique called interrupt-processed I/O.
 An interrupt is a hardware-initiated procedure that interrupts whatever program is currently executing.
 This chapter provides examples and a detailed explanation of the interrupt structure of the entire Intel family of
microprocessors.
Chapter objectives
1. Explain the interrupt structure of the Intel family of microprocessors.
2. Explain the operation of software interrupt instructions INT, INTO, INT3, and BOUND.
3. Explain how the interrupt enable flag bit (IF) modifies the interrupt structure.
4. Describe the function of the trap interrupt flag bit (TF) and the operation of trap-generated tracing.
5. Develop interrupt-service procedures that control lower-speed, external peripheral devices.
6. Expand the interrupt structure of the microprocessor by using the 82S9A programmable interrupt
controller and other techniques.
12–1 BASIC INTERRUPT PROCESSING
 This section discusses the function of an interrupt in a microprocessor-based system.
 Structure and features of interrupts available to Intel microprocessors.
The Purpose of Interrupts
 Interrupts are useful when interfacing I/O devices at relatively low data transfer rates,
such as keyboard inputs.
 Interrupt processing allows the processor to execute other software while the keyboard
operator is thinking about what to type next.
 When a key is pressed, the keyboard encoder debounces the switch and puts out one
pulse that interrupts the microprocessor.
A time line shows typing on a keyboard, a printer removing data from memory, and a
program executing.
The keyboard interrupt service procedure, called by the keyboard interrupt, and the
printer interrupt service procedure each take little time to execute.
Interrupts
 Intel processors include two hardware pins (INTR and NMI) that request interrupts and one
hardware pin (INTA) to acknowledge the interrupt requested through INTR.
 The processor also has software interrupts INT, INTO, INT 3, and BOUND.
 Flag bits IF (interrupt flag) and TF (trap flag), are also used with the interrupt structure and
special return instruction IRET (or IRETD in the 80386, 80486, or Pentium-Pentium4).
Interrupt vectors
 Interrupt vectors and the vector table are crucial to an understanding of hardware and software
interrupts.
 The interrupt vector table is located in the first 1024 bytes of memory at addresses 000000H–
0003FFH.
 It contains 256 different four-byte interrupt vectors.
 An interrupt vector contains the address (segment and offset) of the interrupt service procedure.
– The first five interrupt
vectors are identical in all
Intel processors (from 8086
to Pentium). Other interrupt
vectors exist for the 80286
that are upward-compatible
to the 80386, 80486, and
Pentium–Core2, but not
downward-compatible to
the 8086 or 8088.
Example: an INT 80H or
INT 128 calls the interrupt
service procedure whose
address is stored in vector
type number 80H
(000200H–00203H).
Intel dedicated interrupts
 Type 0: The divide error whenever the result from a division overflows or an attempt is made to divide by zero.
 Type 1: Single-step or trap occurs after execution of each instruction if the trap (TF) flag bit is set.
* Upon accepting this interrupt, TF bit is cleared so the interrupt service procedure executes at full
speed.
 Type 2: The non-maskable interrupt occurs when a logic 1 is placed on the NMI input pin to the
microprocessor.
* Non-maskable means that it cannot be disabled.
 Type 3: A special one-byte instruction (INT3) that uses this vector to access its interrupt-service procedure.
* Often used to store a breakpoint in a program for debugging.
 Type 4: Overflow is a special vector used with the INTO instruction. The INTO instruction interrupts the
program if an overflow condition exists, as reflected by the overflow flag (OF).
 TYPE 5: The BOUND instruction compares a register with boundaries stored in the memory. If the
contents of the register are greater than or equal to the first word in memory and less than or equal to the
second word, no interrupt occurs because the contents of the register are within bounds, elsewhere, type 5
interrupt ensues.
 TYPE 6: An invalid opcode interrupt occurs whenever an undefined opcode is encountered in a program.
 TYPE 7: The coprocessor not available interrupt occurs when a coprocessor is not found in the system,
as dictated by the machine status word (MSW or CR0) coprocessor control bits. If an ESC or WAIT
instruction executes and the coprocessor is not found, a type 7 exception or interrupt occurs.
 TYPE 8: A double fault interrupt is activated whenever two separate interrupts occur during the same
instruction.
 TYPE 9: The coprocessor segment overrun occurs if the ESC instruction (coprocessor opcode) memory
operand extends beyond offset address FFFFH in real mode.
 TYPE 10: An invalid task state segment interrupt occurs in the protected mode if the TSS is invalid because
the segment limit field is not 002BH or higher. In most cases, this is caused because the TSS is not initialized.
 TYPE 11: The segment not present interrupt occurs when the protected mode P bit (P = 0) in a descriptor
indicates that the segment is not present or not valid.
 TYPE 12: A stack segment overrun occurs if the stack segment is not present (P = 0) in the protected mode
or if the limit of the stack segment is exceeded.
 TYPE 13: The general protection fault occurs for most protection violations in the 80286–Core2 protected
mode system. (These errors occur in Windows as general protection faults.) A list of these protection
violations follows:
(a) Descriptor table limit exceeded.
(b) Privilege rules violated.
(c) Invalid descriptor segment type loaded.
(d) Write to code segment that is protected.
(e) Read from execute-only code segment.
(f) Write to read-only data segment.
(g) Segment limit exceeded.
 Type 14: Page fault interrupts occur for any page fault memory or code access in 80386, 80486,
and Pentium–Core2 microprocessors.
 Type 16: Coprocessor error takes effect when a coprocessor error (ERROR = 0) occurs for ESC or
WAIT instructions for 80386, 80486, and Pentium–Core2 microprocessors only.
 TYPE 17: Alignment checks indicate that word and double word data are addressed at an odd
memory location (or an incorrect location, in the case of a double word). This interrupt is active in
the 80486 and Pentium–Core2 microprocessors.
 TYPE 18: A machine check activates a system memory management mode interrupt in the
Pentium–Core2 microprocessors.
Interrupt instructions: BOUND,
INTO, INT, INT 3, AND IRET
 Five software interrupt instructions are available to the microprocessor:
 INT and INT 3 are very similar.
 BOUND and INTO are conditional.
 IRET is a special interrupt return instruction.
 BOUND has two operands, and compares a register with two words of memory data.
 Example: BOUND AX,DATA; AX is compared with the contents of DATA and DATA+1 and also with
DATA+2 and DATA+3. If AX is less than the contents of DATA and DATA+1, or If AX is greater than
DATA+2 and DATA+3, a type 5 interrupt occurs. If AX is within the bounds of these two memory
words, no interrupt occurs.
 INTO checks or tests the overflow flag (O).
 If O = 1, INTO calls the procedure whose address is stored in interrupt vector type 4.
 If O = 0, INTO performs no operation and the next sequential program instruction executes.
 INT3 instruction is often used as a breakpoint-interrupt because it is easy to insert a one-byte instruction into
a program.
– breakpoints are often used to debug software.
 The IRET instruction is a special return instruction used to return for both software and hardware interrupts.
– much like a far RET, it retrieves the return address from the stack
 In the 80386–Core2, there is also an IRETD instruction because these
microprocessors can push the EFLAG register (32 bits) on the stack, as
well as the 32-bit EIP in the protected mode and 16-bit code segment
register. If operated in the real mode, we use the IRET instruction with
the 80386–Core2 microprocessors. If the Pentium 4 operates in 64-bit
mode, an IRETQ instruction is used to return from an interrupt. The
IRETQ instruction pops the EFLAG register into RFLAGS and also the
64-bit return address is placed into the RIP register.
Operation of a real mode interrupt
 When the processor completes executing the current instruction, it
determines whether an interrupt is active by checking:
 instruction executions
 single-step
 NMI
 coprocessor segment overrun
 INTR
 INT instructions in the order presented
 If one or more are present:
1. Flag register contents are pushed on the stack
2. Interrupt (IF) & trap (TF) flags clear, disabling the INTR pin and trap
or single-step feature
3. Contents of the code segment register (CS) are pushed onto the stack
4. Contents of the instruction pointer (IP) are pushed onto the stack
5. Interrupt vector contents are fetched and placed into IP and CS so the
next instruction executes at the interrupt service procedure addressed
by the vector.
Operation of a protected mode interrupt
 In protected mode, interrupts have the same assignments as real mode, but the interrupt vector
table is different
 In place of interrupt vectors, protected mode uses a set of 256 interrupt descriptors stored in an
interrupt descriptor table (IDT). The table is 256 × 8 (2K) bytes long, with each descriptor
contains eight bytes.
 The interrupt descriptor table is located at any memory location in the system by the interrupt
descriptor table address register (IDTR).
 Each IDT entry contains the address of the interrupt service procedure in the form of a segment
selector and a 32-bit offset address. It also contains the P bit (present) and DPL bits to describe
the privilege level of the interrupt. Figure 12–3 shows interrupt descriptor contents.
Other than the IDT and interrupt
descriptors, the protected mode
interrupt functions like the real mode
interrupt. We return from both
interrupts using the IRET or IRETD
instruction.
The only difference is that in protected
mode the microprocessor accesses the
IDT instead of the interrupt vector
table.
Interrupt flag bits
 The interrupt flag (IF) and the trap flag (TF) are both cleared after the contents of the flag
register are stacked during an interrupt.
 The contents of the flag register and the location of IF and TF are shown in figure 12-4.
– when IF=1, it allows the INTR pin to cause an interrupt.
– when IF=0, it prevents the INTR pin from causing an interrupt.
– when TF=1, it causes a trap interrupt (type 1) to occur after each instruction execution. Trap
is often called a single-step.
– when TF=0, normal program execution occurs.
– The interrupt flag is set and cleared by the STI and CLI instructions, respectively. There are
no special instructions that set or clear the trap flag.
shows an interrupt service
procedure that turns tracing
on by setting the trap flag bit
on the stack from inside the
procedure.
shows an interrupt service
procedure that turns tracing
off by clearing the trap flag
on the stack from within the
procedure.
Trace procedure
 Assuming TRON is accessed by an INT 40H instruction and TROFF is by an INT 41H instruction,
Example 12–3 traces through a program immediately following the INT 40H instruction.
 The interrupt service procedure illustrated in Example 12–3 responds to interrupt type 1 or a trap
interrupt.
 Each time that a trap occurs—after each instruction executes following INT 40H—the TRACE
procedure stores the contents of all the 32-bit microprocessor registers in an array called REGS. This
provides a register trace of all the instructions between the INT 40H (TRON) and INT 41H (TROFF)
if the contents of the registers stored in the array are saved.
Storing an interrupt vector in the vector table
 Storing an interrupt vector also called Hook.
 The assembler must address absolute memory.
 The following example shows how to install new interrupt
vector.
12–2 HARDWARE INTERRUPTS
• The two processor hardware interrupt
inputs:
Non-maskable interrupt (NMI).
Interrupt request (INTR).
• Intel has reserved interrupts 00H - 1FH for
internal and future expansion.
• INTA’ is also an interrupt pin on the
processor. It is an output used in response to
INTR input to apply a vector type number
to the data bus connections D7–D0.
Works in response to
INTR i/p to apply vector
type no. to the data bus
connections D0-D7.
 The non-maskable interrupt (NMI) is an edge-triggered input that requests an interrupt on the
positive edge (0-to-1 transition).
 After a positive edge, the NMI pin must remain logic 1 until recognized by the
microprocessor; Before the positive edge is recognized, NMI pin must be logic 0 for at least
two clocking periods.
 The NMI input is often used for parity errors and other major faults, such as power failures.
 Power failures are easily detected by monitoring the AC power line and causing an NMI
interrupt whenever AC power drops out.
 In response to this type of interrupt, the microprocessor stores all of the internal register in a
battery-backed-up memory or an EEPROM.
 Figure 12–6 shows a power failure detection circuit that provides logic 1
to the NMI input whenever AC power is interrupted.
 In this circuit, an optical isolator provides isolation from the AC power
line.
 The interrupt service procedure stores the contents of all internal registers
and other data into a battery-backed-up memory.
 This system assumes the PC power supply has a large enough filter
capacitor to provide energy for at least 75ms after the AC power ceases.
Power to processor doesn’t fall
instantly due to large smoothing
capacitors in power supply…
This gives some time to save things
CR time constant chosen to
give 33 ms output pulse at Q
Optical coupling
to isolate mains
60 Hz Square wave
(interval = 16.7 ms)
i.e. will trigger the monostable to
give a constant 1 at Q until a power
failure occurs when Q goes low, #Q
goes high
Retriggerable monostable
NMI Power failure interrupt to processor
diodes are used to switch
supply voltages from the
DC power supply to the
battery
If the AC power fails, the 74LS122
no longer receives trigger pulses
from the 74ALS14, which means
that Q returns to a logic 0 and Q
returns to a logic 1, interrupting the
microprocessor through the NMI
pin.
 Figure 12–7 shows a circuit that supplies power to a memory after the DC
power fails.
 When DC power fails, the battery provides a reduced voltage to the VCC
connection on the memory device.
 Most memory devices will retain data with VCC voltages as low as 1.5 V, so
the battery voltage does not need to be +5.0 V.
 The WR pin is pulled to VCC during a power outage, so no data will be
written to the memory.
Here diodes are used to switch
supply voltages from the DC
power supply to the battery. The diodes used are standard silicon
diodes because the power supply to this
memory circuit is elevated above +5.0V
to +5.7V.
INTR and INTA
 The interrupt request input (INTR) is level-sensitive, which means that it must be held at a logic 1 level until
it is recognized.
 INTR is set by an external event and cleared inside the interrupt service procedure.
 It is automatically disabled once accepted by the microprocessor and re-enabled by IRET at the end of the
interrupt service procedure.
 80386–Core2 use IRETD in protected mode. In 64-bit protected mode, IRETQ is used.
 The processor responds to INTR by pulsing INTA output in anticipation of receiving an interrupt vector type
number on data bus connections D7–D0.
 Fig. 12–8 shows the timing diagram for the INTR and pins of the microprocessor. Two INTA pulses
generated by the system insert the vector type number on the data bus.
 Fig.12–9 shows a circuit to apply interrupt vector type number FFH to the data bus in response to an INTR.
Actions by the interrupting device:
 Put Interrupt type number on processor data bus upon
#INTA low.
 Raise INTR to the Processor . Raise INTR to the
processor until acknowledged.
 More details in the next two slides.
Using a Three-state Buffer for INTA
• Fig 12–10 shows how interrupt vector
type number 80H is applied to the data
bus (D0–D7) in response to an INTR.
• In response to INTR, the microprocessor
outputs the INTA to enable a 74ALS244
three-state octal buffer.
• The octal buffer applies the interrupt
vector type number to the data bus in
response.
• The vector type number is easily changed
with DIP switches shown in this
illustration.
Making INTR input Edge-Triggered
• INTR input can be converted to an edge-
triggered input by using a D-type flip-flop,
as illustrated in Figure 12–11.
• Clock input becomes an edge-triggered
interrupt request input, and the clear input is
used to clear the request when the INTA
signal is output by the microprocessor.
• The RESET signal initially clears the flip-
flop so that no interrupt is requested when
the system is first powered.
The 82C55 Keyboard Interrupt
 Fig. 12–12 shows interconnection of an 82C55 with the microprocessor and keyboard.
 The 82C55 is decoded at 80386SX I/O port address 0500H, 0502H, 0504H, and 0506H by a PLD (the
program is not illustrated). The 82C55 is operated in mode 1 (strobed input mode), so whenever a key is
typed, the INTR output (PC3) becomes a logic 1 and requests an interrupt through the INTR pin on the
microprocessor. The INTR pin remains high until the ASCII data are read from port A.
 Every time a key is typed, 82C55 requests a type 40H interrupt through the INTR pin. . The DAV signal
from the keyboard causes data to be latched into port A and causes INTR to become a logic 1.
 Example 12–5 illustrates the interrupt service procedure for the keyboard.
 The procedure is short because the processor already knows that keyboard data are available when the
procedure is called.
A full condition is indicated
when the input pointer (INP) is
one byte below the output pointer
(OUTP). If the FIFO is full, the
interrupt is disabled with a bit
set/reset command to the 82C55,
and a return from the interrupt
occurs.
12–3 EXPANDING THE INTERRUPT STRUCTURE
 This section covers three common methods of expanding the interrupt
structure of the processor:
1. Hardware: Additional NAND gate for 7 interrupts (as an expansion for the circuit
shown in Figure 12-10).
2. Software: Daisy chaining of interrupts by software polling.
3. A Programmable Interrupt Controller (PIC) - the 8259A - for up to 64 interrupts.
Using the 74ALS244 to Expand Interrupts
• The modification shown in Fig
12–13 allows the circuit of Fig
12–10 to accommodate up to
seven additional interrupt
inputs.
• The only hardware change is
the addition of an eight-input
NAND gate, which provides
the INTR signal to the
microprocessor when any of
the IR inputs becomes active.
7
Interrupt
lines
Vector number
now determined
by the
interrupting line
MSB =
1
LSB
0
1
Operation
• If any of the IR inputs becomes logic 0,
the output of the NAND gate goes to
logic 1 and requests an interrupt
through the INTR input.
• The interrupt vector that is fetched
during the pulse depends on which
interrupt request line becomes active.
• Table 12–1 shows the interrupt vectors
used by a single interrupt request input.
• If two or more interrupt requests are
active, a new interrupt vector is
generated.
Daisy-Chained Interrupt
 Better approach – Uses only one interrupt vector (and therefore one ISR).
 The hardware will give no direct indication as to the source(s) of the interrupts. So, the ISR itself will
determine this by polling the devices taking part in generating the combined interrupt request.
 The ISR resolves priorities and execute the section of ISR code corresponding to the interrupt of the
highest propriety.
 Fig. 12–14 shows a two 82C55 peripheral interfaces with their four INTR outputs daisy-chained and
connected to the single INTR input of the processor. If any interrupt output becomes logic 1, so does
INTR input, causing an interrupt.
 Example 12–7 illustrates the interrupt service procedure that responds to the daisy-chain interrupt
request. The procedure polls each 82C55 and each INTR output to decide which interrupt service
procedure to utilize.
• The task of locating which
INTR output became active
is up to the interrupt service
procedure, which must poll the
82C55s to determine which
output caused the interrupt.
12–4 8259A PROGRAMMABLE INTERRUPT
CONTROLLER
 8259A (PIC) adds eight vectored priority encoded interrupts to the
microprocessor.
 Expandable, without additional hardware, to accept up to 64 interrupt
requests.
 It requires a master 8259A & eight 8259A slaves.
 A pair of these controllers still resides and is programmed as explained
here in the latest chip sets from Intel and other manufacturers.
General
Description of the
8259A
8259A is easy to connect
to the microprocessor
because all of its pins are
direct connections except
the CS pin, which must
be decoded, and the WR
pin, which must have an
I/O bank write pulse.
used to
request an
interrupt and
to connect to a
slave in a
system with
multiple
8259As.
8259A Pin-Outs
CAS0
–CAS2
The cascade lines are used as outputs from the master to the slaves for
cascading multiple 8259As in a system.
SP/EN
Slave program/enable buffer is a dual-function pin.
when the 8259A is in buffered mode, this output controls the data bus
transceivers in a large microprocessor-based system.
when the 8259A is not in the buffered mode, this pin programs the device as
a master (1) or a slave (0).
Remember that we can connect PIC's together. This allows us to provide
support for up to 64 IR numbers. In other words--64 hardware interrupts.
CAS0, CAS1, and CAS2 pins provide a way to send signals between these
PIC's.
Connecting a Single 8259A
 Fig. 12–16 shows a single 8259A connected to the microprocessor.
Here the pin SP/EN* is pulled high to indicate that it is a master.
 The 8259A is decoded at I/O ports 0400H and 0401H by the PLD.
 The 8259A requires four wait states for it to function properly with a
16 MHz 80386SX more for some other versions of the Intel
microprocessor family.
PIC is slow, so it
needs to request
wait states,
particularly with
recent faster
processors
PLD programmed so
that PIC occupies
the I/O address
range 0400H-0401H
SP=1 (Master)
Cascading Multiple 8259aAs
 Figure 12–17 shows two 8259As connected to the microprocessor in a way often found in the ATX-
style computer, which has two 8259As for interrupts.
 The XT- or PC-style computers use a single 8259A controller at interrupt vectors 08H–0FH
 The ATX-style computer uses interrupt vector 0AH as a cascade input from a second 8259A located at
vectors 70H through 77H.
 This circuit uses vectors 08H–0FH and I/O ports 0300H and 0302H for U1, the master; and vectors
70H–77H and I/O ports 0304H and 0306H for U2, the slave. Notice that we also include data bus
buffers to illustrate the use of the SP/EN pin on the 8259A.
 These buffers are used only in very large systems that have many devices connected to their data bus
connections.
 In practice, we seldom find these buffers.
12–6 SUMMARY
 An interrupt is a hardware- or software-initiated call that interrupts the currently executing
program at any point and calls a procedure.
 The procedure is called by the interrupt handler or an interrupt service procedure.
 Interrupts are useful when an I/O device needs to be serviced only occasionally at low data
transfer rates.
 The microprocessor has five instructions that apply to interrupts: BOUND, INT, INT 3, INTO,
and IRET.
 The INT and INT 3 instructions call procedures with addresses stored in the interrupt vector
whose type is indicated by the instruction.
 The BOUND instruction is a conditional interrupt that uses interrupt vector type number 5.
 The INTO instruction is a conditional interrupt that interrupts a program only
if the overflow flag is set.
 Finally, the IRET, IRETD, or IRETQ instruction is used to return from interrupt service
procedures.
 The microprocessor has three pins that apply to its hardware interrupt structure.
 Real mode interrupts are referenced through a vector table that occupies memory locations
0000H-03FFH.
 Each interrupt vector is four bytes long and contains the offset and segment addresses of the
interrupt service procedure.
 In protected mode, the interrupts reference the interrupt descriptor table (IDT) that contains 256
interrupt descriptors
 Two flag bits are used with the interrupt structure of the microprocessor: trap (TF) and interrupt enable (IF).
 The IF flag bit enables the INTR interrupt input.
 TF flag bit causes interrupts to occur after the execution of each instruction, as long as TF is active.
 The first 32 interrupt vector locations are reserved for Intel use, with many pre-defined in the
microprocessor.
 The last 224 interrupt vectors are for the user's use and can perform any function desired.
 Whenever an interrupt is detected, the following events occur:
(1) the flags are pushed onto the stack
(2) the IF and TF flag bits are both cleared.
(3) the IP and CS registers are both pushed onto the stack.
(4) the interrupt vector is fetched from the interrupt vector table and the interrupt service subroutine is
accessed through the vector address.
 Tracing or single-stepping is accomplished by setting the TF flag bit.
 This causes an interrupt to occur after the execution of each instruction for debugging.
 The non-maskable interrupt input (NMI) calls the procedure whose address is stored at interrupt
vector type number 2.
 This input is positive edge-triggered.
 The INTR pin is not internally decoded, as is the NMI pin.
 Methods of applying the interrupt vector type number to the data bus vary widely.
 One method uses resisters to apply interrupt type number FFH to the data bus, while another uses a
three-state buffer to apply any vector type number.
 The 8259A programmable interrupt controller (PIC) adds at least eight interrupt in-puts to the
microprocessor.
 If more interrupts are needed, this device can be cascaded to provide up to 64 interrupt inputs.

More Related Content

What's hot

Interrupts
InterruptsInterrupts
Interrupts
Albin Panakkal
 
Interrupts
InterruptsInterrupts
Interrupts
deval patel
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
Albin Panakkal
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
Adarsh Patel
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Gaditek
 
Computer registers
Computer registersComputer registers
Computer registers
DeepikaT13
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
kamal kotecha
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
PDFSHARE
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
Darshan sai Reddy
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-busAnuj Modi
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
.AIR UNIVERSITY ISLAMABAD
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
N.Jagadish Kumar
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
Sadaf Rasheed
 
Register Organization of 80386
Register Organization of 80386Register Organization of 80386
8086 labmanual
8086 labmanual8086 labmanual
8086 labmanualiravi9
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
Tanzeela_Hussain
 
COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7
Dr.MAYA NAYAK
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
Dr.MAYA NAYAK
 
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dhrumil Panchal
 
Ipv4 presentation
Ipv4 presentationIpv4 presentation
Ipv4 presentation
shakeel khan
 

What's hot (20)

Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Computer registers
Computer registersComputer registers
Computer registers
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-bus
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Register Organization of 80386
Register Organization of 80386Register Organization of 80386
Register Organization of 80386
 
8086 labmanual
8086 labmanual8086 labmanual
8086 labmanual
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
 
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
 
Ipv4 presentation
Ipv4 presentationIpv4 presentation
Ipv4 presentation
 

Viewers also liked

Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
Vijay Kumar
 
sistem mikroprosessor 2
sistem mikroprosessor 2sistem mikroprosessor 2
sistem mikroprosessor 2
yasir_cesc
 
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
inaz2
 
Types Of Operating System
Types Of Operating SystemTypes Of Operating System
Types Of Operating System
Syeda Urooba
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
Nikhil Sharma
 
8086 Microprocessor by Nitish Nagar
8086 Microprocessor by Nitish Nagar8086 Microprocessor by Nitish Nagar
8086 Microprocessor by Nitish Nagar
Nitish Nagar
 
Asynchronous Serial Communication and standards
Asynchronous Serial Communication and standardsAsynchronous Serial Communication and standards
Asynchronous Serial Communication and standards
Mathivanan Natarajan
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introduction
ANJUSHA R
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
Vijay Kumar
 
Android vs ios System Architecture in OS perspective
Android vs ios System Architecture in OS perspectiveAndroid vs ios System Architecture in OS perspective
Android vs ios System Architecture in OS perspective
Raj Pratim Bhattacharya
 
8251 USART
8251 USART8251 USART
8251 USART
coolsdhanesh
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
sobhadevi
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
Ankita Jaiswal
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
Mohammad Alam
 

Viewers also liked (20)

Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
sistem mikroprosessor 2
sistem mikroprosessor 2sistem mikroprosessor 2
sistem mikroprosessor 2
 
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
Abusing Interrupts for Reliable Windows Kernel Exploitation (en)
 
Types Of Operating System
Types Of Operating SystemTypes Of Operating System
Types Of Operating System
 
Data serial
Data serialData serial
Data serial
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
Coa INTERUPT
Coa INTERUPTCoa INTERUPT
Coa INTERUPT
 
8086 Microprocessor by Nitish Nagar
8086 Microprocessor by Nitish Nagar8086 Microprocessor by Nitish Nagar
8086 Microprocessor by Nitish Nagar
 
Asynchronous Serial Communication and standards
Asynchronous Serial Communication and standardsAsynchronous Serial Communication and standards
Asynchronous Serial Communication and standards
 
Microprocessors 1-8086
Microprocessors 1-8086Microprocessors 1-8086
Microprocessors 1-8086
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introduction
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
 
Android vs ios System Architecture in OS perspective
Android vs ios System Architecture in OS perspectiveAndroid vs ios System Architecture in OS perspective
Android vs ios System Architecture in OS perspective
 
Interrupts
InterruptsInterrupts
Interrupts
 
8251 USART
8251 USART8251 USART
8251 USART
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 

Similar to Ch12 microprocessor interrupts

Assembly programming
Assembly programmingAssembly programming
Assembly programming
Omar Sanchez
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptx
JasaRChoudhary
 
Micro overview
Micro overviewMicro overview
Micro overview
lamamokalled
 
Linux interrupts
Linux interruptsLinux interrupts
Linux interrupts
Faisal Hassan
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
SharmilaChidaravalli
 
Intel+80286
Intel+80286Intel+80286
Intel+80286
Dhanwantari Sali
 
Intel® 80386 microprocessor registers
Intel® 80386 microprocessor registersIntel® 80386 microprocessor registers
Intel® 80386 microprocessor registers
Neel Shah
 
Advanced Microprocessors
Advanced MicroprocessorsAdvanced Microprocessors
Advanced Microprocessors
BuddiesSairamit
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
KanchanPatil34
 
7 Interrupt.ppt
7 Interrupt.ppt7 Interrupt.ppt
7 Interrupt.ppt
IshtiaqueAhmedTanim
 
Ec 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsEc 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsMerin Jesuraj
 
COA_UNIT_I.pptx
COA_UNIT_I.pptxCOA_UNIT_I.pptx
COA_UNIT_I.pptx
ssuser8f9783
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
Bisrat Girma
 
486 or 80486 DX Architecture
486 or 80486 DX Architecture486 or 80486 DX Architecture
486 or 80486 DX Architecture
Muthusamy Arumugam
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
jeronimored
 
Interrupt11
Interrupt11Interrupt11
Interrupt11Aisu
 

Similar to Ch12 microprocessor interrupts (20)

Assembly programming
Assembly programmingAssembly programming
Assembly programming
 
Al2ed chapter14
Al2ed chapter14Al2ed chapter14
Al2ed chapter14
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptx
 
Micro overview
Micro overviewMicro overview
Micro overview
 
Important questions
Important questionsImportant questions
Important questions
 
Linux interrupts
Linux interruptsLinux interrupts
Linux interrupts
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
 
Intel+80286
Intel+80286Intel+80286
Intel+80286
 
Intel® 80386 microprocessor registers
Intel® 80386 microprocessor registersIntel® 80386 microprocessor registers
Intel® 80386 microprocessor registers
 
Advanced Microprocessors
Advanced MicroprocessorsAdvanced Microprocessors
Advanced Microprocessors
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
 
Interrupt
InterruptInterrupt
Interrupt
 
7 Interrupt.ppt
7 Interrupt.ppt7 Interrupt.ppt
7 Interrupt.ppt
 
Ec 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsEc 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applications
 
Important questions
Important questionsImportant questions
Important questions
 
COA_UNIT_I.pptx
COA_UNIT_I.pptxCOA_UNIT_I.pptx
COA_UNIT_I.pptx
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
 
486 or 80486 DX Architecture
486 or 80486 DX Architecture486 or 80486 DX Architecture
486 or 80486 DX Architecture
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 
Interrupt11
Interrupt11Interrupt11
Interrupt11
 

More from University of Technology - Iraq

www.pptx
www.pptxwww.pptx
Security problems.pptx
Security problems.pptxSecurity problems.pptx
Security problems.pptx
University of Technology - Iraq
 
Information System (IS) life cycle.pptx
Information System (IS) life cycle.pptxInformation System (IS) life cycle.pptx
Information System (IS) life cycle.pptx
University of Technology - Iraq
 
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
University of Technology - Iraq
 
Performance and traffic management for WSNs
Performance and traffic management for WSNsPerformance and traffic management for WSNs
Performance and traffic management for WSNs
University of Technology - Iraq
 
IP address and Domain name
IP address and Domain nameIP address and Domain name
IP address and Domain name
University of Technology - Iraq
 
Computer science mcq alle books4u
Computer science mcq   alle books4uComputer science mcq   alle books4u
Computer science mcq alle books4u
University of Technology - Iraq
 
Switches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontrollerSwitches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontroller
University of Technology - Iraq
 
VANET
VANETVANET
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
University of Technology - Iraq
 
Wavelet Transform and DSP Applications
Wavelet Transform and DSP ApplicationsWavelet Transform and DSP Applications
Wavelet Transform and DSP Applications
University of Technology - Iraq
 
FSK, PSK, QAM
FSK, PSK, QAMFSK, PSK, QAM
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATIONSCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
University of Technology - Iraq
 

More from University of Technology - Iraq (19)

www.pptx
www.pptxwww.pptx
www.pptx
 
Security problems.pptx
Security problems.pptxSecurity problems.pptx
Security problems.pptx
 
Information System (IS) life cycle.pptx
Information System (IS) life cycle.pptxInformation System (IS) life cycle.pptx
Information System (IS) life cycle.pptx
 
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
Performance Evaluation for Software Defined Networking (SDN) Based on Adaptiv...
 
Performance and traffic management for WSNs
Performance and traffic management for WSNsPerformance and traffic management for WSNs
Performance and traffic management for WSNs
 
IP address and Domain name
IP address and Domain nameIP address and Domain name
IP address and Domain name
 
Computer science mcq alle books4u
Computer science mcq   alle books4uComputer science mcq   alle books4u
Computer science mcq alle books4u
 
Switches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontrollerSwitches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontroller
 
VANET
VANETVANET
VANET
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
 
Wavelet Transform and DSP Applications
Wavelet Transform and DSP ApplicationsWavelet Transform and DSP Applications
Wavelet Transform and DSP Applications
 
FSK, PSK, QAM
FSK, PSK, QAMFSK, PSK, QAM
FSK, PSK, QAM
 
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATIONSCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
SCHEDULING DAGs WITHOUT CONSIDERING COMMUNICATION
 
DSB-SC Demodulation using matlab
DSB-SC Demodulation using matlabDSB-SC Demodulation using matlab
DSB-SC Demodulation using matlab
 
Main memory-2 (ch8,os)
Main memory-2 (ch8,os)Main memory-2 (ch8,os)
Main memory-2 (ch8,os)
 
CMOS
CMOSCMOS
CMOS
 
Wap
WapWap
Wap
 
8086 microprocessor lab manual
8086 microprocessor lab manual8086 microprocessor lab manual
8086 microprocessor lab manual
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 

Recently uploaded

What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
amberjdewit93
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 

Recently uploaded (20)

What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 

Ch12 microprocessor interrupts

  • 1. Chapter 12: interrupts Prepared by: Afrah Salman Supervised by: Dr. Hassan A.
  • 2. Introduction  In this chapter, the coverage of basic I/O and programmable peripheral interfaces is expanded by examining a technique called interrupt-processed I/O.  An interrupt is a hardware-initiated procedure that interrupts whatever program is currently executing.  This chapter provides examples and a detailed explanation of the interrupt structure of the entire Intel family of microprocessors. Chapter objectives 1. Explain the interrupt structure of the Intel family of microprocessors. 2. Explain the operation of software interrupt instructions INT, INTO, INT3, and BOUND. 3. Explain how the interrupt enable flag bit (IF) modifies the interrupt structure. 4. Describe the function of the trap interrupt flag bit (TF) and the operation of trap-generated tracing. 5. Develop interrupt-service procedures that control lower-speed, external peripheral devices. 6. Expand the interrupt structure of the microprocessor by using the 82S9A programmable interrupt controller and other techniques.
  • 3. 12–1 BASIC INTERRUPT PROCESSING  This section discusses the function of an interrupt in a microprocessor-based system.  Structure and features of interrupts available to Intel microprocessors. The Purpose of Interrupts  Interrupts are useful when interfacing I/O devices at relatively low data transfer rates, such as keyboard inputs.  Interrupt processing allows the processor to execute other software while the keyboard operator is thinking about what to type next.  When a key is pressed, the keyboard encoder debounces the switch and puts out one pulse that interrupts the microprocessor.
  • 4. A time line shows typing on a keyboard, a printer removing data from memory, and a program executing. The keyboard interrupt service procedure, called by the keyboard interrupt, and the printer interrupt service procedure each take little time to execute.
  • 5. Interrupts  Intel processors include two hardware pins (INTR and NMI) that request interrupts and one hardware pin (INTA) to acknowledge the interrupt requested through INTR.  The processor also has software interrupts INT, INTO, INT 3, and BOUND.  Flag bits IF (interrupt flag) and TF (trap flag), are also used with the interrupt structure and special return instruction IRET (or IRETD in the 80386, 80486, or Pentium-Pentium4). Interrupt vectors  Interrupt vectors and the vector table are crucial to an understanding of hardware and software interrupts.  The interrupt vector table is located in the first 1024 bytes of memory at addresses 000000H– 0003FFH.  It contains 256 different four-byte interrupt vectors.  An interrupt vector contains the address (segment and offset) of the interrupt service procedure.
  • 6. – The first five interrupt vectors are identical in all Intel processors (from 8086 to Pentium). Other interrupt vectors exist for the 80286 that are upward-compatible to the 80386, 80486, and Pentium–Core2, but not downward-compatible to the 8086 or 8088. Example: an INT 80H or INT 128 calls the interrupt service procedure whose address is stored in vector type number 80H (000200H–00203H).
  • 7. Intel dedicated interrupts  Type 0: The divide error whenever the result from a division overflows or an attempt is made to divide by zero.  Type 1: Single-step or trap occurs after execution of each instruction if the trap (TF) flag bit is set. * Upon accepting this interrupt, TF bit is cleared so the interrupt service procedure executes at full speed.  Type 2: The non-maskable interrupt occurs when a logic 1 is placed on the NMI input pin to the microprocessor. * Non-maskable means that it cannot be disabled.  Type 3: A special one-byte instruction (INT3) that uses this vector to access its interrupt-service procedure. * Often used to store a breakpoint in a program for debugging.  Type 4: Overflow is a special vector used with the INTO instruction. The INTO instruction interrupts the program if an overflow condition exists, as reflected by the overflow flag (OF).
  • 8.  TYPE 5: The BOUND instruction compares a register with boundaries stored in the memory. If the contents of the register are greater than or equal to the first word in memory and less than or equal to the second word, no interrupt occurs because the contents of the register are within bounds, elsewhere, type 5 interrupt ensues.  TYPE 6: An invalid opcode interrupt occurs whenever an undefined opcode is encountered in a program.  TYPE 7: The coprocessor not available interrupt occurs when a coprocessor is not found in the system, as dictated by the machine status word (MSW or CR0) coprocessor control bits. If an ESC or WAIT instruction executes and the coprocessor is not found, a type 7 exception or interrupt occurs.  TYPE 8: A double fault interrupt is activated whenever two separate interrupts occur during the same instruction.  TYPE 9: The coprocessor segment overrun occurs if the ESC instruction (coprocessor opcode) memory operand extends beyond offset address FFFFH in real mode.
  • 9.  TYPE 10: An invalid task state segment interrupt occurs in the protected mode if the TSS is invalid because the segment limit field is not 002BH or higher. In most cases, this is caused because the TSS is not initialized.  TYPE 11: The segment not present interrupt occurs when the protected mode P bit (P = 0) in a descriptor indicates that the segment is not present or not valid.  TYPE 12: A stack segment overrun occurs if the stack segment is not present (P = 0) in the protected mode or if the limit of the stack segment is exceeded.  TYPE 13: The general protection fault occurs for most protection violations in the 80286–Core2 protected mode system. (These errors occur in Windows as general protection faults.) A list of these protection violations follows: (a) Descriptor table limit exceeded. (b) Privilege rules violated. (c) Invalid descriptor segment type loaded. (d) Write to code segment that is protected. (e) Read from execute-only code segment. (f) Write to read-only data segment. (g) Segment limit exceeded.
  • 10.  Type 14: Page fault interrupts occur for any page fault memory or code access in 80386, 80486, and Pentium–Core2 microprocessors.  Type 16: Coprocessor error takes effect when a coprocessor error (ERROR = 0) occurs for ESC or WAIT instructions for 80386, 80486, and Pentium–Core2 microprocessors only.  TYPE 17: Alignment checks indicate that word and double word data are addressed at an odd memory location (or an incorrect location, in the case of a double word). This interrupt is active in the 80486 and Pentium–Core2 microprocessors.  TYPE 18: A machine check activates a system memory management mode interrupt in the Pentium–Core2 microprocessors.
  • 11.
  • 12. Interrupt instructions: BOUND, INTO, INT, INT 3, AND IRET  Five software interrupt instructions are available to the microprocessor:  INT and INT 3 are very similar.  BOUND and INTO are conditional.  IRET is a special interrupt return instruction.  BOUND has two operands, and compares a register with two words of memory data.  Example: BOUND AX,DATA; AX is compared with the contents of DATA and DATA+1 and also with DATA+2 and DATA+3. If AX is less than the contents of DATA and DATA+1, or If AX is greater than DATA+2 and DATA+3, a type 5 interrupt occurs. If AX is within the bounds of these two memory words, no interrupt occurs.
  • 13.  INTO checks or tests the overflow flag (O).  If O = 1, INTO calls the procedure whose address is stored in interrupt vector type 4.  If O = 0, INTO performs no operation and the next sequential program instruction executes.  INT3 instruction is often used as a breakpoint-interrupt because it is easy to insert a one-byte instruction into a program. – breakpoints are often used to debug software.  The IRET instruction is a special return instruction used to return for both software and hardware interrupts. – much like a far RET, it retrieves the return address from the stack
  • 14.  In the 80386–Core2, there is also an IRETD instruction because these microprocessors can push the EFLAG register (32 bits) on the stack, as well as the 32-bit EIP in the protected mode and 16-bit code segment register. If operated in the real mode, we use the IRET instruction with the 80386–Core2 microprocessors. If the Pentium 4 operates in 64-bit mode, an IRETQ instruction is used to return from an interrupt. The IRETQ instruction pops the EFLAG register into RFLAGS and also the 64-bit return address is placed into the RIP register.
  • 15. Operation of a real mode interrupt  When the processor completes executing the current instruction, it determines whether an interrupt is active by checking:  instruction executions  single-step  NMI  coprocessor segment overrun  INTR  INT instructions in the order presented
  • 16.  If one or more are present: 1. Flag register contents are pushed on the stack 2. Interrupt (IF) & trap (TF) flags clear, disabling the INTR pin and trap or single-step feature 3. Contents of the code segment register (CS) are pushed onto the stack 4. Contents of the instruction pointer (IP) are pushed onto the stack 5. Interrupt vector contents are fetched and placed into IP and CS so the next instruction executes at the interrupt service procedure addressed by the vector.
  • 17. Operation of a protected mode interrupt  In protected mode, interrupts have the same assignments as real mode, but the interrupt vector table is different  In place of interrupt vectors, protected mode uses a set of 256 interrupt descriptors stored in an interrupt descriptor table (IDT). The table is 256 × 8 (2K) bytes long, with each descriptor contains eight bytes.  The interrupt descriptor table is located at any memory location in the system by the interrupt descriptor table address register (IDTR).  Each IDT entry contains the address of the interrupt service procedure in the form of a segment selector and a 32-bit offset address. It also contains the P bit (present) and DPL bits to describe the privilege level of the interrupt. Figure 12–3 shows interrupt descriptor contents.
  • 18. Other than the IDT and interrupt descriptors, the protected mode interrupt functions like the real mode interrupt. We return from both interrupts using the IRET or IRETD instruction. The only difference is that in protected mode the microprocessor accesses the IDT instead of the interrupt vector table.
  • 19. Interrupt flag bits  The interrupt flag (IF) and the trap flag (TF) are both cleared after the contents of the flag register are stacked during an interrupt.  The contents of the flag register and the location of IF and TF are shown in figure 12-4. – when IF=1, it allows the INTR pin to cause an interrupt. – when IF=0, it prevents the INTR pin from causing an interrupt. – when TF=1, it causes a trap interrupt (type 1) to occur after each instruction execution. Trap is often called a single-step. – when TF=0, normal program execution occurs. – The interrupt flag is set and cleared by the STI and CLI instructions, respectively. There are no special instructions that set or clear the trap flag.
  • 20. shows an interrupt service procedure that turns tracing on by setting the trap flag bit on the stack from inside the procedure. shows an interrupt service procedure that turns tracing off by clearing the trap flag on the stack from within the procedure.
  • 21. Trace procedure  Assuming TRON is accessed by an INT 40H instruction and TROFF is by an INT 41H instruction, Example 12–3 traces through a program immediately following the INT 40H instruction.  The interrupt service procedure illustrated in Example 12–3 responds to interrupt type 1 or a trap interrupt.  Each time that a trap occurs—after each instruction executes following INT 40H—the TRACE procedure stores the contents of all the 32-bit microprocessor registers in an array called REGS. This provides a register trace of all the instructions between the INT 40H (TRON) and INT 41H (TROFF) if the contents of the registers stored in the array are saved.
  • 22.
  • 23. Storing an interrupt vector in the vector table  Storing an interrupt vector also called Hook.  The assembler must address absolute memory.  The following example shows how to install new interrupt vector.
  • 24.
  • 25. 12–2 HARDWARE INTERRUPTS • The two processor hardware interrupt inputs: Non-maskable interrupt (NMI). Interrupt request (INTR). • Intel has reserved interrupts 00H - 1FH for internal and future expansion. • INTA’ is also an interrupt pin on the processor. It is an output used in response to INTR input to apply a vector type number to the data bus connections D7–D0. Works in response to INTR i/p to apply vector type no. to the data bus connections D0-D7.
  • 26.  The non-maskable interrupt (NMI) is an edge-triggered input that requests an interrupt on the positive edge (0-to-1 transition).  After a positive edge, the NMI pin must remain logic 1 until recognized by the microprocessor; Before the positive edge is recognized, NMI pin must be logic 0 for at least two clocking periods.  The NMI input is often used for parity errors and other major faults, such as power failures.  Power failures are easily detected by monitoring the AC power line and causing an NMI interrupt whenever AC power drops out.  In response to this type of interrupt, the microprocessor stores all of the internal register in a battery-backed-up memory or an EEPROM.
  • 27.  Figure 12–6 shows a power failure detection circuit that provides logic 1 to the NMI input whenever AC power is interrupted.  In this circuit, an optical isolator provides isolation from the AC power line.  The interrupt service procedure stores the contents of all internal registers and other data into a battery-backed-up memory.  This system assumes the PC power supply has a large enough filter capacitor to provide energy for at least 75ms after the AC power ceases.
  • 28. Power to processor doesn’t fall instantly due to large smoothing capacitors in power supply… This gives some time to save things CR time constant chosen to give 33 ms output pulse at Q Optical coupling to isolate mains 60 Hz Square wave (interval = 16.7 ms) i.e. will trigger the monostable to give a constant 1 at Q until a power failure occurs when Q goes low, #Q goes high Retriggerable monostable NMI Power failure interrupt to processor diodes are used to switch supply voltages from the DC power supply to the battery If the AC power fails, the 74LS122 no longer receives trigger pulses from the 74ALS14, which means that Q returns to a logic 0 and Q returns to a logic 1, interrupting the microprocessor through the NMI pin.
  • 29.  Figure 12–7 shows a circuit that supplies power to a memory after the DC power fails.  When DC power fails, the battery provides a reduced voltage to the VCC connection on the memory device.  Most memory devices will retain data with VCC voltages as low as 1.5 V, so the battery voltage does not need to be +5.0 V.  The WR pin is pulled to VCC during a power outage, so no data will be written to the memory.
  • 30. Here diodes are used to switch supply voltages from the DC power supply to the battery. The diodes used are standard silicon diodes because the power supply to this memory circuit is elevated above +5.0V to +5.7V.
  • 31. INTR and INTA  The interrupt request input (INTR) is level-sensitive, which means that it must be held at a logic 1 level until it is recognized.  INTR is set by an external event and cleared inside the interrupt service procedure.  It is automatically disabled once accepted by the microprocessor and re-enabled by IRET at the end of the interrupt service procedure.  80386–Core2 use IRETD in protected mode. In 64-bit protected mode, IRETQ is used.  The processor responds to INTR by pulsing INTA output in anticipation of receiving an interrupt vector type number on data bus connections D7–D0.  Fig. 12–8 shows the timing diagram for the INTR and pins of the microprocessor. Two INTA pulses generated by the system insert the vector type number on the data bus.  Fig.12–9 shows a circuit to apply interrupt vector type number FFH to the data bus in response to an INTR.
  • 32.
  • 33.
  • 34. Actions by the interrupting device:  Put Interrupt type number on processor data bus upon #INTA low.  Raise INTR to the Processor . Raise INTR to the processor until acknowledged.  More details in the next two slides.
  • 35. Using a Three-state Buffer for INTA • Fig 12–10 shows how interrupt vector type number 80H is applied to the data bus (D0–D7) in response to an INTR. • In response to INTR, the microprocessor outputs the INTA to enable a 74ALS244 three-state octal buffer. • The octal buffer applies the interrupt vector type number to the data bus in response. • The vector type number is easily changed with DIP switches shown in this illustration.
  • 36. Making INTR input Edge-Triggered • INTR input can be converted to an edge- triggered input by using a D-type flip-flop, as illustrated in Figure 12–11. • Clock input becomes an edge-triggered interrupt request input, and the clear input is used to clear the request when the INTA signal is output by the microprocessor. • The RESET signal initially clears the flip- flop so that no interrupt is requested when the system is first powered.
  • 37. The 82C55 Keyboard Interrupt  Fig. 12–12 shows interconnection of an 82C55 with the microprocessor and keyboard.  The 82C55 is decoded at 80386SX I/O port address 0500H, 0502H, 0504H, and 0506H by a PLD (the program is not illustrated). The 82C55 is operated in mode 1 (strobed input mode), so whenever a key is typed, the INTR output (PC3) becomes a logic 1 and requests an interrupt through the INTR pin on the microprocessor. The INTR pin remains high until the ASCII data are read from port A.  Every time a key is typed, 82C55 requests a type 40H interrupt through the INTR pin. . The DAV signal from the keyboard causes data to be latched into port A and causes INTR to become a logic 1.  Example 12–5 illustrates the interrupt service procedure for the keyboard.  The procedure is short because the processor already knows that keyboard data are available when the procedure is called.
  • 38.
  • 39.
  • 40. A full condition is indicated when the input pointer (INP) is one byte below the output pointer (OUTP). If the FIFO is full, the interrupt is disabled with a bit set/reset command to the 82C55, and a return from the interrupt occurs.
  • 41.
  • 42. 12–3 EXPANDING THE INTERRUPT STRUCTURE  This section covers three common methods of expanding the interrupt structure of the processor: 1. Hardware: Additional NAND gate for 7 interrupts (as an expansion for the circuit shown in Figure 12-10). 2. Software: Daisy chaining of interrupts by software polling. 3. A Programmable Interrupt Controller (PIC) - the 8259A - for up to 64 interrupts.
  • 43. Using the 74ALS244 to Expand Interrupts • The modification shown in Fig 12–13 allows the circuit of Fig 12–10 to accommodate up to seven additional interrupt inputs. • The only hardware change is the addition of an eight-input NAND gate, which provides the INTR signal to the microprocessor when any of the IR inputs becomes active. 7 Interrupt lines Vector number now determined by the interrupting line MSB = 1 LSB 0 1
  • 44. Operation • If any of the IR inputs becomes logic 0, the output of the NAND gate goes to logic 1 and requests an interrupt through the INTR input. • The interrupt vector that is fetched during the pulse depends on which interrupt request line becomes active. • Table 12–1 shows the interrupt vectors used by a single interrupt request input. • If two or more interrupt requests are active, a new interrupt vector is generated.
  • 45. Daisy-Chained Interrupt  Better approach – Uses only one interrupt vector (and therefore one ISR).  The hardware will give no direct indication as to the source(s) of the interrupts. So, the ISR itself will determine this by polling the devices taking part in generating the combined interrupt request.  The ISR resolves priorities and execute the section of ISR code corresponding to the interrupt of the highest propriety.  Fig. 12–14 shows a two 82C55 peripheral interfaces with their four INTR outputs daisy-chained and connected to the single INTR input of the processor. If any interrupt output becomes logic 1, so does INTR input, causing an interrupt.  Example 12–7 illustrates the interrupt service procedure that responds to the daisy-chain interrupt request. The procedure polls each 82C55 and each INTR output to decide which interrupt service procedure to utilize.
  • 46. • The task of locating which INTR output became active is up to the interrupt service procedure, which must poll the 82C55s to determine which output caused the interrupt.
  • 47.
  • 48. 12–4 8259A PROGRAMMABLE INTERRUPT CONTROLLER  8259A (PIC) adds eight vectored priority encoded interrupts to the microprocessor.  Expandable, without additional hardware, to accept up to 64 interrupt requests.  It requires a master 8259A & eight 8259A slaves.  A pair of these controllers still resides and is programmed as explained here in the latest chip sets from Intel and other manufacturers.
  • 49. General Description of the 8259A 8259A is easy to connect to the microprocessor because all of its pins are direct connections except the CS pin, which must be decoded, and the WR pin, which must have an I/O bank write pulse. used to request an interrupt and to connect to a slave in a system with multiple 8259As.
  • 51. CAS0 –CAS2 The cascade lines are used as outputs from the master to the slaves for cascading multiple 8259As in a system. SP/EN Slave program/enable buffer is a dual-function pin. when the 8259A is in buffered mode, this output controls the data bus transceivers in a large microprocessor-based system. when the 8259A is not in the buffered mode, this pin programs the device as a master (1) or a slave (0). Remember that we can connect PIC's together. This allows us to provide support for up to 64 IR numbers. In other words--64 hardware interrupts. CAS0, CAS1, and CAS2 pins provide a way to send signals between these PIC's.
  • 52.
  • 53. Connecting a Single 8259A  Fig. 12–16 shows a single 8259A connected to the microprocessor. Here the pin SP/EN* is pulled high to indicate that it is a master.  The 8259A is decoded at I/O ports 0400H and 0401H by the PLD.  The 8259A requires four wait states for it to function properly with a 16 MHz 80386SX more for some other versions of the Intel microprocessor family.
  • 54. PIC is slow, so it needs to request wait states, particularly with recent faster processors PLD programmed so that PIC occupies the I/O address range 0400H-0401H SP=1 (Master)
  • 55. Cascading Multiple 8259aAs  Figure 12–17 shows two 8259As connected to the microprocessor in a way often found in the ATX- style computer, which has two 8259As for interrupts.  The XT- or PC-style computers use a single 8259A controller at interrupt vectors 08H–0FH  The ATX-style computer uses interrupt vector 0AH as a cascade input from a second 8259A located at vectors 70H through 77H.  This circuit uses vectors 08H–0FH and I/O ports 0300H and 0302H for U1, the master; and vectors 70H–77H and I/O ports 0304H and 0306H for U2, the slave. Notice that we also include data bus buffers to illustrate the use of the SP/EN pin on the 8259A.  These buffers are used only in very large systems that have many devices connected to their data bus connections.  In practice, we seldom find these buffers.
  • 56.
  • 57.
  • 58. 12–6 SUMMARY  An interrupt is a hardware- or software-initiated call that interrupts the currently executing program at any point and calls a procedure.  The procedure is called by the interrupt handler or an interrupt service procedure.  Interrupts are useful when an I/O device needs to be serviced only occasionally at low data transfer rates.  The microprocessor has five instructions that apply to interrupts: BOUND, INT, INT 3, INTO, and IRET.  The INT and INT 3 instructions call procedures with addresses stored in the interrupt vector whose type is indicated by the instruction.  The BOUND instruction is a conditional interrupt that uses interrupt vector type number 5.
  • 59.  The INTO instruction is a conditional interrupt that interrupts a program only if the overflow flag is set.  Finally, the IRET, IRETD, or IRETQ instruction is used to return from interrupt service procedures.  The microprocessor has three pins that apply to its hardware interrupt structure.  Real mode interrupts are referenced through a vector table that occupies memory locations 0000H-03FFH.  Each interrupt vector is four bytes long and contains the offset and segment addresses of the interrupt service procedure.  In protected mode, the interrupts reference the interrupt descriptor table (IDT) that contains 256 interrupt descriptors
  • 60.  Two flag bits are used with the interrupt structure of the microprocessor: trap (TF) and interrupt enable (IF).  The IF flag bit enables the INTR interrupt input.  TF flag bit causes interrupts to occur after the execution of each instruction, as long as TF is active.  The first 32 interrupt vector locations are reserved for Intel use, with many pre-defined in the microprocessor.  The last 224 interrupt vectors are for the user's use and can perform any function desired.  Whenever an interrupt is detected, the following events occur: (1) the flags are pushed onto the stack (2) the IF and TF flag bits are both cleared. (3) the IP and CS registers are both pushed onto the stack. (4) the interrupt vector is fetched from the interrupt vector table and the interrupt service subroutine is accessed through the vector address.
  • 61.  Tracing or single-stepping is accomplished by setting the TF flag bit.  This causes an interrupt to occur after the execution of each instruction for debugging.  The non-maskable interrupt input (NMI) calls the procedure whose address is stored at interrupt vector type number 2.  This input is positive edge-triggered.  The INTR pin is not internally decoded, as is the NMI pin.  Methods of applying the interrupt vector type number to the data bus vary widely.  One method uses resisters to apply interrupt type number FFH to the data bus, while another uses a three-state buffer to apply any vector type number.  The 8259A programmable interrupt controller (PIC) adds at least eight interrupt in-puts to the microprocessor.  If more interrupts are needed, this device can be cascaded to provide up to 64 interrupt inputs.