Category:Architecture/ARM/MOV

From aldeid
Jump to navigation Jump to search
You are here
MOV

Description

  • MOV{S}: Move
  • MVN: Move NOT.

Syntax

MOV{S}{cond} Rd, Operand2
MOV{cond} Rd, #imm16
MVN{S}{cond} Rd, Operand2

where:

S
Is an optional suffix. If S is specified, the condition code flags are updated on the result of the operation:
  • update the N and Z flags according to the result
  • can update the C flag during the calculation of Operand2
  • do not affect the V flag.
cond
Is an optional condition code, see Conditional execution.
Rd
Specifies the destination register.
Operand2
Is a flexible second operand. See Flexible second operand for details of the options.
imm16
This is any value in the range 0-65535.

Examples

MOVS  R11, #0x000B    ; Write value of 0x000B to R11, flags get updated
MOV   R1, #0xFA05     ; Write value of 0xFA05 to R1, flags are not updated
MOVS  R10, R12        ; Write value in R12 to R10, flags get updated
MOV   R3, #23         ; Write value of 23 to R3
MOV   R8, SP          ; Write value of stack pointer to R8
MVNS  R2, #0xF        ; Write value of 0xFFFFFFF0 (bitwise inverse of 0xF)
                      ; to the R2 and update flags.

This category currently contains no pages or media.