Data Move
Data Move
Data Move Instructions
DATA
↔
DATA (4G
↔
64K)
DATA
↔
PGM (4G
↔
4M)
Faster than Load / Store, avoids
accumulator
Allows access to program memory
Optimal with
RPT
(speed and code size)
In RPT, non-
mem
address is auto-
incremented in PC
MOV loc16, *(0:16bit)
MOV *(0:16bit), loc16
32-bit address memory
location
16-bit address concatenated
with 16 leading zeros
.sect “.code”
START: MOVL
XAR5,#x
MOVL XAR7,#TBL
RPT
#len-1
||
PREAD *XAR5++,*XAR7
...
x
.usect “.samp”,4
.sect “.coeff”
TBL:
.word 1,2,3,4
len
.set
$-TBL
PREAD
loc16 ,*XAR7
PWRITE
*XAR7, loc16
pointer with a 22-bit
program memory address
Conditional Moves
Instruction
Execution (if COND is met)
MOV loc16,AX,COND [loc16] = AX
MOVB loc16,#8bit,COND [loc16] = 8bit
If A<B, Then B=A
Accumulator
0 0 0 0 0 1 2 0
MOVW DP, #A
MOV
AL, @A
CMP
AL, @B
Example
A .usect
“var”,2,1
B .set
A+1
.sect
“code”
MOV @B, AL, LT
0 1 2 0
0 3 2 0
Data Memory
B
A
0 1 2 0
Data Memory
B
A
0 1 2 0
Before
After
Instruction
Execution (if COND is met)
MOVL loc32,ACC,COND [loc32] = AX
The conditional move instruction is an excellent way to avoid a discontinuity (branch or call)
based upon a condition code set prior to the instruction. In the above example, the 1
st
step is to
C28x - Appendix C - Assembly Programming
C - 13
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 ...