Indirect Addressing
Indirect Addressing
Indirect Addressing
–
–
Example
Example
Stack Relative
Stack Relative
.sect “.code”
.sect “.code”
x2 = x1 + x3
x2 = x1 + x3
MOV
MOV
*
*
-
-
SP[2],AL
SP[2],AL
ADD
ADD
AL,*
AL,*
-
-
SP[3]
SP[3]
MOV
MOV
AL,*
AL,*
-
-
SP[1]
SP[1]
Accumulator
Accumulator
0 0 0 0 0 2 0 0
0 0 0 0 0 2 0 0
0 0 0 0 0 3 2 0
0 0 0 0 0 3 2 0
0 1 2 0
0 1 2 0
0 0 5 0
0 0 5 0
0 2 0 0
0 2 0 0
empty
empty
empty
empty
Data Memory
Data Memory
-
-
SP
SP
-
-
x2
x2
x1
x1
x3
x3
? ? ? ?
? ? ? ?
0 3 2 0
0 3 2 0
Instr. 1
Instr. 2
Instr. 3
Useful for stack based operations
Indirect Addressing
Indirect Addressing
–
–
Example
Example
Circular
Circular
(AR1 Low is set to buffer size – 1)
AR1 Low (16)
AR1 Low (16)
end of buffer
---- ----
start of buffer
(align on 256 word boundary)
AAAA AAAA
AAAA … AAAA
SECTIONS
{
Buf_Mem: align(256) { } > RAM PAGE 1
. . .
}
LINKER.CMD
circular
buffer
range
Element 0
Element N-1
Buffer Size N
XAR6 (32)
XAR6 (32)
access pointer
AAAA AAAA
AAAA … AAAA
xxxx xxxx
N-1
0000 0000
MAC P,
MAC P,
*AR6%++
*AR6%++
,*XAR7++
,*XAR7++
B - 12
C28x - Appendix B - Addressing Modes
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...