EasyManuals Logo

ZiLOG Z8 Series User Manual

ZiLOG Z8 Series
261 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #194 background imageLoading...
Page #194 background image
Z8
®
CPU
User Manual
UM001604-0108 Instruction Description
187
Interrupt Return
Syntax
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 Reg-
ister (Control Register
FCh) and the PC. It also re-enables any interrupts that are poten-
tially enabled.
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:
IRET
Op Code: BF
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 is at location 6FE4h.
Cycles
OPC
(Hex)
OPC 16 8F
Flag Description
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.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ZiLOG Z8 Series and is the answer not in the manual?

ZiLOG Z8 Series Specifications

General IconGeneral
BrandZiLOG
ModelZ8 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals