•  Back 
  •  Instruction Set 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : MC56001 Documentation
Author      : JAY Software
Version     : 1.0 (19/11/1997)
Subject     : Programming/Assembler
Nodes       : 152
Index Size  : 4106
HCP-Version : 4
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : 
@help       : 
@options    : -i +y +z -t4
@width      : 100
View Ref-FileABS                     Absolute Value

Operation:
    |D|->D              (parallel move)

Assembler Syntax:
    ABS D               (parallel move)

Description:
    Take the absolute value of the destination operand D and store the
result in the destination accumulator.

Example:
    ABS A   #$123456,X0 A,Y0    ; Take abs. value, setup X0, save value

    Before execution:
        A = $FF:FFFFFF:FFFFF2
    After execution:
        A = $00:000000:00000E

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 expressed 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 12 11 10 09 08 07 06 05 04 03 02 01 00
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |L |**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |<-           MR         ->|<-       CCR      ->|

    L- Set if limiting (parallel move) or overflow has occured 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 is set
    Z- Set if A or B result equals zero
    V- Set if overflow has occured in A or B result

NOTE: The definition of the E and U bits varies according to the
scaling mode being used.

Instruction Format:
    ABS D

    D = (A,B)
 
Timing:     2+mv oscillator clock cycles

Memory:     1+mv programs words