Interrupt Processing Haibo Wang ECE Department

Slides:



Advertisements
Similar presentations
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Advertisements

There are two types of addressing schemes:
10-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Subroutine and Interrupt.
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
Chapter 12: Interrupts. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel Microprocessors:
University of Tehran 1 Microprocessor System Design Interrupt Omid Fatemi
EE314 Microprocessor Systems
Intel MP.
6-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 Addressing modes.
Set 20 Interrupts. INTERRUPTS The Pentium has a mechanism whereby external devices can interrupt it. Devices such as the keyboard, the monitor, hard disks.
LOGO Chapter 1 Interrupt handling. hardware interrupt Under x86, hardware interrupts are called IRQ's. When the CPU receives an interrupt, it stops whatever.
3-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 (8086) Microprocessor.
8-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
9-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Introduction to Interrupts
Introduction to Computer Engineering by Richard E. Haskell Interrupts Module M17.3 Sections 11.3, 14.1.
8.4 Instruction Execution Times TOBIN PROC FAR SUB AX,AX MOV DX,AX MOV CX,4 NEXTD: PUSH CX SUB BP,BP MOV CX,4 GETNUM: RCL BX,1 RCL BP,1 LOOP GETNUM.
Interrupts – (Chapter 12)
Lecture 09: Interrupts & 8259.
Micro-Computer Applications: Procedures & Interrupts Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
1 Microprocessor-based Systems Course 8 Design of input/output interfaces.
8086 has 2 interrupt inputs 1. NMI 2. INTR For application where we have interrupts from multiple sources, use an external device called a Priority Interrupt.
Lecture 09: Interrupts & The 80x86 IBM PC and Compatible Computers Chapter 14 Interrupts and the 8259 Chip.
Interrupt Interrupt – to break the flow of speech or action of (someone) by saying or doing something (Longman dictionary)
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Interrupts Useful in dealing with: The interface: Random processes;
CHAPTER 6 INTERRUPTS AND THE 8259 CHIP. What happens on interrupt? Micro automatically saves (on stack) the FR (flag register), IP (instruction pointer),
8051 Micro controller. Architecture of 8051 Features of 8051.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
INT- interrupt program execution 1. It decrements the sp by 2 and pushes the flag registers on the stack. 2. Decrement the sp by 2 and push the content.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
Dec Hex Bin 14 E ORG ; FOURTEEN Interrupts In x86 PC.
Introduction to Assembly Language Programming 1. Overview of Assembly Language  Advantages:  Disadvantages: Faster as compared to programs written using.
8086 Interrupts and Interrupt Applications
EEL 3801 Part IV The Assembler. OFFSET Operator Returns address of variable used as operand. Actually, it represents the offset from the beginning of.
University of Tehran 1 Microprocessor System Design Programmable Interrupt Controller Omid Fatemi
Microprocessor System Design Programmable Interrupt Controller.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
BIOS and DOS Interrupts Basic Input /Outpu System Disk Operating System.
Internal Programming Architecture or Model
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
1 Interrupts A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
Interrupt Processing Sequence
Interrupts and interrupt responses
MICROPROCESSOR BASED SYSTEM DESIGN
Microprocessor and Assembly Language
Microprocessor Systems Design I
Timer and Interrupts.
Interrupts In 8085 and 8086.
Interrupts – (Chapter 12)
Instruksi Set Prosesor 8088
Machine control instruction
Intel 8088 (8086) Microprocessor Structure
Microprocessor and Assembly Language
8259 Chip The Intel 8259 is a family of Programmable Interrupt Controllers (PIC) designed and developed for use with the Intel 8085 and Intel 8086 microprocessors.
Symbolic Instruction and Addressing
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /20/2018.
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
Symbolic Instruction and Addressing
Chapter 6 –Symbolic Instruction and Addressing
Process.
Presentation transcript:

Interrupt Processing Haibo Wang ECE Department ECE 424 Design of Microprocessor-Based Systems Interrupt Processing Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901

Hardware and Software Interrupts An interrupt is an even that causes the processor to stop its current program execution and switch to performing an interrupt service routine. Hardware and Software Interrupts Hardware Interrupts are caused by proper inputs at NMI or INTR input pin Software Interrupts are caused by executing programs Interrupt Priority When multiple interrupts occur at the same time, the interrupt with the highest priority will be served Interrupt Type Interrupt type is used as the table index to search the address of interrupt service routine from the interrupt vector table

Interrupt Vector Table Interrupt vector table is used to store the addresses of interrupt service routine 00000 IP Type-0 Interrupt vector table contains 256 table entries. Each table entry takes 4 bytes; two bytes are for IP values and two bytes are for CS values CS Type-1 Interrupt vector table locates at the reserved memory space from 00000H to 003FFH ••••• Example: Assume that the interrupt service routine for the type-40 interrupt is located at address 28000H. How do you write this address to the vector table? Type-255 003FFH

Interrupt Processing Sequence Get Vector Number (get the interrupt type) Caused by NMI, it is type 2 Caused by INTR, the type number will be fed to the processor through data bus Caused by executing INT instructions, the type number is given by the operand ••• Save Processor Information Push flag register into stack Clear trace flag and interrupt-enable flag Push CS and IP into stack Fetch New Instruction Pointer Load new CS and IP values from the instruction vector table Execute interrupt service routine Return from interrupt service routine Pop flag register from stack Pop CS and IP from stack

Interrupt Service Routine An Interrupt Service Routine (ISR) is a section code that take care of processing a specific interrupt Some ISRs also contain instructions that save and restore restore general purpose registers Example: Interrupt Vector Table 1234:00AE PUSH AX PUSH DX MOV AX, 5 MUL BL MOV [DI], AX MOV [DI+2], DX POP DX POP AX IRET 000A4 AE 000A5 00 INT ? 000A6 34 000A7 12

Storing Environment During Interrupt Processing Done automatically By the processor User Program Interrupt Service routine Save flag and return address Save register Read ISR address from interrupt vector table ISR body INT Restore register Read return address and flag IRET

Special Interrupts Divide-Error Single-Step NMI Breakpoint Overflow Type-0 interrupt. It has the highest interrupt priority Single-Step Type-1 interrupt. It is generated after each instruction if the trace flag is set NMI Type-2 interrupt Breakpoint Type-3 interrupt. It is used for debug purposes Overflow Type-4 interrupt. It is generated by INTO when the overflow flag is set

Interrupt Example Instructions for update Interrupt Vector Table ISR An NMI Time Clock 120V 60Hz Schmitt trigger NMI 8088 Instructions for update Interrupt Vector Table MOV COUNT, 60 PUSH DS SUB AX, AX MOV DS, AX LEA AX, NMITIME MOV [8], AX MOV AX, CS MOV [0AH], AX POP DS ISR NMITIME: DEC COUNT JNZ EXIT MOV COUNT, 60 CALL FAR PTR ONESEC EXIT: IRET