LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
p3.c
Go to the documentation of this file.
1 UBYTE prg[] =
2 { // p3
3  // IMAGE header
4  PROGRAMHeader(0,1,0), // VersionInfo,NumberOfObjects,GlobalBytes
5  VMTHREADHeader(28,4), // OffsetToInstructions,LocalBytes
6  //
7  // VMTHREAD1
8  // {
9  opUI_WRITE,LC0(PUT_STRING),LCS, // UI_WRITE(STRING," Print input changes\r\n")
10  ' ',' ',' ',' ', //
11  'P','r','i','n','t',' ', //
12  'i','n','p','u','t',' ', //
13  'c','h','a','n','g','e','s', //
14  '\r','\n',0, //
15  opUI_FLUSH, // UI_FLUSH
16  //
17  opINPUT_READ,LC0(0),LC0(0),LC0(0), // INPUT_READ(0,0,0,0,LV0)
18  LC0(0),LV0(0), //
19  // do
20  // {
21  // do
22  // {
23  opINPUT_READ,LC0(0),LC0(0),LC0(0), // INPUT_READ(0,0,0,0,LV1)
24  LC0(0),LV0(1), //
25  // }
26  opJR_EQ8,LV0(0),LV0(1),LC0(-10), // while (LV0 == LV1)
27  //
28  opMOVE8_8,LV0(1),LV0(0), // LV0 = LV1
29  //
30  opUI_WRITE,LC0(VALUE8),LV0(1), // UI_WRITE(VALUE8,LV1)
31  opUI_WRITE,LC0(PUT_STRING),LCS,'\r', // UI_WRITE(PUT_STRING,"\r\n")
32  '\n',0,
33  opUI_FLUSH, // UI_FLUSH
34  opUI_WRITE,LC0(LED),LC0(1),LV0(1), // UI_WRITE(LED,LED_LR,1) // Turn on left red
35  // }
36  opJR,LC0(-29), // while (TRUE)
37  opOBJECT_END // }
38 
39 };
40 
UBYTE prg[]
Definition: p3.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