For the MMR direct addressing mode, the DP addressing mode must be selected. The
example given next uses direct addressing mode to load the content of the lower portion of
the accumulator AC0(15:0), into the temporary register T0. When the mmap()qualifier
for the MMR direct addressing mode is used, it forces the data address generator to act as
if the access is made to the main data page 0. That is, XDP 0.
Example 2.8:
Instruction
mov mmap(@AC0L), T0
AC0
00 12DF 0202
AC0
00 12DF 0202
T0
0000
T0
0202
Before instruction
After instruction
Accessing the MMRs using indirect addressing mode is the same as addressing the data
memory space. The address pointer can be either an auxiliary register or a CDP. Since
the MMRs are all located on data page 0, the XAR and XCDP must be initialized to
page 0 by setting all upper 7-bit to zero. The following instructions load the content of
AC0 into T1 and T2 temporary registers:
amov #AC0H, XAR6
mov *AR6À, T2
mov *AR6, T1
In this example, the first instruction loads the effective address of the upper portion of the
accumulator AC0 (AC0H, located at address 0x9 of page 0) to the extended auxiliary
register XAR6. That is, XAR6 0x000009. The second instruction uses AR6 as a pointer
to copy the content of AC0H into the T2 register, and then the pointer decrements by 1 to
point to the lower portion of AC0 (AC0L, located at address 0x8 of page 0). The third
instruction copies the content of AC0L into the register T1 and modifies AR6 to point to
AC0H again.
2.4.5 Register Bits Addressing Mode
Both direct and indirect addressing modes can be used to address one bit or a pair of bits
of a specific register. The direct addressing mode uses a bit offset to access a particular
register's bit. The offset is the number of bits counting from the least significant bit (LSB),
i.e., bit 0. The bit test instruction will update the test condition bits, TC1 and TC2, of the
status register ST0. The instruction of register-bit direct addressing mode is shown in the
next example.
Example 2.9:
Instruction
btstp @30, AC1
AC1
00 7ADF 3D05
AC1 00 7ADF 3D05
TC1
0
TC1
1
TC2
0
TC2
0
Before instruction
After instruction
TMS320C55X ADDRESSING MODES
57