Deriving a new dialect of Very Tiny Language from VTL-2 6800 version
Revisão | bdfde7319a13b935a217dc69b1d90faa19d95e3e (tree) |
---|---|
Hora | 2022-09-25 19:44:02 |
Autor | Joel Matthew Rees <joel.rees@gmai...> |
Commiter | Joel Matthew Rees |
semicolons to solve the SP problems
@@ -1,4 +1,3 @@ | ||
1 | - OPT PRT | |
2 | 1 | * VTL-2 |
3 | 2 | * V-3.6 |
4 | 3 | * 9-23-76 |
@@ -7,22 +6,22 @@ | ||
7 | 6 | * COPYWRIGHT 1976, THE COMPUTER STORE |
8 | 7 | * |
9 | 8 | * DEFINE LOCATIONS IN MONITOR |
10 | -INCH EQU $FF00 | |
11 | -POLCAT EQU $FF24 | |
12 | -OUTCH EQU $FF81 | |
13 | -OUTS EQU $FF82 | |
9 | +INCH EQU $FF00 ; per VTL.ASM | |
10 | +POLCAT EQU $FF24 ; from VTL.ASM | |
11 | +OUTCH EQU $FF81 ; from VTL.ASM | |
12 | +OUTS EQU $FF82 ; from VTL.ASM | |
14 | 13 | * |
15 | 14 | * FOR SBC6800 |
16 | -BREAK EQU $1B BREAK KEY | |
15 | +BREAK EQU $1B ; BREAK KEY | |
17 | 16 | * |
18 | 17 | * SET ASIDE FOUR BYTES FOR USER |
19 | 18 | * DEFINED INTERUPT ROUTINE IF NEEDED |
20 | 19 | ORG $0000 |
21 | -ZERO RMB 4 INTERUPT VECTOR | |
22 | -AT RMB 2 CANCEL & C-R | |
20 | +ZERO RMB 4 ; INTERUPT VECTOR | |
21 | +AT RMB 2 ; CANCEL & C-R | |
23 | 22 | * |
24 | 23 | * GENERAL PURPOSE STORRGE |
25 | -VARS RMB 52 VARIRBLES(A-Z) | |
24 | +VARS RMB 52 ; VARIABLES(A-Z) | |
26 | 25 | BRAK RMB 2 ; [ |
27 | 26 | SAVE10 RMB 2 ; BACK SLASH |
28 | 27 | BRIK RMB 2 ; ] |
@@ -56,25 +55,25 @@ SAVE6 RMB 2 | ||
56 | 55 | SAVE7 RMB 2 |
57 | 56 | SAVE8 RMB 2 |
58 | 57 | SAVE9 RMB 2 |
59 | -COLN RMB 2 : | |
60 | -SEMI RMB 2 ; | |
61 | -LESS RMB 2 < | |
62 | -EQAL RMB 2 = | |
63 | -GRRT RMB 1 > | |
58 | +COLN RMB 2 ; : | |
59 | +SEMI RMB 2 ; ; | |
60 | +LESS RMB 2 ; < | |
61 | +EQAL RMB 2 ; = | |
62 | +GRRT RMB 1 ; > | |
64 | 63 | DECB_1 RMB 1 |
65 | 64 | * |
66 | 65 | DECBUF RMB 4 |
67 | 66 | LASTD RMB 1 |
68 | 67 | DELIM RMB 1 |
69 | -LINBUF RMB 73 LINE LENGTH +1 | |
68 | +LINBUF RMB 73 ; LINE LENGTH +1 | |
70 | 69 | * |
71 | 70 | ORG $00F1 |
72 | 71 | STACK RMB 1 |
73 | 72 | * |
74 | 73 | ORG $0100 |
75 | -MI RMB 4 INTERUPT VECTORS | |
74 | +MI RMB 4 ; INTERUPT VECTORS | |
76 | 75 | NMI RMB 4 |
77 | -PRGM EQU * PROGRAM STARTS HERE | |
76 | +PRGM EQU * ; PROGRAM STARTS HERE | |
78 | 77 | * |
79 | 78 | ORG $FC00 |
80 | 79 | * |
@@ -87,56 +86,56 @@ LOOP CLRA | ||
87 | 86 | STAA DOLR |
88 | 87 | STAA DOLR+1 |
89 | 88 | JSR CVTLN |
90 | - BCC STMNT NO LINE# THEN EXEC | |
89 | + BCC STMNT ; NO LINE# THEN EXEC | |
91 | 90 | BSR EXEC |
92 | 91 | BEQ START |
93 | 92 | * |
94 | -LOOP2 BSR FIND FIND LINE | |
95 | -EQSTRT BEQ START IF END THEN STOP | |
96 | - LDX 0,X LOAD REAL LINE # | |
97 | - STX DOLR SAVE IT | |
98 | - LDX SAVE11 GET LINE | |
99 | - INX BUMP PAST LINE # | |
100 | - INX BUMP PAST LINE # | |
101 | - INX BUMP PAST SPACE | |
102 | - BSR EXEC EXECUTE IT | |
103 | - BEQ LOOP3 IF ZERO, CONTINUE | |
104 | - LDX SAVE11 FIND LINE | |
105 | - LDX 0,X GET IT | |
106 | - CPX DOLR HAS IT CHANGED? | |
107 | - BEQ LOOP3 IF NOT GET NEXT | |
108 | -* | |
109 | - INX INCREMENT OLD LINE# | |
110 | - STX EXCL SAVE FOR RETURN | |
111 | - BRA LOOP2 CONTINUE | |
112 | -* | |
113 | -LOOP3 BSR FND3 FIND NEXT LINE | |
114 | - BRA EQSTRT CONTINUE | |
115 | -* | |
116 | -EXEC STX SAVE7 EXECUTE LINE | |
93 | +LOOP2 BSR FIND ; FIND LINE | |
94 | +EQSTRT BEQ START ; IF END THEN STOP | |
95 | + LDX 0,X ; LOAD REAL LINE # | |
96 | + STX DOLR ; SAVE IT | |
97 | + LDX SAVE11 ; GET LINE | |
98 | + INX ; BUMP PAST LINE # | |
99 | + INX ; BUMP PAST LINE # | |
100 | + INX ; BUMP PAST SPACE | |
101 | + BSR EXEC ; EXECUTE IT | |
102 | + BEQ LOOP3 ; IF ZERO, CONTINUE | |
103 | + LDX SAVE11 ; FIND LINE | |
104 | + LDX 0,X ; GET IT | |
105 | + CPX DOLR ; HAS IT CHANGED? | |
106 | + BEQ LOOP3 ; IF NOT GET NEXT | |
107 | +* | |
108 | + INX ; INCREMENT OLD LINE# | |
109 | + STX EXCL ; SAVE FOR RETURN | |
110 | + BRA LOOP2 ; CONTINUE | |
111 | +* | |
112 | +LOOP3 BSR FND3 ; FIND NEXT LINE | |
113 | + BRA EQSTRT ; CONTINUE | |
114 | +* | |
115 | +EXEC STX SAVE7 ; EXECUTE LINE | |
117 | 116 | JSR VAR2 |
118 | 117 | INX |
119 | 118 | * |
120 | -SKIP LDAA 0,X GET FIRST TERM | |
121 | - BSR EVIL EVALUATE EXPRESSION | |
122 | -OUTX LDX DOLR GET LINE # | |
119 | +SKIP LDAA 0,X ; GET FIRST TERM | |
120 | + BSR EVIL ; EVALUATE EXPRESSION | |
121 | +OUTX LDX DOLR ; GET LINE # | |
123 | 122 | RTS |
124 | 123 | * |
125 | -EVIL CMPA #$22 IF " THEN BRANCH | |
124 | +EVIL CMPA #$22 ; IF " THEN BRANCH | |
126 | 125 | BNE EVALU |
127 | 126 | INX |
128 | -STRGT JMP STRING TO PRINT IT | |
127 | +STRGT JMP STRING ; TO PRINT IT | |
129 | 128 | * |
130 | -STMNT STX SAVE8 SAVE LINE # | |
129 | +STMNT STX SAVE8 ; SAVE LINE # | |
131 | 130 | STAA DOLR |
132 | 131 | STAB DOLR+1 |
133 | 132 | LDX DOLR |
134 | - BNE SKP2 IF LINE# <> 0 | |
133 | + BNE SKP2 ; IF LINE# <> 0 | |
135 | 134 | * |
136 | - LDX #PRGM LIST PROGRAM | |
137 | -LST2 CPX AMPR END OF PROGRAM | |
135 | + LDX #PRGM ; LIST PROGRAM | |
136 | +LST2 CPX AMPR ; END OF PROGRAM | |
138 | 137 | BEQ EQSTRT |
139 | - STX SAVE11 LINE # FOR CVDEC | |
138 | + STX SAVE11 ; LINE # FOR CVDEC | |
140 | 139 | LDAA 0,X |
141 | 140 | LDAB 1,X |
142 | 141 | JSR PRNT2 |
@@ -147,15 +146,15 @@ LST2 CPX AMPR END OF PROGRAM | ||
147 | 146 | JSR CRLF |
148 | 147 | BRA LST2 |
149 | 148 | * |
150 | -NXTXT LDX SAVE11 GET POINTER | |
151 | - INX BUMP PAST LINE# | |
152 | -LOOKAG INX FIND END OF LINE | |
149 | +NXTXT LDX SAVE11 ; GET POINTER | |
150 | + INX ; BUMP PAST LINE# | |
151 | +LOOKAG INX ; FIND END OF LINE | |
153 | 152 | TST 0,X |
154 | 153 | BNE LOOKAG |
155 | 154 | INX |
156 | 155 | RTS |
157 | 156 | * |
158 | -FIND LDX #PRGM FIND LINE | |
157 | +FIND LDX #PRGM ; FIND LINE | |
159 | 158 | FND2 STX SAVE11 |
160 | 159 | CPX AMPR |
161 | 160 | BEQ RTS1 |
@@ -167,44 +166,44 @@ FND2 STX SAVE11 | ||
167 | 166 | FND3 BSR NXTXT |
168 | 167 | BRA FND2 |
169 | 168 | * |
170 | -SET LDAA #$FF SET NOT EQUAL | |
169 | +SET LDAA #$FF ; SET NOT EQUAL | |
171 | 170 | RTS1 RTS |
172 | 171 | * |
173 | -EVALU JSR EVAL EVALUATE LINE | |
172 | +EVALU JSR EVAL ; EVALUATE LINE | |
174 | 173 | PSHB |
175 | 174 | PSHA |
176 | 175 | LDX SAVE7 |
177 | 176 | JSR CONVP |
178 | 177 | PULA |
179 | - CMPB #'$ STRING? | |
178 | + CMPB #'$ ; STRING? | |
180 | 179 | BNE AR1 |
181 | 180 | PULB |
182 | - JMP OUTCH THEN PRINT IT | |
183 | -AR1 SUBB #'? PRINT? | |
184 | - BEQ PRNT THEN DO IT | |
185 | - INCB MACHINE LANGUAGE? | |
181 | + JMP OUTCH ; THEN PRINT IT | |
182 | +AR1 SUBB #'? ; PRINT? | |
183 | + BEQ PRNT ; THEN DO IT | |
184 | + INCB ; MACHINE LANGUAGE? | |
186 | 185 | PULB |
187 | 186 | BNE AR2 |
188 | - SWI THEN INTERUPT | |
187 | + SWI ; THEN INTERUPT | |
189 | 188 | * |
190 | -AR2 STAA 0,X STORE NEW VALUE | |
189 | +AR2 STAA 0,X ; STORE NEW VALUE | |
191 | 190 | STAB 1,X |
192 | - ADDB QUITE RANDOMIZER | |
191 | + ADDB QUITE ; RANDOMIZER | |
193 | 192 | ADCA QUITE+1 |
194 | 193 | STAA QUITE |
195 | 194 | STAB QUITE+1 |
196 | 195 | RTS |
197 | 196 | * |
198 | -SKP2 BSR FIND FIND LINE | |
199 | - BEQ INSRT IF NOT THERE | |
200 | - LDX 0,X THEN INSERT | |
201 | - CPX DOLR NEW LINE | |
197 | +SKP2 BSR FIND ; FIND LINE | |
198 | + BEQ INSRT ; IF NOT THERE | |
199 | + LDX 0,X ; THEN INSERT | |
200 | + CPX DOLR ; NEW LINE | |
202 | 201 | BNE INSRT |
203 | 202 | * |
204 | - BSR NXTXT SETUP REGISTERS | |
205 | - LDS SAVE11 FOR DELETE | |
203 | + BSR NXTXT ; SETUP REGISTERS | |
204 | + LDS SAVE11 ; FOR DELETE | |
206 | 205 | * |
207 | -DELT CPX AMPR DELETE OLD LINE | |
206 | +DELT CPX AMPR ; DELETE OLD LINE | |
208 | 207 | BEQ FITIT |
209 | 208 | LDAA 0,X |
210 | 209 | PSHA |
@@ -213,42 +212,42 @@ DELT CPX AMPR DELETE OLD LINE | ||
213 | 212 | INS |
214 | 213 | BRA DELT |
215 | 214 | * |
216 | -FITIT STS AMPR STORE NEW END | |
215 | +FITIT STS AMPR ; STORE NEW END | |
217 | 216 | * |
218 | -INSRT LDX SAVE8 COUNT NEW LINE LENGTH | |
217 | +INSRT LDX SAVE8 ; COUNT NEW LINE LENGTH | |
219 | 218 | LDAB #$03 |
220 | 219 | TST 0,X |
221 | - BEQ GOTIT IF NO LINE THEN STOP | |
220 | + BEQ GOTIT ; IF NO LINE THEN STOP | |
222 | 221 | CNTLN INCB |
223 | 222 | INX |
224 | 223 | TST 0,X |
225 | 224 | BNE CNTLN |
226 | 225 | * |
227 | -OPEN CLRA CALCULATE NEW END | |
226 | +OPEN CLRA ; CALCULATE NEW END | |
228 | 227 | ADDB AMPR+1 |
229 | 228 | ADCA AMPR |
230 | 229 | STAA SAVE10 |
231 | 230 | STAB SAVE10+1 |
232 | 231 | SUBB STAR+1 |
233 | 232 | SBCA STAR |
234 | - BCC RSTRT IF TOO BIG THEN STOP | |
233 | + BCC RSTRT ; IF TOO BIG THEN STOP | |
235 | 234 | LDX AMPR |
236 | 235 | LDS SAVE10 |
237 | 236 | STS AMPR |
238 | 237 | * |
239 | - INX SLIDE OPEN GAP | |
238 | + INX ; SLIDE OPEN GAP | |
240 | 239 | SLIDE DEX |
241 | 240 | LDAB 0,X |
242 | 241 | PSHB |
243 | 242 | CPX SAVE11 |
244 | 243 | BNE SLIDE |
245 | 244 | * |
246 | -DON LDS DOLR STORE LINE # | |
245 | +DON LDS DOLR ; STORE LINE # | |
247 | 246 | STS 0,X |
248 | - LDS SAVE8 GET NEW LINE | |
247 | + LDS SAVE8 ; GET NEW LINE | |
249 | 248 | DES |
250 | 249 | * |
251 | -MOVL INX INSERT NEW LINE | |
250 | +MOVL INX ; INSERT NEW LINE | |
252 | 251 | PULB |
253 | 252 | STAB 1,X |
254 | 253 | BNE MOVL |
@@ -258,8 +257,8 @@ GOTIT LDS #STACK | ||
258 | 257 | * |
259 | 258 | RSTRT JMP START |
260 | 259 | * |
261 | -PRNT PULB PRINT DECIMAL | |
262 | -PRNT2 LDX #DECBUF CONVERT TO DECIMAL | |
260 | +PRNT PULB ; PRINT DECIMAL | |
261 | +PRNT2 LDX #DECBUF ; CONVERT TO DECIMAL | |
263 | 262 | STX SAVE4 |
264 | 263 | LDX #PWRS10 |
265 | 264 | CVD1 STX SAVE5 |
@@ -282,41 +281,41 @@ CVD1 STX SAVE5 | ||
282 | 281 | BNE CVD1 |
283 | 282 | * |
284 | 283 | LDX #DECB_1 |
285 | - COM 5,X ZERO SUPPRESS | |
284 | + COM 5,X ; ZERO SUPPRESS | |
286 | 285 | ZRSUP INX |
287 | 286 | LDAB 0,X |
288 | 287 | CMPB #'0 |
289 | 288 | BEQ ZRSUP |
290 | 289 | COM LASTD |
291 | 290 | * |
292 | -PNTMSG CLRA ZERO FOR DELIM | |
293 | -STRTMS STAA DELIM STORE DELIMTER | |
291 | +PNTMSG CLRA ; ZERO FOR DELIM | |
292 | +STRTMS STAA DELIM ; STORE DELIMTER | |
294 | 293 | * |
295 | -OUTMSG LDAB 0,X GENERAL PURPOSE PRINT | |
294 | +OUTMSG LDAB 0,X ; GENERAL PURPOSE PRINT | |
296 | 295 | INX |
297 | 296 | CMPB DELIM |
298 | 297 | BEQ CTLC |
299 | 298 | JSR OUTCH |
300 | 299 | BRA OUTMSG |
301 | 300 | * |
302 | -CTLC JSR POLCAT POL FOR CHARACTER | |
301 | +CTLC JSR POLCAT ; POL FOR CHARACTER | |
303 | 302 | BCC RTS2 |
304 | 303 | BSR INCH2 |
305 | - CMPB #BREAK BREAK KEY? | |
304 | + CMPB #BREAK ; BREAK KEY? | |
306 | 305 | BEQ RSTRT |
307 | 306 | * |
308 | 307 | INCH2 JMP INCH |
309 | 308 | * |
310 | -STRING BSR STRTMS PRINT STRING LITERAL | |
309 | +STRING BSR STRTMS ; PRINT STRING LITERAL | |
311 | 310 | LDAA 0,X |
312 | 311 | CMPA #'; |
313 | 312 | BEQ OUTD |
314 | 313 | JMP CRLF |
315 | 314 | * |
316 | -EVAL BSR GETVAL EVALUATE EXPRESSION | |
315 | +EVAL BSR GETVAL ; EVALUATE EXPRESSION | |
317 | 316 | * |
318 | 317 | NXTRM PSHA |
319 | - LDAA 0,X END OF LINE? | |
318 | + LDAA 0,X ; END OF LINE? | |
320 | 319 | BEQ OUTN |
321 | 320 | CMPA #') |
322 | 321 | OUTN PULA |
@@ -325,7 +324,7 @@ OUTN PULA | ||
325 | 324 | LDX SAVE0 |
326 | 325 | BRA NXTRM |
327 | 326 | * |
328 | -TERM PSHA GET VALUE | |
327 | +TERM PSHA ; GET VALUE | |
329 | 328 | PSHB |
330 | 329 | LDAA 0,X |
331 | 330 | PSHA |
@@ -338,11 +337,11 @@ TERM PSHA GET VALUE | ||
338 | 337 | PULA |
339 | 338 | PULB |
340 | 339 | * |
341 | - CMPA #'* SEE IF * | |
340 | + CMPA #'* ; SEE IF * | |
342 | 341 | BNE EVAL2 |
343 | - PULA MULTIPLY | |
342 | + PULA ; MULTIPLY | |
344 | 343 | MULTIP STAA SAVE2 |
345 | - STAB SAVE2+1 2'S COMPLEMENT | |
344 | + STAB SAVE2+1 ; 2'S COMPLEMENT | |
346 | 345 | LDAB #$10 |
347 | 346 | STAB SAVE1 |
348 | 347 | CLRA |
@@ -355,12 +354,12 @@ MULTI BSR ADD | ||
355 | 354 | NOAD ASL 1,X |
356 | 355 | ROL 0,X |
357 | 356 | DEC SAVE1 |
358 | - BNE MULT LOOP TIL DONE | |
357 | + BNE MULT ; LOOP TIL DONE | |
359 | 358 | RTS2 RTS |
360 | 359 | * |
361 | -GETVAL JSR CVBIN GET VALUE | |
360 | +GETVAL JSR CVBIN ; GET VALUE | |
362 | 361 | BCC OUTV |
363 | - CMPB #'? OF LITERAL | |
362 | + CMPB #'? ; OF LITERAL | |
364 | 363 | BNE VAR |
365 | 364 | STX SAVE9 ; OR INPUT |
366 | 365 | JSR INLN |
@@ -384,48 +383,48 @@ VAR1 CMPB #'( | ||
384 | 383 | VAR2 BSR CONVP ; OR VARIABLE |
385 | 384 | LDAA 0,X ; OR ARRAY ELEMENT |
386 | 385 | LDAB 1,X |
387 | - LDX SAVE6 LOAD OLD INDEX | |
386 | + LDX SAVE6 ; LOAD OLD INDEX | |
388 | 387 | RTS |
389 | 388 | * |
390 | -ARRAY BSR EVAL LOCATE ARRAY ELEMENT | |
389 | +ARRAY BSR EVAL ; LOCATE ARRAY ELEMENT | |
391 | 390 | ASLB |
392 | 391 | ROLA |
393 | 392 | ADDB AMPR+1 |
394 | 393 | ADCA AMPR |
395 | 394 | BRA PACK |
396 | 395 | * |
397 | -CONVP LDAB 0,X GET LOCATION | |
396 | +CONVP LDAB 0,X ; GET LOCATION | |
398 | 397 | INX |
399 | 398 | PSHB |
400 | 399 | CMPB #': |
401 | - BEQ ARRAY OF VARIABLE OR | |
402 | - CLRA ARRAY ELEMENT | |
400 | + BEQ ARRAY ; OF VARIABLE OR | |
401 | + CLRA ; ARRAY ELEMENT | |
403 | 402 | ANDB #$3F |
404 | 403 | ADDB #$02 |
405 | 404 | ASLB |
406 | 405 | * |
407 | -PACK STX SAVE6 STORE OLD INDEX | |
406 | +PACK STX SAVE6 ; STORE OLD INDEX | |
408 | 407 | STAA SAVE4 |
409 | 408 | STAB SAVE4+1 |
410 | - LDX SAVE4 LOAD NEW INDEX | |
409 | + LDX SAVE4 ; LOAD NEW INDEX | |
411 | 410 | PULB |
412 | 411 | RTS |
413 | 412 | * |
414 | -EVAL2 CMPA #'+ ADDITION | |
413 | +EVAL2 CMPA #'+ ; ADDITION | |
415 | 414 | BNE EVAL3 |
416 | 415 | PULA |
417 | 416 | ADD ADDB 1,X |
418 | 417 | ADCA 0,X |
419 | 418 | RTS |
420 | 419 | * |
421 | -EVAL3 CMPA #'- SUBTRACTION | |
420 | +EVAL3 CMPA #'- ; SUBTRACTION | |
422 | 421 | BNE EVAL4 |
423 | 422 | PULA |
424 | 423 | SUBTR SUBB 1,X |
425 | 424 | SBCA 0,X |
426 | 425 | RTS |
427 | 426 | * |
428 | -EVAL4 CMPA #'/ SEE IF IT'S DIVIDE | |
427 | +EVAL4 CMPA #'/ ; SEE IF IT'S DIVIDE | |
429 | 428 | BNE EVAL5 |
430 | 429 | PULA |
431 | 430 | BSR DIVIDE |
@@ -435,7 +434,7 @@ EVAL4 CMPA #'/ SEE IF IT'S DIVIDE | ||
435 | 434 | LDAB SAVE2+1 |
436 | 435 | RTS |
437 | 436 | * |
438 | -EVAL5 SUBA #'= SEE IF EQUAL TEST | |
437 | +EVAL5 SUBA #'= ; SEE IF EQUAL TEST | |
439 | 438 | BNE EVAL6 |
440 | 439 | PULA |
441 | 440 | BSR SUBTR |
@@ -445,7 +444,7 @@ EVAL5 SUBA #'= SEE IF EQUAL TEST | ||
445 | 444 | NOTEQ LDAB #$FF |
446 | 445 | EQL BRA COMBOUT |
447 | 446 | * |
448 | -EVAL6 DECA SEE IF LESS THAN TEST | |
447 | +EVAL6 DECA ; SEE IF LESS THAN TEST | |
449 | 448 | PULA |
450 | 449 | BEQ EVAL7 |
451 | 450 | * |
@@ -459,18 +458,18 @@ EVAL7 BSR SUB2 ; GT TEST | ||
459 | 458 | COMBOUT COMB |
460 | 459 | BRA COMOUT |
461 | 460 | * |
462 | -PWRS10 FCB $27 10000 | |
461 | +PWRS10 FCB $27 ; 10000 | |
463 | 462 | FCB $10 |
464 | - FCB $03 1000 | |
463 | + FCB $03 ; 1000 | |
465 | 464 | FCB $E8 |
466 | - FCB $00 100 | |
465 | + FCB $00 ; 100 | |
467 | 466 | FCB $64 |
468 | - FCB $00 10 | |
467 | + FCB $00 ; 10 | |
469 | 468 | FCB $0A |
470 | - FCB $00 1 | |
469 | + FCB $00 ; 1 | |
471 | 470 | FCB $01 |
472 | 471 | * |
473 | -DIVIDE CLR SAVE1 DEVIDE 16-BITS | |
472 | +DIVIDE CLR SAVE1 ; DEVIDE 16-BITS | |
474 | 473 | GOT INC SAVE1 |
475 | 474 | ASL 1,X |
476 | 475 | ROL 0,X |
@@ -483,7 +482,7 @@ DIV2 BSR SUBTR | ||
483 | 482 | BCC OK |
484 | 483 | BSR ADD |
485 | 484 | CLC |
486 | - FCB $9C WHAT? | |
485 | + FCB $9C ; WHAT? | |
487 | 486 | OK SEC |
488 | 487 | ROL SAVE2+1 |
489 | 488 | ROL SAVE2 |
@@ -493,7 +492,7 @@ OK SEC | ||
493 | 492 | ROR 1,X |
494 | 493 | BRA DIV2 |
495 | 494 | * |
496 | -TSTN LDAB 0,X TEST FOR NUMERIC | |
495 | +TSTN LDAB 0,X ; TEST FOR NUMERIC | |
497 | 496 | CMPB #$3A |
498 | 497 | BPL NOTDEC |
499 | 498 | CMPB #'0 |
@@ -505,7 +504,7 @@ DUN RTS | ||
505 | 504 | * |
506 | 505 | CVTLN BSR INLN |
507 | 506 | * |
508 | -CVBIN BSR TSTN CONVERT TO BINARY | |
507 | +CVBIN BSR TSTN ; CONVERT TO BINARY | |
509 | 508 | BCS DUN |
510 | 509 | CONT CLRA |
511 | 510 | CLRB |
@@ -530,32 +529,32 @@ CBLOOP ADDB 0,X | ||
530 | 529 | ROLA |
531 | 530 | BRA CBLOOP |
532 | 531 | * |
533 | -INLN6 CMPB #'@ CANCEL | |
532 | +INLN6 CMPB #'@ ; CANCEL | |
534 | 533 | BEQ NEWLIN |
535 | - INX '.' | |
536 | - CPX #74 LINE LENGTH +2 | |
534 | + INX ; '.' | |
535 | + CPX #74 ; LINE LENGTH +2 | |
537 | 536 | BNE INLN2 |
538 | 537 | NEWLIN BSR CRLF |
539 | 538 | * |
540 | -INLN LDX #2 INPUT LINE FROM TERMINAL | |
539 | +INLN LDX #2 ; INPUT LINE FROM TERMINAL | |
541 | 540 | INLN5 DEX |
542 | 541 | BEQ NEWLIN |
543 | -INLN2 JSR INCH INPUT CHARACTER | |
544 | - STAB $87,X STORE IT | |
545 | - CMPB #$5F BACKSPACE? | |
542 | +INLN2 JSR INCH ; INPUT CHARACTER | |
543 | + STAB $87,X ; STORE IT | |
544 | + CMPB #$5F ; BACKSPACE? | |
546 | 545 | BEQ INLN5 |
547 | 546 | * |
548 | -INLIN3 CMPB #$0D CARRIAGE RETURN | |
547 | +INLIN3 CMPB #$0D ; CARRIAGE RETURN | |
549 | 548 | BMI INLN2 |
550 | 549 | BNE INLN6 |
551 | 550 | * |
552 | -INLIN4 CLR $87,X CLEAR LAST CHAR | |
551 | +INLIN4 CLR $87,X ; CLEAR LAST CHAR | |
553 | 552 | LDX #LINBUF |
554 | 553 | BRA LF |
555 | 554 | * |
556 | -CRLF LDAB #$0D CARR-RET | |
555 | +CRLF LDAB #$0D ; CARR-RET | |
557 | 556 | BSR OUTCH2 |
558 | -LF LDAB #$0A LINE FEED | |
557 | +LF LDAB #$0A ; LINE FEED | |
559 | 558 | OUTCH2 JMP OUTCH |
560 | 559 | * |
561 | 560 | OKM FCB $0D |