Bird
0
0

Consider this ARM assembly snippet:

medium📝 Analysis Q4 of 15
ARM Architecture - Power Modes
Consider this ARM assembly snippet:
MOV R0, #1
WFI
MOV R1, #2

What happens to the value in R1 after execution?
AR1 remains unchanged at 0
BR1 is immediately set to 2 without waiting
CR1 is set to 2 only after an interrupt wakes the CPU
DThe code causes a processor error
Step-by-Step Solution
Solution:
  1. Step 1: Understand WFI behavior in code flow

    The WFI instruction pauses execution until an interrupt occurs.
  2. Step 2: Analyze when MOV R1 executes

    The instruction setting R1 to 2 runs only after the CPU wakes from WFI.
  3. Final Answer:

    R1 is set to 2 only after an interrupt wakes the CPU -> Option C
  4. Quick Check:

    WFI pauses execution until interrupt [OK]
Quick Trick: WFI pauses next instructions until interrupt [OK]
Common Mistakes:
  • Assuming next instruction runs immediately
  • Thinking WFI resets registers
  • Believing code causes error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes