Direct Addressing Modes (Dp) - Texas Instruments TMS320C28x Reference Manual

Dsp cpu and instruction set
Table of Contents

Advertisement

Direct Addressing Modes (DP)

5.4 Direct Addressing Modes (DP)
AMODE
"loc16/loc32" Syntax
0
Example(s):
MOVW
DP,#VarA
ADD
AL,@VarA
MOV
@VarB,AL
MOVW
DP,#VarC
SUB
AL,@VarC
MOV
@VarD,AL
AMODE
"loc16/loc32" Syntax
1
Example(s):
SETC
AMODE
.lp_amode
MOVW
DP,#VarA
ADD
AL,@@VarA
MOV
@@VarB,AL
MOVW
DP,#VarC
SUB
AL,@@VarC
MOV
@@VarD,AL
Note:
The direct addressing mode can access only the lower 4M of data address space on the C28x device.
5-8
Description
@6bit
32bitDataAddr(31:22) = 0
32bitDataAddr(21:6) = DP(15:0)
32bitDataAddr(5:0)
Note:
; Load DP pointer with page value containing VarA
; Add memory location VarA to register AL
; Store AL into memory location VarB
; VarB is located in the same 64−word page as VarA
; Load DP pointer with page value containing VarC
; Subtract memory location VarC from register AL
; Store AL into memory location VarD
; VarC is located in the same 64−word page as VarD
; VarC & D are in different pages than VarA & B
Description
@@7bit
32bitDataAddr(31:22) = 0
32bitDataAddr(21:7) = DP(15:1)
32bitDataAddr(6:0)
Note:
; Make sure AMODE = 1
; Tell assembler that AMODE = 1
; Load DP pointer with page value containing VarA
; Add memory location VarA to register AL
; Store AL into memory location VarB
; VarB is located in the same 128−word page as VarA
; Load DP pointer with page value containing VarC
; Subtract memory location VarC from register AL
; Store AL into memory location VarD
; VarC is located in the same 128−word page as VarD
; VarC & D are in different pages than VarA & B
= 6bit
The 6-bit offset value is concatenated with the 16-bit DP register. The
offset value enables 0 to 63 words to be addressed relative to the cur-
rent DP register value.
= 7bit
The 7-bit offset value is concatenated with the upper 15-bits of the DP
register. Bit 0 of DP register is ignored and is not affected by the op-
eration. The offset value enables 0 to 127 words to be addressed rela-
tive to the current DP register value.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF