Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TMS320C2x DSP - syntax [<label>] abs http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      [<LABEL>] abs

OPERANDS    None

EXECUTION   (PC) + 1 . PC
            |(ACC)| . ACC
            Affects OV; affected by OVM.
            Affects C (TMS320C25).

DESCRIPTION If the contents of the accumulator are greater than or equal
            to zero, the accumulator is unchanged by the execution of ABS.
            If the accumulator contents are less than zero, then the value
            is replaced with its two's complement value.

            Note >80000000 is a special case. When the overflow mode is
            not set, the ABS of >80000000 is >80000000. When in the
            overflow mode, the ABS of >80000000 is >7FFFFFFF. In either
            case the OV status bit is set. The carry bit (C) on the
            TMS320C25 is always reset to zero by the execution of this
            instruction.

WORDS       1

ENCODING    15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |1  1  0  0  1  1  1  0  0  0  0  1  1  0  1  1 |
            +-----------------------------------------------+

CYCLES

            +-----------------------------------------------+
            |    Cycle Timings for a Single Instruction     |
            |-----------------------------------------------|
            | PI/DI | PI/DE | PE/DI | PE/DE | PR/DI | PR/DE |
            |-------+-------+-------+-------+-------+-------|
      '20   |   1   |   1   |  1+p  |  1+p  |   -   |   -   |
            |-------+-------+-------+-------+-------+-------|
     'C25   |   1   |   1   |  1+p  |  1+p  |   1   |   1   |
            |-----------------------------------------------|
            |    Cycle Timings for a Repeat Instruction     |
            |-----------------------------------------------|
      '20   |   n   |   n   |  n+p  |  n+p  |   -   |   -   |
            |-------+-------+-------+-------+-------+-------|
     'C25   |   n   |   n   |  n+p  |  n+p  |   n   |   n   |
            +-----------------------------------------------+



EXAMPLE     ABS

                   BEFORE           AFTER
          ACC X     >1234     ACC 0 >1234
              C                   C

          ACC X >FFFFFFFF     ACC 0    >1
              C                   C


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson