Direct Addressing Modes (DP)
5-8
5.4 Direct Addressing Modes (DP)
AMODE
”loc16/loc32” Syntax
Description
0
@6bit
32bitDataAddr(31:22) = 0
32bitDataAddr(21:6) = DP(15:0)
32bitDataAddr(5:0) = 6bit
Note:
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.
Example(s):
MOVW DP,#VarA
; Load DP pointer with page value containing VarA
ADD AL,@VarA
; Add memory location VarA to register AL
MOV @VarB,AL
; Store AL into memory location VarB
; VarB is located in the same 64−word page as VarA
MOVW DP,#VarC
; Load DP pointer with page value containing VarC
SUB AL,@VarC
; Subtract memory location VarC from register AL
MOV @VarD,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
AMODE
”loc16/loc32” Syntax
Description
1
@@7bit
32bitDataAddr(31:22) = 0
32bitDataAddr(21:7) = DP(15:1)
32bitDataAddr(6:0) = 7bit
Note:
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.
Example(s):
SETC AMODE
; Make sure AMODE = 1
.lp_amode
; Tell assembler that AMODE = 1
MOVW DP,#VarA
; Load DP pointer with page value containing VarA
ADD AL,@@VarA
; Add memory location VarA to register AL
MOV @@VarB,AL
; Store AL into memory location VarB
; VarB is located in the same 128−word page as VarA
MOVW DP,#VarC
; Load DP pointer with page value containing VarC
SUB AL,@@VarC
; Subtract memory location VarC from register AL
MOV @@VarD,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
Note:
The direct addressing mode can access only the lower 4M of data address space on the C28x device.
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...