In ARM assembly, what is the main way subroutines help organize code?
Think about how repeating the same instructions multiple times affects code size and clarity.
Subroutines let you write a block of instructions once and call it whenever needed, which keeps code organized and avoids repetition.
Choose the best reason why subroutines help debugging in ARM assembly code.
Think about how breaking code into parts affects finding mistakes.
Subroutines break code into smaller parts, making it easier to test and fix specific sections without affecting the whole program.
Analyze how subroutines affect memory use in ARM assembly programs.
Consider what happens if the same instructions are repeated many times without subroutines.
Subroutines let the program store one copy of code and reuse it, saving memory compared to copying instructions everywhere.
Which statement correctly compares inline code and subroutine calls?
Think about the trade-off between repeating code and the cost of jumping to subroutines.
Inline code duplicates instructions, increasing size but avoiding call overhead. Subroutines save space but add time for jumps and returns.
When an ARM assembly program calls a subroutine, what is the correct sequence of events?
Consider how the program knows where to continue after the subroutine finishes.
ARM saves the return address before jumping to the subroutine so it can return to the correct place after running it.