Program Control Instructions

发布于:2021-08-01 22:12:25

Interrupts A Course in Microprocessor Electrical Engineering Dept. University of Indonesia Chapter Objectives: ? Explain the interrupt structure of the Intel family of microprocessors ? Explain the operation of software interrupt instructions INT, INTO, ? ? ? ? ? INT 3, and BOUND Explain how the interrupt enable flag bit (IF) modifies the interrupt structure Describe the function of the trap interrupt flag bit (TF) and the operation of trap-generated tracing Develop interrupt service procedures that control lower speed external peripheral devices Expand the interrupt structure of the microprocessor using the 8259A programmable interrupt controller and other techniques Explain the purpose and operation of a real_time clock Basic Interrupt Processing ? The Purpose of Interrupts – 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. – Interrups are useful when an I/O device needs to be serviced only occasionally at low data transfer rates – Fig, 11-1 shows a time line that indicates a typist typing data on a keyboard, a printer removing data from the memory, and a program executing Basic Interrupt Processing (cont’d) ? Interrupts – the interrupts of the entire Intel family of microprocessor include : ? two hardware pins that request interrupts (INTR and NMI) and one hardware pin (INTA) that acknowledges the interrupt request through INTR. ? Software interrupts INT,INTO,INT 3, and BOUND ? Two flag bits, IF(interrupt flag) and TF (trap flag), are used with the interrupt structure and a special return instruction IRET (or IRETD in the 80386, 80486, or Pentium/Pentium Pro) Basic Interrupt Processing (cont’d) ? Interrupts Vectors – the interrpt vector table is located in the first 1,024 bytes of memory at addresses 000000H-0003FFH – it contains 256 different 4-byte interrupt vectors – an interrupt vector contains the address (segment and offset) of interrupt service procedure. ? Fig. 11-2 illustrates the interrupt vector table for the microprocessor Basic Interrupt Processing (cont’d) ? The Operation of a Real Mode Interrupt – When the microprocessor completes executing the current instruction, it determines whether an interrupt is active by checking (1) instruction executions (2) single-step (3) NMI (4) coprocessor segment overrun (5) INTR (6) INT instruction in the order presented B