rts

Return from subroutine

Returns from a subroutine by popping the return address from the stack and jumping to it.

XNZVC –––––
  • Changes no flag

Forms

  • rts
move.l #10, d0
bsr add_two
move.l d0, d1 ; d1 = 12
bsr add_two
move.l d0, d2 ; d2 = 14
bra END

add_two:
    addq.l #2, d0
    rts ; pops return address and jumps back

END: