Bird
0
0

What happens to the link register (LR) during a nested subroutine call in ARM architecture?

easy📝 Conceptual Q1 of 15
ARM Architecture - Subroutines and Stack
What happens to the link register (LR) during a nested subroutine call in ARM architecture?
AIt holds the address of the nested subroutine permanently
BIt is cleared to zero
CIt is ignored during nested calls
DIt stores the return address of the current subroutine before calling the next
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of LR in subroutine calls

    The link register (LR) holds the return address so the program knows where to continue after a subroutine finishes.
  2. Step 2: Analyze nested calls effect on LR

    During nested calls, LR is updated to store the return address of the current subroutine before jumping to the next one, preserving the call chain.
  3. Final Answer:

    It stores the return address of the current subroutine before calling the next -> Option D
  4. Quick Check:

    LR usage in nested calls = store return address [OK]
Quick Trick: LR always saves return address before next call [OK]
Common Mistakes:
  • Thinking LR is cleared or ignored
  • Assuming LR holds nested subroutine address permanently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes