RTS (ReTurn from Subroutine)
<Operation>
@SP+ → PC
<Assembly-Language Format>
RTS
<Examples>
RTS
<Operand Size>
—
<Description>
This instruction returns from a subroutine. It pops the program counter (PC) from the stack.
Program execution continues from the address restored to the program counter.
The PC contents at the time of execution of this instruction are lost.
<Instruction Formats>
Addressing
mode
Mnem.
Operands
RTS
<Condition Code>
I
— — — — — — — —
I: Previous value remains unchanged.
H: Previous value remains unchanged.
N: Previous value remains unchanged.
Z: Previous value remains unchanged.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
Instruction code
1st byte
2nd byte
5
4
7
0
103
H
N
Z
3rd byte
4th byte
RTS
V
C
No. of
states
8