dsp56000 Freescale Semiconductor, Inc, dsp56000 Datasheet - Page 290

no-image

dsp56000

Manufacturer Part Number
dsp56000
Description
24-bit Digital Signal Processor Family Manual
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Operation:
Description: Add the source operand S and the carry bit C of the condition code register
to the destination operand D and store the result in the destination accumulator. Long
words (48 bits) may be added to the (56-bit) destination accumulator.
Note:
erands if the extension register of the destination accumulator (A2 or B2) is the sign
extension of bit 47 of the destination accumulator (A or B).
Example:
Explanation of Example: This example illustrates long-word double-precision (96-bit)
addition using the ADC instruction. Prior to execution of the ADD and ADC instructions,
the double-precision 96-bit value $000000:000001:800000:000000 is loaded into the Y
and X registers (Y:X), respectively. The other double-precision 96-bit value
$000000:000001:800000:000000 is loaded into the B and A accumulators (B:A), respec-
tively. Since the 48-bit value loaded into the A accumulator is automatically sign
extended to 56 bits and the other 48-bit long-word operand is internally sign extended to
56 bits during instruction execution, the carry bit will be set correctly after the execution
of the ADD X,A instruction. The ADC Y,B instruction then produces the correct MS 56-bit
A - 24
ADC
S+C+D
MOVE L:<$0,X
MOVE L:<$1,A
MOVE L:<$2,Y
ADD X,A L:<$3,B
ADC Y,B A10,L:<$4
MOVE B10,L:<$5
The carry bit is set correctly for multiple precision arithmetic using long-word op-
A
X
B
Y
:
:
D (parallel move)
$FF:800000:000000
$00:000000:000001
Before Execution
$800000:000000
$000000:000001
Freescale Semiconductor, Inc.
For More Information On This Product,
INSTRUCTION DESCRIPTIONS
INSTRUCTION SET DETAILS
Go to: www.freescale.com
Add Long with Carry
;get a 48-bit LS long-word operand in X
;get other LS long word in A (sign ext.)
;get a 48-bit MS long-word operand in Y
;add LS words; get other MS word in B
;add MS words with carry, save LS sum
;save MS sum
Assembler Syntax:
A
X
B
Y
ADC S,D (parallel move)
$FF:000000:000000
$00:000000:000003
$800000:000000
$000000:000001
After Execution
MOTOROLA
ADC

Related parts for dsp56000