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>] banz <pma>[,{ind}[,<next arp>]] http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      [<LABEL>] BANZ <pma>[,{ind}[,<next ARP>]]

OPERANDS    0 . pma . 65535; 0 . next ARP . 7.

EXECUTION   If AR(ARP) is not equal to 0:
            pma . PC; else (PC) + 2 . PC
            Modify AR(ARP) and ARP as specified.

DESCRIPTION Control is passed to the designated program memory address
            (pma) if the current auxiliary register is not equal to zero.
            Otherwise, control passes to the next instruction. The current
            auxiliary register and ARP are also modified as specified.

            The current auxiliary register is either incremented or
            decremented from zero when the branch is not taken. Note that
            the AR modification defaults to *- (decrement the current AR
            by one) when nothing is specified, making it compatible with
            the TMS320C1x. Pma can be either a symbolic or numeric
            address.

            BANZ designed for loop control using the auxiliary registers
            as loop counters. Using *0+ or *0- allows modification of the
            loop counter by a variable step size. Care must be exercised
            when doing this because the auxiliary registers behave as
            modulo 65536 counters and zero may be passed without being
            detected if AR0 > 1.

WORDS       2

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

CYCLES

            +----------------------------------------------------+
            |       Cycle Timings for a Single Instruction       |
            |----------------------------------------------------|
            |  PI/DI |  PI/DE |  PE/DI |  PE/DE  | PR/DI | PR/DE |
            |-----------------+------------------+-------+-------|
      '20   |2 (br int-to-int)| 2+p (int-to-ext) |   _   |   _   |
            | 2+p (ext-to-int)| 2+2p (ext-to-ext)|       |       |
            |----------------------------------------------------|
      'C25  | True Conditions:                                   |
            |----------------------------------------------------|
            |              Destination on-chip RAM:              |
            |----------------------------------------------------|
            |    2   |   2    |  2+2p  |  2+2p   |   2   |   2   |
            |----------------------------------------------------|
            |              Destination on-chip ROM:              |
            |----------------------------------------------------|
            |    3   |   3    |  3+2p  |  3+2p   |   3   |   3   |
            |----------------------------------------------------|
            |            Destination external memory:            |
            |----------------------------------------------------|
            |   3+p  |  3+p   |  3+3p  |  3+3p   |  3+p  |  3+p  |
            |----------------------------------------------------|
            |  False Condition:                                  |
            |----------------------------------------------------|
            |               Destination anywhere:                |
            |----------------------------------------------------|
            |    2   |    2   |  2+2p  |  2+2p   |   2   |   2   |
            |----------------------------------------------------|
            |       Cycle Timings for a Repeat Instruction       |
            |----------------------------------------------------|
      '20   |          not repeatable            |   -   |   -   |
            |----------------------------------------------------|
     'C25   |                     not repeatable                 |
            +----------------------------------------------------+



EXAMPLE     BANZ  PRG35,*-

                BEFORE            AFTER

               AR   >1         AR    >0
               PC  >46         PC   >35
            or
               AR   >0         AR >FFFF
               PC  >46         PC   >48

EXAMPLE     BANZ  PRG64,*+

                BEFORE            AFTER

              AR >FFFF          AR   >0
              PC  >117          PC  >64
            or
              AR    >0          AR   >1
              PC  >117          PC >119

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