dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 618

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
SUB.L
Operation:
D – S →
Description: Subtract a long-word value in memory or a 16-bit signed immediate value from the destination register,
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
A-274
Before Execution
A2
D
0
and store the result in the destination (D). Source values are internally sign extended to 36 bits before
the subtraction. 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 ad-
dresses pointing 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.
SUB.L
Prior to execution, the 36-bit A accumulator contains the value $0:3158:1234. The SUB.L instruction
automatically sign extends the immediate value to 36 bits and subtracts the result from the A accumu-
lator. The 36-bit result ($0:3158:0234) is stored back into the accumulator.
E
U
N
Z
V
C
LF
15
— Set if the extension portion of the result is in use
— Set if the 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 borrow occurs from bit 31 of the result
(no parallel move)
3158
P4
14
A1
#$1000,A
13
P3
SR
P2
12
MR
DSP56800E Core Reference Manual
P1
11
1234
0300
A0
P0
10
Subtract Long
; subtract hex 1000 from A accumulator
I1
9
Assembler Syntax:
SUB.L
I0
8
SZ
7
After Execution
6
L
A2
0
5
E
S,D
U
4
CCR
3158
A1
N
3
(no parallel move)
SR
2
Z
Freescale Semiconductor
V
1
0234
0310
C
0
A0
SUB.L

Related parts for dsp56800e