English
Language : 

Z86E3016PSG Datasheet, PDF (310/348 Pages) Zilog, Inc. – Z86E3016PSG
Z8 Family of Microcontrollers
User Manual
292
Return
RET
Instruction Format
OPC
Cycles
14
OPC
(Hex)
AF
Operation
PC ← @SP
SP ← SP + 2
This instruction is normally used to return from a procedure entered by a
CALL instruction. The contents of the location addressed by the SP are
popped into the PC. The next statement executed is the one addressed by
the new contents of the PC. The stack pointer is also incremented by two.
Flag
C
Z
S
V
D
H
Description
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Note: Each PUSH instruction executed within the subroutine should be coun-
tered with a POP instruction in order to guarantee the SP is at the correct
location when the RET instruction is executed. Otherwise the wrong
address will be loaded into the PC and the program will not operate as
appropriate .
Instruction Description
UM001602-0904