Texas Instruments MSP430x1xx User Manual

Page 375

Advertising
background image

Instruction Set Overview

B-25

Instruction Set Description

* DEC[.W]

Decrement destination

* DEC.B

Decrement destination

Syntax

DEC

dst or

DEC.W

dst

DEC.B

dst

Operation

dst – 1 –> dst

Emulation

SUB

#1,dst

Emulation

SUB.B

#1,dst

Description

The destination operand is decremented by one. The original contents are
lost.

Status Bits

N: Set if result is negative, reset if positive
Z: Set if dst contained 1, reset otherwise
C: Reset if dst contained 0, set otherwise
V: Set if an arithmetic overflow occurs, otherwise reset.

Set if initial value of destination was 08000h, otherwise reset.
Set if initial value of destination was 080h, otherwise reset.

Mode Bits

OscOff, CPUOff, and GIE are not affected.

Advertising