Bird
0
0

In ARM assembly, which instruction is used to set a condition flag based on the comparison of two registers?

easy📝 Conceptual Q1 of 15
ARM Architecture - Control Flow Instructions
In ARM assembly, which instruction is used to set a condition flag based on the comparison of two registers?
AADD
BMOV
CCMP
DSTR
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of CMP

    The CMP instruction compares two registers and sets condition flags based on the result.
  2. Step 2: Identify other instructions' roles

    MOV copies data, ADD adds values, STR stores data; none set condition flags.
  3. Final Answer:

    CMP sets condition flags after comparison -> Option C
  4. Quick Check:

    Comparison instruction = CMP [OK]
Quick Trick: CMP sets flags for if-else decisions in ARM assembly [OK]
Common Mistakes:
  • Confusing MOV with CMP
  • Using ADD to compare
  • Thinking STR sets flags

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes