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

OPERANDS    -4096 . constant . 4095; -2 ^ 12 . constant . 2 ^ 12 -1

EXECUTION   (PC) + 1 . PC
            (T register) * constant . P register
            Not affected by SXM.

DESCRIPTION The contents of the T register are multiplied by the contents
            of the signed, 13-bit constant. The result is placed in the
            P register. The immediate field is right-justified and sign-
            extended before multiplication, regardless of SXM.

WORDS       1

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

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   |         not repeatable         |   -   |   -   |
            |------------------------------------------------|
     'C25   |                 not repeatable                 |
            +------------------------------------------------+



EXAMPLE     MPYK  -9

                BEFORE             AFTER

                 T  >7       T        >7
                 P >2A       P >FFFFFFC1

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