-
Notifications
You must be signed in to change notification settings - Fork 2
/
tbx.il
215 lines (215 loc) · 2.26 KB
/
tbx.il
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
STRT: INIT
ERRENT: NLINE
CO: GETLN
; NLINE
TSTL DIR
INSRT
IJMP CO
XEC: XINIT
DIR: TST S1,'LET'
ICALL AVTEST
ICALL EXPR1
STORE
DONE
NXT
S1: TST S3,'GO'
TST S2,'TO'
ICALL EXPR
DONE
XFER
S2: TST S14,'SUB'
ICALL EXPR
DONEX
SAV
XFER
S3: TST S3A,'IF'
ICALL EXPR
ICALL RELOP
ICALL EXPR
CMPR
IJMP DIR
S3A: TST S4A,'FOR'
TSTV S3ERR
ICALL EXPR1
STORE
TST S3ERR,'TO' ; DDJ V1N2, p.36 #1
FOR
ICALL EXPR
DONE
NXT
S3ERR: ERR 16
S4: TST S9,'PR'
S5: TST S8C,'"'
PRS
S6: TST S7A,','
SPC
S7B: TST S5A,13
NXT
S7A: TST S7,59 ; semicolon
SPCONE
IJMP S7B
S7: NLINE
DONE
NXT
S8: ICALL EXPR
PRN
IJMP S6
S8A: DONE
NXT
S9: TST S12,'IN'
S10: ICALL AVTEST
INNUM
STORE
TST S11,','
IJMP S10
S11: TST S7,59 ; DDJ V1N2, p.36 #2
DONE
NXT
S12: TST S13,'RET'
DONE
RSTR
NXT
S13: TST S14,'END'
NLINE
FIN
S18: TST S15,'LST'
IJMP S18A
S15: TST S16,'RUN'
DONE
IJMP XEC
S16: TST S17A,'NEW'
DONE
IJMP STRT
S17: ERR 12
S5A: TST S5,'$'
NXTX
EXPR1: TST EXPR,'='
EXPR: TST E0,'-'
ICALL TERM
NEG
IJMP E1
E0: TST E3,'+'
E3: ICALL TERM
E1: TST E2,'+'
ICALL TERM
ADD
IJMP E1
E2: TST E4,'-'
ICALL TERM
SUB
IJMP E1
TERM: ICALL FACT
T0: TST T1,'*'
ICALL FACT
MPY
IJMP T0
T1: TST T2,'/'
ICALL FACT
DIV
IJMP T0
FACT: TSTF F4
IJMP FN
F4: TSTA F0
ICALL ARRAY
IND
RTN
F0: TSTV F1
IND
T2: RTN
E4: RTN
F1: TSTN F2
RTN
F2: TST F3,'('
ICALL EXPR
TST F3,')'
RTN
F3: ERR 13
S17A: TST S17,'SZE'
SIZE
IJMP S8A
RELOP: TST R0,'='
LIT 0
RTN
R0: TST R4,'<'
TST R1,'='
LIT 2
RTN
R1: TST R3,'>'
LIT 3
RTN
R3: LIT 1
RTN
R4: TST S17,'>'
TST R5,'='
LIT 5
RTN
R5: TST R6,'<'
LIT 3
RTN
R6: LIT 4
RTN
S14: TST S18,'DIM'
Z0: TSTV ZERR
TST F3,'('
ICALL EXPR
TST Z1,','
ICALL EXPR
TST F3,')'
DIM2
Z3: TST Z2,','
IJMP Z0
Z2: DONE
NXT
Z1: TST F3,')'
DIM1
IJMP Z3
ZERR: ERR 13
ARRAY: TST F3,'('
ICALL EXPR
TST X0,','
ICALL EXPR
TST F3,')'
ARRAY2
RTN
X0: TST F3,')'
ARRAY1
RTN
AVTEST: TSTA V0
ICALL ARRAY
RTN
V0: TSTV VERR
RTN
VERR: ERR 11
S4A: TST S4,'NXT'
TSTV S4ERR
NEXT
STORE
DONE
NXT
S4ERR: ERR 14
FN: TST FN0,'RN'
RANDOM
RTN
FN0: TST S17,'SP' ; DDJ V1N2, p.36 #6
ICALL EXPR
TAB
RTN
S8C: TST S8B,13
NLINE
NXT
S8B: TST S8,'$'
NLINE
NXTX
S18A: TST S18B,13
LIST0
LST
NXT
S18B: ICALL EXPR
TST S18C,','
ICALL EXPR
LIST2
LST
IJMP S8A
S18C: LIST1
LST
IJMP S8A