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 direct [<label>] rpt <dma> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      DIRECT   [<LABEL>] RPT <dma>
            INDIRECT [<LABEL>] RPT {ind}[,<next ARP>]

OPERANDS    0 . dma . 127; 0 . next ARP . 7.

EXECUTION   (PC) + 1 . PC
            (dma(7-0)) . RPTC

DESCRIPTION The eight LSB's of the addressed data memory value are loaded
            into the repeat counter (RPTC). This causes the following
            instruction to be executed one more time than the number
            loaded into the RPTC (provided that it is a repeatable
            instruction). Interrupts are masked out until the next
            instruction has been executed the specified number of times.
            Interrupts cannot be allowed during the RPT/next instruction
            sequence because the RPTC cannot be saved during a context
                                                     __
            switch. The RPTC counter is cleared on a RS.

            RPT and RPTK are especially useful for operating instructions
            such as BLKP, BLKD, IN, MAC, MACD, NORM, OUT, TBLR, TBLW and
            others.

WORDS       1

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

            15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |0  1  0  0  1  0  1  1| 1| see indirect fields | INDIRECT
            +-----------------------------------------------+

CYCLES

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



EXAMPLE     RPT   DAT127      (DP = 31)
            SFR
            or
            RPT   *           If current auxiliary register contains 4095.

                      BEFORE                AFTER

            dm4095        >C        dm4095     >C
             ACC X >12345678         ACC 0 >12345
                 C                       C


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