Работа циклами include def21060 define 4000 -------------------- -----

 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*************************************************************/
/* Работа с циклами */
/*************************************************************/
#include "def21060.h"
#define N 4000
//------------------------------------------------------
// Source Vector 2 and Result Vector
.SECTION/DM dm_data;
.VAR input[N];
//------------------------------------------------------
//------------------------------------------------------
// Source Vector 2
.SECTION/PM pm_data;
.VAR output[N];
//------------------------------------------------------
//------------------------------------------------------
.SECTION/PM pm_irq_svc;
nop;
jump start;
nop;
nop;
//------------------------------------------------------
//------------------------------------------------------
.SECTION/PM pm_code;
start:
I0 = input;
M0 = 1;
I8 = output;
M8 = 1;
R1 = DM(I0, M0);
LCNTR = 13749, DO xxx UNTIL LCE;
xxx: R1 = DM(I0, M0), PM(I8, M8) = R1;
PM(I8, M8) = R1;
wait: IDLE;
jump wait;