dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 352

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ABS
Operation:
|D| → D
|D| → D
Description: Take the absolute value of the destination operand (D) and store the result in the destination accumu-
Example:
Explanation of Example:
Note:
Condition Codes Affected:
A-8
Before Execution
A2
(one parallel move)
(no parallel move)
F
lator or 16-bit register. Duplicate destination is not allowed when this instruction is used in conjunction
with a parallel read.
ABS
Prior to execution, the 36-bit A accumulator contains the value $F:FFFF:FFF2. The execution of the
ABS instruction takes the two’s-complement of that value and returns $0:0000:000E.
When the D operand equals $8:0000:0000 (–16.0 when interpreted as a decimal fraction), the ABS in-
struction causes an overflow to occur since the result cannot be correctly expressed using the standard
36-bit, fixed-point, two’s-complement data representation. When saturation is enabled (SA = 1 in the
OMR register), data limiting will occur to value $F:8000:000. If saturation is not enabled, the value
will remain unchanged.
SZ — Set according to the standard definition of the SZ bit (parallel move)
L
E
U
N
Z
V
LF
15
— Set if limiting (parallel move) or overflow has occurred in result
— Set if the extended portion of accumulator result is in use
— Set according to the standard definition of the U bit
— Set if MSB of result is set
— Set if result equals zero
— Set if overflow has occurred in result
FFFF
P4
14
A1
A
13
P3
SR
P2
12
MR
DSP56800E Core Reference Manual
P1
11
X:(R0)+,Y0
FFF2
0301
A0
P0
10
Absolute Value
I1
9
Assembler Syntax:
ABS
ABS
I0
8
; take ABS value, move data into Y0,
; update R0
SZ
7
After Execution
6
L
A2
0
5
E
D
D
U
4
CCR
0000
A1
N
3
(one parallel move)
(no parallel move)
SR
2
Z
Freescale Semiconductor
V
1
000E
0311
C
0
A0
ABS

Related parts for dsp56800e