User Manual, Firmware rev. 3.0 or LATER Owner's manual

328 Publication 1404-UM001F-EN-P - November 2009
Appendix C Sample Applications
Perpare to swap words by copying source to N11 temp file. Initialize the word counter N12:0.
0000
SBR
Subroutine
SBR COP
Copy File
Source #N10:0
Dest #N11:0
Length 64
COP
MOV
Move
Source 0
0<
Dest N12:0
30<
MOV
Perform this task until all the words have been swapped. A size of 32 was selected to handle all power monitor files.
0001
LBL
Q3:1
LES
Less Than (A<B)
Source A N12:0
30<
Source B 30
30<
LES
ADD
Add
Source A 1
1<
Source B N12:0
30<
Dest N12:1
29<
ADD
MOV
Move
Source N11:[N12:1]
0<
Dest N12:2
0<
MOV
MOV
Move
Source N11:[N12:0]
0<
Dest N11:[N12:1]
0<
MOV
MOV
Move
Source N12:2
0<
Dest N11:[N12:0]
0<
MOV
ADD
Add
Source A 2
2<
Source B N12:0
30<
Dest N12:0
30<
ADD
JMP
Q3:1