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

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

EXECUTION   (PC) + 1 . PC
            (TOS) . dma
            Pop stack one level.

DESCRIPTION The value from the top of the stack (TOS) is transferred into
            the data memory location specified by the instruction. The
            values are also popped in the lower three (TMS32020) or seven
            (TMS320C25) locations of the stack.

            The hardware stack is a last-in, first-out stack with four
            (TMS32020) or eight (TMS320C25) locations. Any time a pop
            occurs, every stack value is copied to the next higher stack
            location, and the top value is removed from the stack. After
            a pop, the bottom two stack words will have the same value.
            Because each stack value is copied, if more than three/seven
            pops (due to POP, POPD, or RET instructions) occur before any
            pushes occur, all levels of the stack contain the same value.

            The  lowest stack location remains unaffected. No provision
            exists to check for stack underflow.

WORDS       1

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

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



EXAMPLE     POPD  DAT100       (DP = 8)
            or
            POPD  *            If current auxiliary register contains
1124.

               BEFORE             AFTER

           dm1124 >55        dm1124 >92

            STACK >92         STACK >72
             '20  >72          '20   >8
                   >8               >44
                  >44               >44

            STACK >92         STACK >72
            'C25  >72         'C25   >8
                   >8               >44
                  >44               >81
                  >81               >75
                  >75               >32
                  >32               >AA
                  >AA               >AA

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