11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ABS Absolute Value ABSOperation:I D I ..... D (parallel move)Assembler Syntax:ABS D (parallel move)Description: Take the absolute value <strong>of</strong> the destination operand D and store the resultin the destination accumulator.Example:ABS A 1 #$123456,XO A,YO ;take abs. value, set up XO, save valueAI ~ ___Before Execution$_FF_:F_F_FF_F_F:F_F_FF_F_2 __ ~After ExecutionA ~I ___ $_O_o:o_o_oo_oo_:o_OO_OO_E __ --'Explanation <strong>of</strong> Example: Prior to execution, the 56-bit A accumulator contains thevalue $FF:FFFFFF:FFFFF2. Since this is a negative number, the execution <strong>of</strong> the ABSinstruction takes the twos complement <strong>of</strong> that value and returns $OO:OOOOOO:OOOOOE.Note: For the case in which the D operand equals $80:000000:000000 (-256.0), theABS instruction will cause an overflow to occur since the result cannot be correctly expressedusing the standard 56-bit, fixed-point, twos-complement data representation.Data limiting does not occur (Le., A is not set to the limiting value <strong>of</strong>$7F:FFFFFF:FFFFFF).Condition Codes:I15 14 13 12 11 10 9 8 7 6 5 4 3 2 0LF I OM 1 T I" 1 S1 1 SO 1 11 1 10 I "I LIE 1 U 1 N 1 z vic I.... MR ...... CCR .....-S - Computed according to the definition in A.5 CONDITION CODE COMPUTATION.L - Set if limiting (parallel move) or overflow has occurred in resultE - Set if the signed integer portion <strong>of</strong> A or B result is in useU - Set if A or B result is unnormalizedN - Set if bit 55 <strong>of</strong> A or B result is setZ- Set if A or B result equals zeroV - Set if overflow has occurred in A or B resultNote: The definitions <strong>of</strong> the E and U bits vary according to the scaling mode being used.Refer to Section A.5 for complete details.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!