# RTS Instruction

The instruction RTS (ReTurn from Subroutine) does the opposite to the instructions BSR (Branch to SubRoutine) and JSR (Jump to SubRoutine). The longword on top of the stack is stored in the program counter. The instruction is used when ending a subroutine. The execution will return to the instruction that follows the last JSR- or BSR- instruction.
ADDRESS METHODS: None
DATA LENGTH: N/A
FLAGS: Unaffected
SYNTAX: RTS

EXAMPLE CODE:

RTS returns to the address stored on the top of the stack