TestTraining asm define 4000 Mark the beginning of logical section mir

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*****************************************************************************
* TestTraining.asm
*****************************************************************************/
#define N 4000
/* Mark the beginning of a logical section mirroring an array of contiguous
locations in processor memory. Statements between one '.SECTION' and the
following '.SECTION' directive comprise the contents of a section. Here,
we place the global symbol '_main' and the associated code into the
'seg_pmco' section.*/
.SECTION/DM dm_data;
.VAR input[N];
.SECTION/PM seg_pmco;
.VAR output;;
/* Set the scope of the '_main' symbol to global. This makes the symbol
available for reference in object files that are linked to the current
one. Use '.EXTERN' to refer to a global symbol from another file.*/
.GLOBAL _main;
R1 = R2 + R3;
/* Declare the '_main' symbol. */
_main:
/* Begin adding your custom code here. */
NOP;
PX1 = 0x9A00;
PX2 = 0x12345678;
PM(output) = PX;
nop;
nop;
JUMP _main;
/* Delimit the '_main' symbol so the linker knows which code is associated
with the symbol. */
._main.END: