RET
Return From Subroutine
7-142
Syntax RET
Operands None
Opcode
0123456789101112131415
0000000011110111
Execution (TOS) → PC
Pop stack one level.
Status Bits None
Description The contents of the top stack register are copied into the program counter. The
remaining stack values are then copied up one level. RET concludes subrou-
tines and interrupt service routines to return program control to the calling or
interrupted program sequence.
Words 1
Cycles for a Single RET Instruction
ROM
DARAM SARAM External
4 4 4 4+3p
Note: When this instruction reaches the execute phase of the pipeline, two additional instruc-
tion words have entered the pipeline. When the PC discontinuity is taken, these two
instruction words are discarded.
Example RET
Before Instruction After Instruction
PC 96h PC 37h
Stack 37h Stack 45h
45h 75h
75h 21h
21h 3Fh
3Fh 45h
45h 6Eh
6Eh 6Eh
6Eh 6Eh
Cycles