bsr
Branch to subroutine
Pushes the return address onto the stack and branches to the specified address.
Sizes .b .s .w .l
Used in
- bsr, rts, link and unlkM68K assembly
- A subroutine with its arguments in registersM68K assembly
- Stack arguments and a stack frameM68K assembly
- Recursion: factorial and FibonacciM68K assembly
- Print a number in any base without helpM68K assembly
- Drawing shapes on the screenM68K assembly
- The snake gameM68K assembly
- Flappy birdM68K assembly
- Play a WAV and a MIDI fileM68K assembly
- ChiptuneM68K assembly
XNZVC –––––
- Changes no flag
Forms
bsr
Operands
label- A branch target, written as a label or address. The assembler calculates the relative displacement. More
move.l #10, d0
bsr add_two
move.l d0, d1 ; d1 = 12
bra END
add_two:
addq.l #2, d0
rts
END: