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
|
const char *commands[] = {
"REM", /* $00 */
"DATA",
"INPUT",
"COLOR",
"LIST", /* $04 */
"ENTER",
"LET",
"IF",
"FOR", /* $08 */
"NEXT",
"GOTO",
"GO TO",
"GOSUB", /* $0C */
"TRAP",
"BYE",
"CONT",
"COM", /* $10 */
"CLOSE",
"CLR",
"DEG",
"DIM", /* $14 */
"END",
"NEW",
"OPEN",
"LOAD", /* $18 */
"SAVE",
"STATUS",
"NOTE",
"POINT", /* $1C */
"XIO",
"ON",
"POKE",
"PRINT", /* $20 */
"RAD",
"READ",
"RESTORE",
"RETURN", /* $24 */
"RUN",
"STOP",
"POP",
"?", /* $28 */
"GET",
"PUT",
"GRAPHICS",
"PLOT", /* $2C */
"POSITION",
"DOS",
"DRAWTO",
"SETCOLOR", /* $30 */
"LOCATE",
"SOUND",
"LPRINT",
"CSAVE", /* $34 */
"CLOAD",
"", /* $36, implied LET */
"ERROR- " /* $37 */
};
const unsigned short last_command = (sizeof(commands) / sizeof(char *)) - 1;
const char *operators[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
",", /* $12 */
"$",
":", /* $14, named OP_COLON and OP_EOS in bas.h */
";",
"", /* $16, EOL */
" GOTO ",
" GOSUB ", /* $18 */
" TO ",
" STEP ",
" THEN ",
"#", /* $1C */
"<=",
"<>",
">=",
"<", /* $20 */
">",
"=",
"^",
"*", /* $24 */
"+",
"-",
"/",
" NOT ", /* $28 */
" OR ",
" AND ",
"(",
")",
"=",
"=",
"<=",
"<>", /* $30 */
">=",
"<",
">",
"=", /* $34 */
"+",
"-",
"(",
"", /* $38, redundant "(" for arrays */
"", /* $39, ditto for strings */
"(",
"(",
",", /* $3C */
"STR$",
"CHR$",
"USR",
"ASC", /* $40 */
"VAL",
"LEN",
"ADR",
"ATN", /* $44 */
"COS",
"PEEK",
"SIN",
"RND", /* $48 */
"FRE",
"EXP",
"LOG",
"CLOG", /* $4C */
"SQR",
"SGN",
"ABS",
"INT", /* $50 */
"PADDLE",
"STICK",
"PTRIG",
"STRIG" /* $54 */
};
const unsigned short last_operator = (sizeof(operators) / sizeof(char *)) - 1;
|