ARM VERSION 1.2 Computer Hardware User Manual


 
Thumb Instruction Reference
5-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
5.3.4 MOV, MVN, and NEG
Move, Move NOT, and Negate.
Syntax
MOV Rd, #expr
MOV Rd, Rm
MVN Rd, Rm
NEG Rd, Rm
where:
Rd
is the destination register.
expr
is an expression that evaluates (at assembly time) to an integer in the
range 0-255.
Rm
is the source register.
Usage
The
MOV
instruction places
#expr
, or the value from
Rm
, in
Rd
.
The
MVN
instruction takes the value in
Rm
, performs a bitwise logical NOT operation on
the value, and places the result in
Rd
.
The
NEG
instruction takes the value in
Rm
, multiplies it by 1, and places the result in
Rd
.
Restrictions
In
MOV Rd,#expr
,
MVN
, and
NEG
instructions,
Rd
and
Rm
must be in the range r0 to r7.
In
MOV Rd, Rm
instructions,
Rd
and
Rm
can be any register r0 to r15, but see Condition flags
on page 5-29.