MSP430 Instructions
4-76
16-Bit MSP430X CPU
* DADC[.W]
Add carry decimally to destination
* DADC.B
Add carry decimally to destination
Syntax
DADC
dst or DADC.W src,dst
DADC.B
dst
Operation
dst + C −> dst (decimally)
Emulation
DADD
#0,dst
DADD.B
#0,dst
Description
The carry bit (C) is added decimally to the destination.
Status Bits
N: Set if MSB is 1
Z: Set if dst is 0, reset otherwise
C: Set if destination increments from 9999 to 0000, reset otherwise
Set if destination increments from 99 to 00, reset otherwise
V: Undefined
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The four-digit decimal number contained in R5 is added to an eight-digit deci-
mal number pointed to by R8.
CLRC
; Reset carry
; next instruction’s start condition is defined
DADD
R5,0(R8)
; Add LSDs + C
DADC
2(R8)
; Add carry to MSD
Example
The two-digit decimal number contained in R5 is added to a four-digit decimal
number pointed to by R8.
CLRC
; Reset carry
; next instruction’s start condition is defined
DADD.B
R5,0(R8)
; Add LSDs + C
DADC
1(R8)
; Add carry to MSDs
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...