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

OPERANDS    None

EXECUTION   (PC) + 1 . PC
            Push all stack locations down one level.
            (ACC(15-0)) . TOS

DESCRIPTION The contents of the lower half of the accumulator are copied
            onto the top of the hardware stack. The stack is pushed down
            before the accumulator value is copied.

            The hardware stack is a last-in, first-out stack with four
            (TMS32020) or eight (TMS320C25) locations. If any more than
            four/eight pushes (due to CALA, CALL, PSHD, PUSH, or TRAP
            instructions) occur before a pop, the first data values
            written will be lost in each succeeding push.

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

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+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     PUSH


               BEFORE             AFTER

             ACC X >7          ACC X >7
                 C                 C

            STACK  >2         STACK  >7
             '20   >5          '20   >2
                   >3                >5
                   >0                >3

            STACK  >2         STACK  >7
            'C25   >5         'C25   >2
                   >3                >5
                   >0                >3
                  >12                >0
                  >86               >12
                  >54               >86
                  >3F               >54

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