INSTRUCTION DESCRIPTIONS
A - 22 INSTRUCTION SET DETAILS MOTOROLA
Operation: Assembler Syntax:
| D | D (parallel move) ABS 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 A,Y0 ;take abs. value, set up X0, save value
:
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:
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.
ABS Absolute Value ABS
Before Execution After Execution
A A
$FF:FFFFFF:FFFFF2 $00:000000:00000E
MR CCR
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LF DM T ** S1 S0 I1 I0 SLEUNZVC