English
Language : 

Z86E3016PSG Datasheet, PDF (172/348 Pages) Zilog, Inc. – Z86E3016PSG
Z8 Family of Microcontrollers
User Manual
154
Nesting of Vectored Interrupts
Nesting of vectored interrupts allows higher priority requests to interrupt
a lower priority request. To initiate vectored interrupt nesting, do the fol-
lowing during the interrupt service routine:
• Push the old IMR on the stack
• Load IMR with a new mask to disable lower priority interrupts
• Execute EI instruction
• Proceed with interrupt processing
• After processing is complete, execute DI instruction
• Restore the IMR to its original value by returning the previous mask
from the stack
• Execute IRET
Depending on the application, some simplification of the above procedure
may be possible.
Polled Processing
Polled interrupt processing is supported by masking off the IRQ to be
polled. This is accomplished by clearing the corresponding bits in the
IMR.
To enable any interrupt, first the interrupt mechanism must be engaged
with an EI instruction. If only polled interrupts are to be serviced, exe-
cute:
EI ;Enable interrupt mechanism
DI ;Disable vectored interrupts.
To initiate polled processing, check the bits of interest in the IRQ using
the Test Under Mask (TM) instruction. If the bit is set, call or branch to
Interrupts
UM001602-0904