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

OPERANDS    0 . dma . 127; 0 . next ARP . 7.
            0 . shift . 7 (defaults to 0) on the TMS320C25
            shift = 0, 1 or 4 on the TMS32020

EXECUTION   (PC) + 1 . PC
            16 MSB's of (ACC) * 2 ^ shift . dma
            Not affected by SXM.

DESCRIPTION The SACH instruction copies the entire accumulator into a
            shifter, where it shifts the entire 32-bit number 0, 1 or 4
            bits on the TMS32020 or 0 to 7 bits on the TMS320C25. It then
            copies the upper 16 bits of the shifted value into data
            memory. The accumulator itself remains unaffected.

WORDS       1

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

            15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |0  1  1  0  1| shift  | 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  | 3+d+p  |   -   |   -   |
            |-------+-------+-------+--------+-------+-------|
     'C25   |   1   |  1+d  |  1+p  | 2+d+p  |   1   |  1+d  |
            |------------------------------------------------|
            |    Cycle Timings for a Repeat Instruction      |
            |------------------------------------------------|
      '20   |   n   | 2n+nd |  n+p  | 3n+nd+p|   -   |   -   |
            |-------+-------+-------+--------+-------+-------|
     'C25   |   n   |  n+nd |  n+p  |1+n+nd+p|   n   | n+nd  |
            +------------------------------------------------+



EXAMPLE     SACH  DAT10,4     (DP = 4)
            or
            SACH  *,4         If current auxiliary register contains 522.

                    BEFORE             AFTER

            ACC X >4208001    ACC X >4208001
                C                 C
            dm522       >0    dm522    >4208

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