






















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























































Interrupt is a process where an externaldevice can get the attention of themicroprocessor.^ ๏
The process starts from the I/O device ๏ The process is asynchronous. ๏^
An interrupt is considered to be anemergency signal that may be serviced.^ ๏
The Microprocessor may respond to it assoon as possible.
๏ง^
The processor will break its routine ๏ง^
Go to a different routine (interrupt service routine) ๏ง^
Complete the interrupt service routine(ISR) ๏ง^
Go back to the โregularโ routine
processor:^ ๏ง
Should be able to
accept
interrupts (interrupt
enable) ๏ง^
Save the last content of the program counter ๏ง^
Know where to go in program memory to execute the ISR ๏ง^
Tell the outside world that it is executing an interrupt ๏ง^
Go back to the saved PC location when finished.
Main
routine
Interrupt
Save program counter
Disable interrupts
Send
out interupt acknowledge
Service
routine
INTA
Go^
to service routine
Get original program counter Go back
EI RET
-^
Interrupts can be classified into two types:^ ๏^
Maskable Interrupts (Can be delayed orRejected) ๏^
Non-Maskable Interrupts (Can not bedelayed or Rejected)
-^
Interrupts can also be classified into:
๏^
Vectored (the address of the serviceroutine is hard-wired) ๏^
Non-vectored (the address of the serviceroutine needs to be supplied externallyby the device)
Maskable & Nonmaskable INT
Responding to an interrupt may beimmediate or delayed depending onwhether the interrupt is maskable or non-maskable and whether interrupts are beingmasked or not. ๏ MP completes its current machine cycle.
completed.
during which the PC is saved and control istransferred to an appropriate memorylocation.
with the location transferred to, the highestpriority device requesting an interrupt isidentified.
A subroutine is executed which servicesthe interrupt I/O device.
The saved state of the microprocessor isrestored.
Control is returned to the instruction thatfollows the interrupted instruction.
๏^
The INTR input.^ ๏^
The INTR input is the only non-vectoredinterrupt. ๏^
INTR is maskable using the EI/DIinstruction pair. ๏^
RST 5.5, RST 6.5, RST 7.5 are allautomatically vectored.^ ๏^
RST 5.5, RST 6.5, and RST 7.5 are allmaskable.
TRAPRST7.5RST6.5RST 5.5INTRINTA
An interrupt vector is a pointer to where theISR is stored in memory. ๏ All interrupts (vectored or otherwise) aremapped onto a memory area called theInterrupt Vector Table (IVT). ๏ The IVT is usually located in memory page00 (0000H - 00FFH).