aboutsummaryrefslogtreecommitdiff
path: root/int_tokens.c
blob: 9875e75e5c07f8dbf925e0dbe3e5460089528ae0 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
const char *int_cmds[] = {
	"REM",        /* $00 */
	"DATA",       /* $01 */
	"INPUT",      /* $02 */
	"COLOR",      /* $03 */
	"LIST",       /* $04 */
	"ENTER",      /* $05 */
	"LET",        /* $06 */
	"IF",         /* $07 */
	"FOR",        /* $08 */
	"NEXT",       /* $09 */
	"GOTO",       /* $0A */
	"GO TO",      /* $0B */
	"GOSUB",      /* $0C */
	"TRAP",       /* $0D */
	"BYE",        /* $0E */
	"CONT",       /* $0F */
	"COM",        /* $10 */
	"CLOSE",      /* $11 */
	"CLR",        /* $12 */
	"VBLANKWAIT", /* $13 */
	"HITCLR",     /* $14 */
	"       ",    /* $15 */
	"DIM",        /* $16 */
	"END",        /* $17 */
	"NEW",        /* $18 */
	"OPEN",       /* $19 */
	"LOAD",       /* $1A */
	"SAVE",       /* $1B */
	"STATUS",     /* $1C */
	"NOTE",       /* $1D */
	"POINT",      /* $1E */
	"XIO",        /* $1F */
	"ON",         /* $20 */
	"POKE",       /* $21 */
	"PRINT",      /* $22 */
	"READ",       /* $23 */
	"RESTORE",    /* $24 */
	"RETURN",     /* $25 */
	"RUN",        /* $26 */
	"STOP",       /* $27 */
	"POP",        /* $28 */
	"?",          /* $29 */
	"GET",        /* $2A */
	"PUT",        /* $2B */
	"GRAPHICS",   /* $2C */
	"PLOT",       /* $2D */
	"POSITION",   /* $2E */
	"DOS",        /* $2F */
	"DRAWTO",     /* $30 */
	"SETCOLOR",   /* $31 */
	"LOCATE",     /* $32 */
	"SOUND",      /* $33 */
	"LPRINT",     /* $34 */
	"CSAVE",      /* $35 */
	"CLOAD",      /* $36 */
	"",           /* $37 */
	"ERROR- ",    /* $38 */
	"WHILE",      /* $39 */
	"ENDWHILE",   /* $3A */
	"TRACEOFF",   /* $3B */
	"TRACE",      /* $3C */
	"ELSE",       /* $3D */
	"ENDIF",      /* $3E */
	"DPOKE",      /* $3F */
	"LOMEM",      /* $40 */
	"DEL",        /* $41 */
	"VINC",       /* $42 */
	"VDEC",       /* $43 */
	"VCONST",     /* $44 */
	"BPUT",       /* $45 */
	"BGET",       /* $46 */
	"TAB",        /* $47 */
	"CP",         /* $48 */
	"ERASE",      /* $49 */
	"PROTECT",    /* $4A */
	"UNPROTECT",  /* $4B */
	"DIR",        /* $4C */
	"RENAME",     /* $4D */
	"MOVE",       /* $4E */
	"MISSILE",    /* $4F */
	"PMCLR",      /* $50 */
	"PMCOLOR",    /* $51 */
	"PMGRAPHICS", /* $52 */
	"PMMOVE",     /* $53 */
	"PMWIDTH",    /* $54 */
	"SET",        /* $55 */
	"LVAR",       /* $56 */
	"RENUM",      /* $57 */
	"FAST",       /* $58 */
	"NUM",        /* $59 */
	"END",        /* $5A */
};

const int int_cmd_size = sizeof(int_cmds);

const char *int_ops[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	",",          /* $10 */
	":",          /* $11 */
	";",          /* $12 */
	"",           /* $13 */
	" GOTO ",     /* $14 */
	" GOSUB ",    /* $15 */
	" TO ",       /* $16 */
	" STEP ",     /* $17 */
	"=",          /* $18 */
	"=",          /* $19 */
	" THEN ",     /* $1A */
	"#",          /* $1B */
	"^&",         /* $1C */
	"^!",         /* $1D */
	"^%",         /* $1E */
	">>",         /* $1F */
	"<<",         /* $20 */
	"<=",         /* $21 */
	"<>",         /* $22 */
	">=",         /* $23 */
	"<",          /* $24 */
	">",          /* $25 */
	"=",          /* $26 */
	"\\",         /* $27 */
	"*",          /* $28 */
	"+",          /* $29 */
	"-",          /* $2A */
	"/",          /* $2B */
	"%",          /* $2C */
	" NOT ",      /* $2D */
	" OR ",       /* $2E */
	" AND ",      /* $2F */
	"!",          /* $30 */
	"&",          /* $31 */
	"(",          /* $32 */
	")",          /* $33 */
	"<=",         /* $34 */
	"<>",         /* $35 */
	">=",         /* $36 */
	"<",          /* $37 */
	">",          /* $38 */
	"=",          /* $39 */
	"+",          /* $3A */
	"-",          /* $3B */
	"(",          /* $3C */
	"",           /* $3D */
	"",           /* $3E */
	"(",          /* $3F */
	"(",          /* $40 */
	",",          /* $41 */
	";",          /* $42 */
	"LEFT$(",     /* $43 */
	"RIGHT$(",    /* $44 */
	"MID$(",      /* $45 */
	"STR$(",      /* $46 */
	"CHR$(",      /* $47 */
	"USR(",       /* $48 */
	"ASC(",       /* $49 */
	"VAL(",       /* $4A */
	"LEN(",       /* $4B */
	"ADR(",       /* $4C */
	"BUMP(",      /* $4D */
	"FIND(",      /* $4E */
	"HEX$(",      /* $4F */
	"RANDOM(",    /* $50 */
	"DPEEK(",     /* $51 */
	"RUN(",       /* $52 */
	"    ",       /* $53 */
	"PEEK(",      /* $54 */
	"    ",       /* $55 */
	"RND(",       /* $56 */
	"FRE(",       /* $57 */
	"SQR(",       /* $58 */
	"SGN(",       /* $59 */
	"ABS(",       /* $5A */
	"INT(",       /* $5B */
	"SYS(",       /* $5C */
	"PADDLE(",    /* $5D */
	"STICK(",     /* $5E */
	"PTRIG(",     /* $5F */
	"STRIG(",     /* $60 */
	"VSTICK(",    /* $61 */
	"HSTICK(",    /* $62 */
	"PMADR(",     /* $63 */
	"ERR(",       /* $64 */
	"TAB(",       /* $65 */
	"PEN(",       /* $66 */
};

const int int_ops_size = sizeof(int_ops);