Complete the code to call a subroutine using the branch and link instruction.
BL [1]The BL instruction branches to the label subroutine and saves the return address in the link register.
Complete the code to return from a subroutine using the link register.
MOV PC, [1]To return from a subroutine, the program counter (PC) is set to the value in the link register (LR), which holds the return address.
Fix the error in the code to correctly call the subroutine named 'process'.
[1]The instruction B process is a simple branch and does not save the return address. To call a subroutine and save the return address, use BL process.
Fill both blanks to complete the subroutine call and return sequence.
BL [1] MOV PC, [2]
The BL handler calls the subroutine named handler. The instruction MOV PC, LR returns from the subroutine by loading the return address from the link register.
Fill all three blanks to create a subroutine call, save a register, and return correctly.
PUSH { [1] }
BL [2]
POP { [3] }
MOV PC, LRBefore calling the subroutine compute, the register R4 is saved on the stack with PUSH {R4}. After the subroutine returns, R4 is restored with POP {R4}. Finally, MOV PC, LR returns control to the caller.