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

In the direct memory addressing mode, the instruction word contains the
lower seven bits of the data memory address (dma). This field is
concatenated with the nine bits of the data memory page pointer (DP)
register to form the full 16-bit data memory address. Thus, the DP
register points to one of 512 possible 128-word data memory pages, and the
7-bit addressin the instruction points to a specific location within that
data memory page. The DP register is loaded through the LDP (load data
memory page), LDPK (load data memory page pointer immediate), or LST (load
status register ST0) instructions.

Note: The data page pointer is not initialized by reset and is therefore
undefined after powerup. The TMS320C2x development tools utilize default
values for many parameters, including the data page pointer. Because of
this, programs which do not explicitly initialize the data page pointer
may execute improperly, depending upon whether they are executed on a
TMS320C2x device or using a development tool. Thus, it is critical that
all programs initialize the data page pointer in software.

Direct addressing can be used with all instructions except CALL, the
branch instructions, and the instructions with no operands. The direct
addressing format is as follows:

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

Bits 15 through 8 contain the opcode. Bit 7 = 0 defines the addressing
mode as direct, and bits 6 through 0 contain the data memory address(dma).

Example of Direct Addressing Format:

      ADD   9,5         Add to accumulator the contents of data memory
                        location 9 shifted 5 bits.

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

The opcode of the ADD 9,5 instruction is >05 and appears in bits 15
through 8. The notation >nn indicates nn is a hexadecimal number. The
shift count of >5 appears in bits 11 through 8 of the opcode. The data
memory address >09 appears in bits 6 through 0.

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