Bird
0
0

Given the following Thumb-2 code snippet:

medium📝 Analysis Q4 of 15
ARM Architecture - Control Flow Instructions
Given the following Thumb-2 code snippet:
IT NE
MOVNE R0, #1
MOVEQ R1, #2
MOVNE R2, #3
MOVNE R3, #4

Which registers will be updated if the zero flag is clear?
AR0 and R1 only
BR1 only
CR1, R2, and R3
DR0, R2, and R3
Step-by-Step Solution
Solution:
  1. Step 1: Understand condition NE

    NE means 'not equal', so instructions with NE execute if zero flag is clear.
  2. Step 2: Identify instructions executed

    MOVNE R0, MOVNE R2, and MOVNE R3 execute; MOVEQ R1 executes only if zero flag is set.
  3. Final Answer:

    R0, R2, and R3 -> Option D
  4. Quick Check:

    Zero flag clear = NE instructions run [OK]
Quick Trick: NE condition runs when zero flag is clear [OK]
Common Mistakes:
  • Including MOVEQ instruction when zero flag is clear
  • Ignoring MOVNE instructions
  • Confusing NE and EQ conditions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes