Texas Instruments MSP430x1xx User Manual page 57

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

Advertisement

ADC[.W]
Add carry to destination
ADC.B
Add carry to destination
Syntax
ADC
ADC.B
Operation
dst + C −> dst
Emulation
ADDC
ADDC.B #0,dst
Description
The carry bit (C) is added to the destination operand. The previous contents
of the destination are lost.
Status Bits
N: Set if result is negative, reset if positive
Z: Set if result is zero, reset otherwise
C: Set if dst was incremented from 0FFFFh to 0000, reset otherwise
V: Set if an arithmetic overflow occurs, otherwise reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The 16-bit counter pointed to by R13 is added to a 32-bit counter pointed to
by R12.
ADD
ADC
Example
The 8-bit counter pointed to by R13 is added to a 16-bit counter pointed to by
R12.
ADD.B
ADC.B
dst
or
ADC.W
dst
#0,dst
Set if dst was incremented from 0FFh to 00, reset otherwise
@R13,0(R12)
2(R12)
@R13,0(R12)
1(R12)
dst
; Add LSDs
; Add carry to MSD
; Add LSDs
; Add carry to MSD
RISC 16−Bit CPU
Instruction Set
3-21

Advertisement

Table of Contents
loading

Table of Contents