dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 368

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ADDA
Operation:
S + D → D
S1 + S2 → D
Description: Add an AGU register or immediate value to an AGU register or a data ALU register, and store the re-
Example:
Explanation of Example:
Condition Codes Affected:
Instruction Fields:
A-24
Operation
ADDA
Before Execution
R0
R1
sult in the second AGU register, a separate address pointer register, or the N register. The addition is
performed using 24-bit two’s-complement arithmetic. Immediate values that are less than 24 bits in
length are either sign extended or zero extended to 24 bits before the addition takes place. Refer to
Section 6.8.4.3 on page 6-28 when using “ADDA #<immediate_value>,Rn” in Modulo Addressing.
ADDA
The address pointer register R0 initially contains $005000, while R1 initially contains $17C624. When
the ADDA #$254,R0,R1 instruction is executed, the immediate hexadecimal value 254 is added to
the value in R0, and the result is stored in address register R1.
The condition codes are not affected by this instruction
#xxxxxx,HHH,Rn
(no parallel move)
(no parallel move)
#xxxxxx,Rn,Rn
#<0–15>,Rn,N
#xxxx,HHH,Rn
#xxxx,Rn,Rn
#<0–15>,Rn
#xxxxxx,Rn
Operands
17C624
#xxxx,Rn
005000
Rn,Rn,N
#$254,R0,R1
Rn,Rn
DSP56800E Core Reference Manual
Add AGU Register
C
1
1
1
1
2
2
3
3
4
5
; add hex 254 to R0 and store the result in R1
W
1
1
1
1
2
2
3
3
2
3
Assembler Syntax:
ADDA
ADDA
Add first operand to the second and store the result in the sec-
ond operand.
Add first operand to the second and store result in the N regis-
ter.
Add unsigned 4-bit value to Rn.
Add an unsigned 4-bit value to an AGU register and store
result in the N register.
Add first register with a signed 17-bit immediate value and
store the result in Rn.
An alternate syntax for the preceding instruction if the second
source and the destination are the same.
Add first register with a 24-bit immediate value and store the
result in Rn.
An alternate syntax for the preceding instruction if the second
source and the destination are the same.
Add a data register with an unsigned 16-bit value and store
the result in Rn. HHH is accessed as a signed 16-bit word.
Add a data register with a 24-bit immediate value and store
the result in Rn. HHH is accessed as a signed 16-bit word.
After Execution
R0
R1
S,D
S1,S2,D (no parallel move)
005000
005254
Comments
(no parallel move)
Freescale Semiconductor
ADDA

Related parts for dsp56800e