0
0
ARM Architectureknowledge~10 mins

Branch and link (BL) for subroutines in ARM Architecture - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to call a subroutine using the branch and link instruction.

ARM Architecture
BL [1]
Drag options to blanks, or click blank then click option'
Amain
Bend
Cloop
Dsubroutine
Attempts:
3 left
💡 Hint
Common Mistakes
Using a label that is not a subroutine.
Confusing BL with a simple branch instruction (B).
2fill in blank
medium

Complete the code to return from a subroutine using the link register.

ARM Architecture
MOV PC, [1]
Drag options to blanks, or click blank then click option'
ALR
BR0
CSP
DR1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a general-purpose register instead of LR.
Forgetting to move the link register value to PC.
3fill in blank
hard

Fix the error in the code to correctly call the subroutine named 'process'.

ARM Architecture
[1]
Drag options to blanks, or click blank then click option'
ABL process
Bprocess
CBL_process
Dprocess()
Attempts:
3 left
💡 Hint
Common Mistakes
Adding parentheses to the label.
Using an incorrect label name.
4fill in blank
hard

Fill both blanks to complete the subroutine call and return sequence.

ARM Architecture
BL [1]
MOV PC, [2]
Drag options to blanks, or click blank then click option'
Ahandler
BLR
CR0
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using a general-purpose register instead of LR for return.
Using a label that is not a subroutine for BL.
5fill in blank
hard

Fill all three blanks to create a subroutine call, save a register, and return correctly.

ARM Architecture
PUSH { [1] }
BL [2]
POP { [3] }
MOV PC, LR
Drag options to blanks, or click blank then click option'
AR4
Bcompute
DR5
Attempts:
3 left
💡 Hint
Common Mistakes
Not saving and restoring registers properly.
Using different registers for push and pop.