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>] apac http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      [<LABEL>] APAC

OPERANDS    None

EXECUTION   (PC) + 1 . PC
            (ACC) + (shifted P register) . ACC
            Affects OV; affected by PM and OVM.
            Affects C (TMS320C25).
            Not affected by SXM.

DESCRIPTION The contents of the P register are shifted as defined by the
            PM status bits and added to the contents of the accumulator.
            The result is left in the accumulator. APAC is not affected
            by the SXM bit of the status register, and the P register is
            always sign-extended.

            The APAC instruction is a subset of the LTA, LTD, MAC, MACD,
            MPYA, and SQRA instructions.

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  0  1  0  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     APAC        (PM = 0)

               BEFORE            AFTER

               P  >40           P  >40
           ACC X  >20       ACC 0  >60
               C                C

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