dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 363

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ADD.L
Operation:
S + D →
Description: Add a long-word value in memory or a 16-bit signed immediate value to the second operand, and store
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Freescale Semiconductor
Before Execution
A2
D
0
the result in the destination (D). Source values are internally sign extended to 36 bits before the addi-
tion. Condition codes are calculated based on the 32-bit result, with the exception of the E and U bits,
which are calculated based on the 36-bit result for accumulator destinations. Absolute addresses point-
ing to long elements must always be even aligned (that is, pointing to the lowest 16 bits).
This instruction can be used for both integer and fractional two’s-complement data.
ADD.L
Prior to execution, the 36-bit A accumulator contains the value $0:6666:1111. The ADD.L instruction
automatically sign extends the long value at address X:$4001:4000 to 36 bits and adds the result to the
A accumulator. The 32-bit result ($8888:2222) is stored back into the accumulator.
E
U
N
Z
V
C
LF
15
— Set if the extended portion of the 36-bit result is in use
— Set if the 36-bit result is unnormalized
— Set if bit 31 of the result is set
— Set if bits 31–0 of the result are zero
— Set if overflow has occurred in the result
— Set if a carry occurs from bit 31 of the result
(no parallel move)
6666
P4
14
A1
X:$4001
X:$4000
X:$4000,A
13
P3
SR
P2
12
MR
P1
11
1111
2222
1111
0300
A0
P0
10
Instruction Set Details
; add long value at word address $4001:4000
; to A accumulator
I1
9
Add Long
Assembler Syntax:
ADD.L
I0
8
SZ
7
After Execution
6
L
A2
0
5
E
S,D
U
4
CCR
8888
A1
X:$4001
X:$4000
N
3
(no parallel move)
SR
2
Z
V
1
032A
2222
2222
1111
C
0
A0
ADD.L
A-19

Related parts for dsp56800e