Download presentation
Presentation is loading. Please wait.
Published byKian Leyton Modified over 9 years ago
1
Lecture 12 Z80 Interrupt 동국대학교 홍유표 1
2
Y. Hong & E. Lee Polling vs. Interrupt Polling : Periodically check if an event occurs Interrupt : Event sends a signal to CPU 2
3
Y. Hong & E. Lee Interrupt An hardware-initiated subroutine call or jump that interrupts the currently executing program. Internal Interrupts : Divide by 0, undefined instruction, … External Interrupts : Keyboard input, … 3
4
Y. Hong & E. Lee Multiple Interrupt Sources Typically, there are multiple sources for interrupts CPU should be able to identify who generates the interrupt Also, there must be a way to give priority to interrupt sources 4
5
Y. Hong & E. Lee Interrupt Source Identification Polling Type Once an interrupt is received, CPU reads a status register of each device for interrupt generation check. Vector Type Once an interrupt is received, CPU sends an acknowledge signal (Low on M1 IORQ) to interrupt sources. Then the source sends its ID on data bus. 5
6
Y. Hong & E. Lee Interrupt Service Routine If an interrupt occurs, after the current instruction is finished an interrupt service routine is called. The interrupt service routine can be in a predefined location. (Mode 1 in Z80) Or, the corresponding routine is placed in the address of I + ID, where I is a interrupt vector register. (Mode 2 in Z80) 6
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.