LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
p6.c
Go to the documentation of this file.
1 
7 //
8 //
9 // (VMTHREAD1--DELAY(2)--TRIG(2)---------------------TRIG(3)----------------WAIT(3)--WAIT(2)------)
10 // \ \ / /
11 // \ (BLOCK3--DELAY(2)--) /
12 // \ / /
13 // (BLOCK2--DELAY(2)--TRIG(3)----------DELAY(6)--------)
14 
15 
16 UBYTE prg[] = // p6.c
17 {
18  PROGRAMHeader(0,3,0), // VersionInfo,NumberOfObjects,GlobalBytes
19  VMTHREADHeader(52,12), // OffsetToInstructions,LocalBytes
20  BLOCKHeader(192,1,1), // OffsetToInstructions,OwnerObjectId,TriggerCount
21  BLOCKHeader(266,1,2), // OffsetToInstructions,OwnerObjectId,TriggerCount
22  //
23  // VMTHREAD1
24  // {
25  opUI_WRITE,LC0(PUT_STRING),LCS,'B','L','O','C','K','1','\r','\n',0, // UI_WRITE(STRING,"BLOCK1\r\n")
26  opUI_FLUSH, // UI_FLUSH
27  //
28  opUI_WRITE,LC0(PUT_STRING),LCS,'D','E','L','A','Y','(','2',')','\r','\n',0, // UI_WRITE(STRING,"DELAY(2)\r\n")
29  opUI_FLUSH, // UI_FLUSH
30  opTIMER_WAIT,LC2(2000),LV0(0), // DELAY(2)
31  opTIMER_READY,LV0(0), //
32  //
33  opUI_WRITE,LC0(PUT_STRING),LCS,'T','R','I','G','(','2',')','\r','\n',0, // UI_WRITE(STRING,"TRIG(2)\r\n")
34  opUI_FLUSH, // UI_FLUSH
35  opOBJECT_TRIG,LC0(2), // TRIG(2)
36  //
37  opUI_WRITE,LC0(PUT_STRING),LCS,'T','R','I','G','(','3',')','\r','\n',0, // UI_WRITE(STRING,"TRIG(3)\r\n")
38  opUI_FLUSH, // UI_FLUSH
39  opOBJECT_TRIG,LC0(3), // TRIG(3)
40  //
41  opUI_WRITE,LC0(PUT_STRING),LCS,'W','A','I','T','(','3',')','\r','\n',0, // UI_WRITE(STRING,"WAIT(3)\r\n")
42  opUI_FLUSH, // UI_FLUSH
43  opOBJECT_WAIT,LC0(3), // WAIT(3)
44  //
45  opUI_WRITE,LC0(PUT_STRING),LCS,'D','O','N','E','(','3',')','\r','\n',0, // UI_WRITE(STRING,"DONE(3)\r\n")
46  //
47  opUI_WRITE,LC0(PUT_STRING),LCS,'W','A','I','T','(','2',')','\r','\n',0, // UI_WRITE(STRING,"WAIT(3)\r\n")
48  opUI_FLUSH, // UI_FLUSH
49  opOBJECT_WAIT,LC0(3), // WAIT(2)
50  //
51  opUI_WRITE,LC0(PUT_STRING),LCS,'D','O','N','E','(','2',')','\r','\n',0, // UI_WRITE(STRING,"DONE(2)\r\n")
52  opUI_WRITE,LC0(PUT_STRING),LCS,'D','O','N','E','(','1',')','\r','\n',0, // UI_WRITE(STRING,"DONE(1)\r\n")
53  opUI_FLUSH, // UI_FLUSH
54  opOBJECT_END, // }
55  //
56  // BLOCK2
57  // {
58  opUI_WRITE,LC0(PUT_STRING),LCS,'B','L','O','C','K','2','\r','\n',0, // UI_WRITE(STRING,"BLOCK2\r\n")
59  opUI_FLUSH, // UI_FLUSH
60  //
61  opUI_WRITE,LC0(PUT_STRING),LCS,'D','E','L','A','Y','(','2',')','\r','\n',0, // UI_WRITE(STRING,"DELAY(2)\r\n")
62  opUI_FLUSH, // UI_FLUSH
63  opTIMER_WAIT,LC2(2000),LV0(0), // DELAY(2)
64  opTIMER_READY,LV0(0), //
65  //
66  opUI_WRITE,LC0(PUT_STRING),LCS,'T','R','I','G','(','3',')','\r','\n',0, // UI_WRITE(STRING,"TRIG(3)\r\n")
67  opUI_FLUSH, // UI_FLUSH
68  opOBJECT_TRIG,LC0(3), // TRIG(3)
69  //
70  opUI_WRITE,LC0(PUT_STRING),LCS,'D','E','L','A','Y','(','6',')','\r','\n',0, // UI_WRITE(STRING,"DELAY(6)\r\n")
71  opUI_FLUSH, // UI_FLUSH
72  opTIMER_WAIT,LC2(6000),LV0(0), // DELAY(2)
73  opTIMER_READY,LV0(0), //
74  opOBJECT_END, // }
75  //
76  // BLOCK3
77  // {
78  opUI_WRITE,LC0(PUT_STRING),LCS,'B','L','O','C','K','3','\r','\n',0, // UI_WRITE(STRING,"BLOCK3\r\n")
79  opUI_FLUSH, // UI_FLUSH
80  //
81  opUI_WRITE,LC0(PUT_STRING),LCS,'D','E','L','A','Y','(','2',')','\r','\n',0, // UI_WRITE(STRING,"DELAY(2)\r\n")
82  opUI_FLUSH, // UI_FLUSH
83  opTIMER_WAIT,LC2(2000),LV0(0), // DELAY(2)
84  opTIMER_READY,LV0(0), //
85  opOBJECT_END // }
86  //
87 };
88 
89 /* \endverbatim
90 */
#define LC2(v)
Definition: bytecodes.h:1617
#define BLOCKHeader(OffsetToInstructions, OwnerObjectId, TriggerCount)
Definition: bytecodes.h:1579
UBYTE prg[]
Definition: p0.c:1
#define VMTHREADHeader(OffsetToInstructions, LocalBytes)
Definition: bytecodes.h:1573
#define PROGRAMHeader(VersionInfo, NumberOfObjects, GlobalBytes)
Definition: bytecodes.h:1570
#define LCS
Definition: bytecodes.h:1611
#define LC0(v)
Definition: bytecodes.h:1615
#define LV0(i)
Definition: bytecodes.h:1621
unsigned char UBYTE
Basic Type used to symbolise 8 bit unsigned values.
Definition: lmstypes.h:29