
Instruction Set Description
4.6.3.10 DADCX
* DADCX.A
Add carry decimally to destination address-word
* DADCX.[W]
Add carry decimally to destination word
* DADCX.B
Add carry decimally to destination byte
DADCX.A dst
Syntax
DADCX dst
or
DADCX.W dst
DADCX.B dst
Operation
dst + C
→
dst (decimally)
DADDX.A #0,dst
Emulation
DADDX #0,dst
DADDX.B #0,dst
Description
The carry bit (C) is added decimally to the destination.
Status Bits
N:
Set if MSB of result is 1 (address-word > 79999h, word > 7999h, byte > 79h), reset
if MSB is 0
Z:
Set if result is zero, reset otherwise
C:
Set if the BCD result is too large (address-word > 99999h, word > 9999h, byte >
99h), reset otherwise
V:
Undefined
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The 40-bit counter, pointed to by R12 and R13, is incremented decimally.
DADDX.A
#1,0(R12)
; Increment lower 20 bits
DADCX.A
0(R13)
; Add carry to upper 20 bits
195
SLAU272C – May 2011 – Revised November 2013
CPUX
Copyright © 2011–2013, Texas Instruments Incorporated