amp_interrupt - Advanced Microprocessor 1 Interrupt •...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Advanced Microprocessor 1 Interrupt • Interrupt :- Triggers that cause the CPU to perform various tasks on demand • Three kinds: – Software interrupts - provide a mechanism whereby the programmer can use the INT instruction to access code that already exists (is resident) in machine memory – Hardware interrupts - triggered by hardware events external to the microprocessor, e.g., request for service by external devices such as disk drives – Exceptions - hardware origin within the microprocessor itself, e.g., an attempt to divide by zero Advanced Microprocessor 2 Interrupt • Regardless of source, they are handled the same – Each interrupt has a unique interrupt number from 0 to 255. These are called interrupt vectors. – For each interrupt vector, there is an entry in the interrupt vector table. – The interrupt vector table is simply a jump table containing segment:offset addresses of procedures to handle each interrupt – These procedures are called interrupt handlers or interrupt service routines (ISRs) Advanced Microprocessor 3 Interrupt Interrupt processing is an alternative to polling. Executing task on the Microprocessor The Intel microprocessors support hardware interrupts : • Two pins that allow interrupt requests, INTR and NMI • One pin that acknowledges, INTA, the interrupt requested on INTR. And software interrupts instructions: • INT, INTO, INT 3, BOUND Purpose of the Interrupts: Advanced Microprocessor 4 Interrupt Control is provided through • IF and TF flag bits • IRET and IRETD( 80386 – PENTIUM 4) special return instruction INT and INT3 behave in a similar way. INT n: Calls ISR located at vector n ( n * 4 ). The INT instruction requires two bytes of memory, opcode plus ‘n’ Ex: an INT 80h or INT 128 call interrupt service procedure, whose vector address is stored in (000200 to 000203) INT 3: 1 byte instruction, used as a break point interrupt, ( break point are used to debug faulty software) Advanced Microprocessor 5 Interrupt BOUND and INTO are both conditional. BOUND: has 2 operands, compares a register with two words of the memory data Ex: BOUND AX , DATA ; Compares AX with DATA AX is compared with DATA and DATA+1, if less than an interrupt occurs. AX is compared with DATA+2 and DATA+3, if greater than an interrupt occurs. a type 5 interrupt is occurred if not equal, otherwise no interrupt occurs. IRET: special instruction for both software & hardware , removes, 6 bytes from the stack,2 for IP,2 for CS and 2 for FLAGS. Advanced Microprocessor 6 Interrupt INTO: Checks the overflow flag (OF). If OF=1, the ISR is called, if OF=0, INTO performs no operation Interrupt vector: The interrupt vector table is located in the first 1024 bytes of memory at addresses 000000H through 0003FFH....
View Full Document

This note was uploaded on 02/23/2012 for the course CS 101 taught by Professor Martand during the Spring '10 term at Punjab Engineering College.

Page1 / 45

amp_interrupt - Advanced Microprocessor 1 Interrupt •...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online