Texas Instruments MSP430x1xx User Manual page 77

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

Advertisement

]
* INC[.W
Increment destination
* INC.B
Increment destination
Syntax
INC
INC.B
Operation
dst + 1 −> dst
Emulation
ADD
Description
The destination operand is incremented by one. 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 dst contained 0FFFFh, reset otherwise
V: Set if dst contained 07FFFh, reset otherwise
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The status byte, STATUS, of a process is incremented. When it is equal to 11,
a branch to OVFL is taken.
dst
or INC.W dst
dst
#1,dst
Set if dst contained 0FFh, reset otherwise
Set if dst contained 0FFh, reset otherwise
Set if dst contained 07Fh, reset otherwise
INC.B
STATUS
CMP.B
#11,STATUS
JEQ
OVFL
Instruction Set
RISC 16−Bit CPU
3-41

Advertisement

Table of Contents
loading

Table of Contents