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

OPERANDS    0 . constant . 255

EXECUTION   (PC) + 1 . PC
            (ACC) + 8-bit positive constant . ACC
            Affects OVM and C; affected by OVM
            Not affected by SXM

DESCRIPTION The 8-bit immediate value is added, right justified, to the
            accumulator with the result replacing the accumulator
            contents. The immediate value is treated as a 8-bit positive
            number, regardless of the value of SXM.

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  0  0|     8-bit constant     |
            +-----------------------------------------------+

CYCLES

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



EXAMPLE     ADDK  >5

                 BEFORE            AFTER

          ACC X >79B2E1    ACC 0 >79B2E6
              C                C

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