Texas Instruments MSP430x1xx User Manual page 79

Texas instruments modules and peripherals user's guide
Table of Contents

Advertisement

* INV[.W]
Invert destination
* INV.B
Invert destination
Syntax
INV
INV.B
Operation
.NOT.dst −> dst
Emulation
XOR
Emulation
XOR.B
Description
The destination operand is inverted. The original contents are lost.
Status Bits
N: Set if result is negative, reset if positive
Z: Set if dst contained 0FFFFh, reset otherwise
C: Set if result is not zero, reset otherwise ( = .NOT. Zero)
V: Set if initial destination operand was negative, otherwise reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
Content of R5 is negated (twos complement).
MOV
INV
INC
Example
Content of memory byte LEO is negated.
MOV.B
INV.B
INC.B
dst
dst
#0FFFFh,dst
#0FFh,dst
Set if dst contained 0FFh, reset otherwise
Set if result is not zero, reset otherwise ( = .NOT. Zero)
#00AEh,R5 ;
R5
; Invert R5,
R5
; R5 is now negated,
#0AEh,LEO ;
LEO
; Invert LEO,
LEO
; MEM(LEO) is negated,MEM(LEO) = 052h
Instruction Set
R5 = 000AEh
R5 = 0FF51h
R5 = 0FF52h
MEM(LEO) = 0AEh
MEM(LEO) = 051h
RISC 16−Bit CPU
3-43

Advertisement

Table of Contents
loading

Table of Contents