Z8 Microcontrollers
Instruction Descriptions and Formats
IRET
Interrupt RETURN
IRET
Instruction Format:
Operation:
FLAGS <— @SP
SP <— SP + 1
PC <— @SP
SP <— SP + 2
IMR (7) <— 1
This instruction is issued at the end of an interrupt service routine. It restores the Flag Register (Control Register
FCH) and the PC. It also re-enables any interrupts that are potentially enabled.
Flags:
C:
Restored to original setting before the interrupt occurred.
Z:
Restored to original setting before the interrupt occurred.
S:
Restored to original setting before the interrupt occurred.
V:
Restored to original setting before the interrupt occurred.
D:
Restored to original setting before the interrupt occurred.
H:
Restored to original setting before the interrupt occurred.
Example:
If Stack Pointer Low Register FFH currently contains the value 45H, Register 45H contains the value 00H, Register
46H contains 6FH, and Register 47 Contains E4H, the statement:
restores the FLAG Register FCH with the value 00H, restores the PC with the value 6FE4H, re-enables the
interrupts, and sets the Stack Pointer Low to 48H. The next instruction to be executed will be at location 6FE4H.
12-34
IRET
Op Code: BF
ZiLOG
IRET
INTERRUPT RETURN
UM001601-0803
Need help?
Do you have a question about the Z8 and is the answer not in the manual?
Questions and answers