Motorola DSP56000 Manual page 288

24-bit digital signal processor
Hide thumbs Also See for DSP56000:
Table of Contents

Advertisement

ABS
Operation:
| D |
D (parallel move)
Description: Take the absolute value of the destination operand D and store the result
in the destination accumulator.
Example:
:
ABS
A1
#$123456,X0
:
Before Execution
A
$FF:FFFFFF:FFFFF2
Explanation of Example: Prior to execution, the 56-bit A accumulator contains the
value $FF:FFFFFF:FFFFF2. Since this is a negative number, the execution of the ABS
instruction takes the twos complement of that value and returns $00:000000:00000E.
Note:
For the case in which the D operand equals $80:000000:000000 (-256.0), the
ABS instruction will cause an overflow to occur since the result cannot be correctly ex-
pressed using the standard 56-bit, fixed-point, twos-complement data representation.
Data limiting does not occur (i.e., A is not set to the limiting value of
$7F:FFFFFF:FFFFFF).
Condition Codes
:
15
14
13
LF
DM
S — Computed according to the definition in A.5 CONDITION CODE COMPUTATION.
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Set if overflow has occurred in A or B result
Note:
The definitions of the E and U bits vary according to the scaling mode being used.
Refer to Section A.5 for complete details.
A - 22
INSTRUCTION DESCRIPTIONS
Absolute Value
A,Y0
12
11
10
9
T
**
S1
S0
I1
MR
INSTRUCTION SET DETAILS
Assembler Syntax:
ABS D (parallel move)
;take abs. value, set up X0, save value
After Execution
A
$00:000000:00000E
8
7
6
5
4
I0
S
L
E
U
CCR
ABS
3
2
1
0
N
Z
V
C
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56k

Table of Contents