RTS
Operation:
(M
(SP)
Description:
Restores context at the end of a subroutine. Loads the program counter
with a 16-bit value pulled from the stack and increments the stack pointer
by two. Program execution continues at the address restored from the
stack.
Condition Codes and Boolean Formulas:
S
–
None affected.
Addressing Modes, Machine Code, and Execution Times:
Source Form
RTS
MOTOROLA
6-178
Return from Subroutine
) ⇒ PC
: M
(SP + 1)
H
X
H
I
N
Z
–
–
–
–
–
Address Mode
INH
3D
INSTRUCTION GLOSSARY
; (SP) + $0002 ⇒ SP
: PC
L
V
C
–
–
Object Code
RTS
Cycles
Access Detail
5
UfPPP
CPU12
REFERENCE MANUAL