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

OPERANDS    None

EXECUTION   (PC) + 1 . PC
            (TOS) . ACC(15-0)
            0 . ACC(31-16)
            Pop stack one level.

DESCRIPTION The contents of the top of the stack (TOS) are copied to the
            low accumulator, and the stack popped after the contents are
            copied. The upper half of the accumulator is set to all
            zeroes.

            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.
            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
            +-----------------------------------------------+
            |1  1  0  0  1  1  1  0  0  0  0  1  1  1  0  1 |
            +-----------------------------------------------+

CYCLES

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



EXAMPLE     POP

               BEFORE             AFTER

            ACC X >82         ACC X >45
                C                 C

            STACK >45         STACK >16
             '20  >16          '20   >7
                   >7               >33
                  >33               >33

            STACK >45         STACK >16
            'C25  >16         'C25   >7
                   >7               >33
                  >33               >42
                  >42               >56
                  >56               >37
                  >37               >61
                  >61               >61

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