ARM Instruction Set
ARM Instruction Set
Set
Types of ARM Instructions
Data-processing instructions
Load and Store Instructions
Branching and Control Flow
Multiply Instructions
Comparison and Test Instructions
Conditional Execution
System Control Instructions
Condition Codes (Flags)
ARM instructions use condition flags to determine if an operation should be
executed. These flags are set by comparison instructions and other
operations:
SUB (Subtraction)
Clears bits in the first operand that are set in the second operand (bitwise AND followed by
negation).
Syntax: BIC <Rd>, <Rn>, <Rm>
Example: BIC R0, R1, R2 (R0 = R1 & ~R2)
Comparison Operations
CMP (Compare)
Subtracts the second operand from the first and updates the condition flags, but
does not store the result.
Syntax: CMP <Rn>, <Rm>
Example: CMP R1, R2 (Updates flags based on R1 - R2)
Arithmetic Shift Left (ASL) is same as logical shift left. Arithmetic Shift Right
(ASR) by 0 to 32 places, fill the vacated bits at the most significant end of the
word with zeros if the source operand was positive and with ones it is
negative.
Rotate Right (ROR)
Rotate right by 0 to 32 places. The last bit rotated out is available
in the carry flag. Rotate left instruction is not used in ARM
processor. Rotate left by "n" positions is the same as a rotate
right by (32 - n).