0
0
ARM Architectureknowledge~10 mins

Branch instruction (B) 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 write a branch instruction that jumps to the label 'loop'.

ARM Architecture
B [1]
Drag options to blanks, or click blank then click option'
Astart
Bloop
Cend
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using a label that does not exist in the code.
Forgetting to write the label after the B instruction.
2fill in blank
medium

Complete the code to branch to the label 'exit' conditionally.

ARM Architecture
B[1] exit
Drag options to blanks, or click blank then click option'
AGT
BAL
CEQ
DNE
Attempts:
3 left
💡 Hint
Common Mistakes
Using unconditional branch (B) when a condition is needed.
Using wrong condition codes that do not match the desired condition.
3fill in blank
hard

Fix the error in the branch instruction to correctly jump to 'func'.

ARM Architecture
B [1]
Drag options to blanks, or click blank then click option'
Afunc
Bfunc()
C#func
D*func
Attempts:
3 left
💡 Hint
Common Mistakes
Adding parentheses after the label name.
Using immediate value syntax (#) incorrectly.
4fill in blank
hard

Fill both blanks to create a conditional branch that jumps to 'retry' if greater than zero.

ARM Architecture
B[1] [2]
Drag options to blanks, or click blank then click option'
AGT
BLT
Cretry
Dfail
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong condition code like LT instead of GT.
Jumping to the wrong label.
5fill in blank
hard

Fill all three blanks to create a branch instruction with condition 'NE' to label 'loop_start' and add a comment.

ARM Architecture
B[1] [2] ; [3]
Drag options to blanks, or click blank then click option'
ANE
Bloop_start
Cbranch if not equal
DEQ
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong condition code like EQ instead of NE.
Forgetting to add a comment or using an unclear comment.