Registers
AMODE == 0, the page size is reduced by half. This was done to accommo-
date other useful addressing modes.
The mapping of the direct addressing modes between the C2xLP and the
C28x is as shown in Figure C
Figure C
−
2. Direct Addressing Mode Mapping
C28x
21
2
0
22 bit address
21
2
0
15
7 6 5
AMODE = 1:
AMODE = 0:
DP (15:1)
DP (15:0)
7-bit offset
6-bit offset
15
C2xLP
15
16 bit address
15
7 6
0
0
DP (8:0)
7-bit offset
Using the previous example, the assembler/linker will initialize the DP and
offset values as follows on the C28x:
C2xLP Original Source Mode (”
−
v28
−
m20” mode, AMODE == 1)
LDP #VarA
; DP(15:0) = 0x3456/128 << 1 = 0x00D1
LACL
VarA
; 7-bit offset = 0x3456 & 0x007F = 0x56
Equivalent C28x Mnemonics (after C2xLP source is reassembled with the
C28x assembler)
MOVZ DP,#VarA
; DP(15:0) = 0x3456/128 << 1 = 0x00D1
MOVU ACC,@@VarA ; 7-bit offset = 0x3456 & 0x007F = 0x56
C28x Addressing Mode (”
−
v28” mode, AMODE == 0)
MOVZ DP,#VarA
; DP(15:0) = 0x3456/64 = 0x00D1
MOVU ACC,@VarA
; 6-bit offset = 0x3456 & 0x003F = 0x16
Note:
When using C28x syntax, the 128 word data page is indicated by using the double ”@@” symbol. The 64 word data page
is indicated by the single ”@” symbol. This helps the user and assembler to track which mode is being used.
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 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...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...