0
0
ARM Architectureknowledge~10 mins

Nested subroutine calls 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 named 'func1'.

ARM Architecture
[1] func1
Drag options to blanks, or click blank then click option'
ABL
BB
CBX
DMOV
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'B' instead of 'BL' which does not save the return address.
Forgetting to specify the subroutine name after the instruction.
2fill in blank
medium

Complete the code to call 'func2' from within 'func1'.

ARM Architecture
func1:
    BL [1]
    BX LR
Drag options to blanks, or click blank then click option'
Afunc2
Bmain
Cfunc3
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Calling the wrong subroutine name.
Using 'BX LR' instead of 'BL' to call the subroutine.
3fill in blank
hard

Fix the error in the nested call where 'func3' is called incorrectly.

ARM Architecture
func2:
    BL [1]
    BX LR
Drag options to blanks, or click blank then click option'
Afunc2
Bmain
Cfunc1
Dfunc3
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'func1' or 'func2' instead of 'func3'.
Using 'BX LR' instead of 'BL' for the call.
4fill in blank
hard

Fill both blanks to correctly call 'func2' and then return from 'func1'.

ARM Architecture
func1:
    [1] [2]
    BX LR
Drag options to blanks, or click blank then click option'
ABL
Bfunc2
CB
Dfunc3
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'B' instead of 'BL' for the call.
Calling the wrong subroutine name.
5fill in blank
hard

Fill all three blanks to call 'func3' from 'func2' and then return properly.

ARM Architecture
func2:
    [1] [2]
    [3] LR
Drag options to blanks, or click blank then click option'
ABL
Bfunc3
CBX
Dfunc1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'B' instead of 'BL' for the call.
Calling the wrong subroutine name.
Using incorrect return instruction.