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

OPERANDS    16-bit constant
            0 . shift . 15 (defaults to 0)

EXECUTION   (PC) + 2 . PC
            (ACC(30-0)).XOR.[constant * 2 ^ shift] . ACC(30-0)
            (ACC(31)) . ACC(31)
            Not affected by SXM.

DESCRIPTION The left-shifted 16-bit immediate constant is exclusive-OR'ed
            with the accumulator, leaving the result in the accumulator.
            Low-order bits below and high-order bits above the shifted
            values are treated as zeros, thus not affecting the
            corresponding bits in the accumulator. Note that the most -
            significant bit of the accumulator is not affected, regardless
            of the shift code value.

WORDS       2

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

CYCLES

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



EXAMPLE     XORK  >FFFF,8

                       BEFORE                 AFTER

              ACC X >12345678       ACC X >12CBA978
                  C                     C

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