|
Z86E3016PSG Datasheet, PDF (173/348 Pages) Zilog, Inc. – Z86E3016PSG | |||
|
◁ |
Z8 CPU
User Manual
155
the service routine. The service routine services the request, resets its
Request Bit in the IRQ, and branches or returns back to the main pro-
gram. An example of a polling routine is as follows:
TM IRQ, #MASKA
JR Z, NEXT
CALL SERVICE
NEXT:
.
.
.
SERVICE:
.
.
.
AND IRQ, #MASKB
RET
;Test for request
;If no request go to NEXT
;If request is there, then
;service it
;Process Request
;Clear Request Bit
;Return to next
In this example, if IRQ2 is being polled, MASKA will be 00000100b
and MASKB will be 11111011b.
Reset Conditions
Upon reset, all bits in IPR are undeï¬ned.
In IMR, bit 7 is 0 and bits 0â6 are undeï¬ned. The IRQ register is reset and
held in that state until an enable interrupt (EI) instruction is executed.
UM001602-0904
Interrupts
|
▷ |