Semiconductor Group
4-65
1998-04-01
Instruction Set
C500 Family
RET
Function:
Return from subroutine
Description:
RET pops the high and low-order bytes of the PC successively from the stack,
decrementing the stack pointer by two. Program execution continues at the
resulting address, generally the instruction immediately following an ACALL or
LCALL. No flags are affected.
Example:
The stack pointer originally contains the value 0BH. Internal RAM locations 0AH
and 0BH contain the values 23H and 01H, respectively. The instruction
RET
will leave the stack pointer equal to the value 09H. Program execution will continue
at location 0123H.
Operation:
RET
(PC15-8)
¬
((SP))
(SP)
¬
(SP) Ð 1
(PC7-0)
¬
((SP))
(SP)
¬
(SP) Ð 1
Bytes:
1
Cycles:
2
Encoding:
0 0 1 0
0 0 1 0