• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Deriving a new dialect of Very Tiny Language from VTL-2 6800 version


Commit MetaInfo

Revisãobdfde7319a13b935a217dc69b1d90faa19d95e3e (tree)
Hora2022-09-25 19:44:02
AutorJoel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Mensagem de Log

semicolons to solve the SP problems

Mudança Sumário

  • delete: VTL_spacey.ASM => VTL_semicolons.ASM

Diff

--- a/VTL_spacey.ASM
+++ b/VTL_semicolons.ASM
@@ -1,4 +1,3 @@
1- OPT PRT
21 * VTL-2
32 * V-3.6
43 * 9-23-76
@@ -7,22 +6,22 @@
76 * COPYWRIGHT 1976, THE COMPUTER STORE
87 *
98 * 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
1413 *
1514 * FOR SBC6800
16-BREAK EQU $1B BREAK KEY
15+BREAK EQU $1B ; BREAK KEY
1716 *
1817 * SET ASIDE FOUR BYTES FOR USER
1918 * DEFINED INTERUPT ROUTINE IF NEEDED
2019 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
2322 *
2423 * GENERAL PURPOSE STORRGE
25-VARS RMB 52 VARIRBLES(A-Z)
24+VARS RMB 52 ; VARIABLES(A-Z)
2625 BRAK RMB 2 ; [
2726 SAVE10 RMB 2 ; BACK SLASH
2827 BRIK RMB 2 ; ]
@@ -56,25 +55,25 @@ SAVE6 RMB 2
5655 SAVE7 RMB 2
5756 SAVE8 RMB 2
5857 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 ; >
6463 DECB_1 RMB 1
6564 *
6665 DECBUF RMB 4
6766 LASTD RMB 1
6867 DELIM RMB 1
69-LINBUF RMB 73 LINE LENGTH +1
68+LINBUF RMB 73 ; LINE LENGTH +1
7069 *
7170 ORG $00F1
7271 STACK RMB 1
7372 *
7473 ORG $0100
75-MI RMB 4 INTERUPT VECTORS
74+MI RMB 4 ; INTERUPT VECTORS
7675 NMI RMB 4
77-PRGM EQU * PROGRAM STARTS HERE
76+PRGM EQU * ; PROGRAM STARTS HERE
7877 *
7978 ORG $FC00
8079 *
@@ -87,56 +86,56 @@ LOOP CLRA
8786 STAA DOLR
8887 STAA DOLR+1
8988 JSR CVTLN
90- BCC STMNT NO LINE# THEN EXEC
89+ BCC STMNT ; NO LINE# THEN EXEC
9190 BSR EXEC
9291 BEQ START
9392 *
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
117116 JSR VAR2
118117 INX
119118 *
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 #
123122 RTS
124123 *
125-EVIL CMPA #$22 IF " THEN BRANCH
124+EVIL CMPA #$22 ; IF " THEN BRANCH
126125 BNE EVALU
127126 INX
128-STRGT JMP STRING TO PRINT IT
127+STRGT JMP STRING ; TO PRINT IT
129128 *
130-STMNT STX SAVE8 SAVE LINE #
129+STMNT STX SAVE8 ; SAVE LINE #
131130 STAA DOLR
132131 STAB DOLR+1
133132 LDX DOLR
134- BNE SKP2 IF LINE# <> 0
133+ BNE SKP2 ; IF LINE# <> 0
135134 *
136- LDX #PRGM LIST PROGRAM
137-LST2 CPX AMPR END OF PROGRAM
135+ LDX #PRGM ; LIST PROGRAM
136+LST2 CPX AMPR ; END OF PROGRAM
138137 BEQ EQSTRT
139- STX SAVE11 LINE # FOR CVDEC
138+ STX SAVE11 ; LINE # FOR CVDEC
140139 LDAA 0,X
141140 LDAB 1,X
142141 JSR PRNT2
@@ -147,15 +146,15 @@ LST2 CPX AMPR END OF PROGRAM
147146 JSR CRLF
148147 BRA LST2
149148 *
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
153152 TST 0,X
154153 BNE LOOKAG
155154 INX
156155 RTS
157156 *
158-FIND LDX #PRGM FIND LINE
157+FIND LDX #PRGM ; FIND LINE
159158 FND2 STX SAVE11
160159 CPX AMPR
161160 BEQ RTS1
@@ -167,44 +166,44 @@ FND2 STX SAVE11
167166 FND3 BSR NXTXT
168167 BRA FND2
169168 *
170-SET LDAA #$FF SET NOT EQUAL
169+SET LDAA #$FF ; SET NOT EQUAL
171170 RTS1 RTS
172171 *
173-EVALU JSR EVAL EVALUATE LINE
172+EVALU JSR EVAL ; EVALUATE LINE
174173 PSHB
175174 PSHA
176175 LDX SAVE7
177176 JSR CONVP
178177 PULA
179- CMPB #'$ STRING?
178+ CMPB #'$ ; STRING?
180179 BNE AR1
181180 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?
186185 PULB
187186 BNE AR2
188- SWI THEN INTERUPT
187+ SWI ; THEN INTERUPT
189188 *
190-AR2 STAA 0,X STORE NEW VALUE
189+AR2 STAA 0,X ; STORE NEW VALUE
191190 STAB 1,X
192- ADDB QUITE RANDOMIZER
191+ ADDB QUITE ; RANDOMIZER
193192 ADCA QUITE+1
194193 STAA QUITE
195194 STAB QUITE+1
196195 RTS
197196 *
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
202201 BNE INSRT
203202 *
204- BSR NXTXT SETUP REGISTERS
205- LDS SAVE11 FOR DELETE
203+ BSR NXTXT ; SETUP REGISTERS
204+ LDS SAVE11 ; FOR DELETE
206205 *
207-DELT CPX AMPR DELETE OLD LINE
206+DELT CPX AMPR ; DELETE OLD LINE
208207 BEQ FITIT
209208 LDAA 0,X
210209 PSHA
@@ -213,42 +212,42 @@ DELT CPX AMPR DELETE OLD LINE
213212 INS
214213 BRA DELT
215214 *
216-FITIT STS AMPR STORE NEW END
215+FITIT STS AMPR ; STORE NEW END
217216 *
218-INSRT LDX SAVE8 COUNT NEW LINE LENGTH
217+INSRT LDX SAVE8 ; COUNT NEW LINE LENGTH
219218 LDAB #$03
220219 TST 0,X
221- BEQ GOTIT IF NO LINE THEN STOP
220+ BEQ GOTIT ; IF NO LINE THEN STOP
222221 CNTLN INCB
223222 INX
224223 TST 0,X
225224 BNE CNTLN
226225 *
227-OPEN CLRA CALCULATE NEW END
226+OPEN CLRA ; CALCULATE NEW END
228227 ADDB AMPR+1
229228 ADCA AMPR
230229 STAA SAVE10
231230 STAB SAVE10+1
232231 SUBB STAR+1
233232 SBCA STAR
234- BCC RSTRT IF TOO BIG THEN STOP
233+ BCC RSTRT ; IF TOO BIG THEN STOP
235234 LDX AMPR
236235 LDS SAVE10
237236 STS AMPR
238237 *
239- INX SLIDE OPEN GAP
238+ INX ; SLIDE OPEN GAP
240239 SLIDE DEX
241240 LDAB 0,X
242241 PSHB
243242 CPX SAVE11
244243 BNE SLIDE
245244 *
246-DON LDS DOLR STORE LINE #
245+DON LDS DOLR ; STORE LINE #
247246 STS 0,X
248- LDS SAVE8 GET NEW LINE
247+ LDS SAVE8 ; GET NEW LINE
249248 DES
250249 *
251-MOVL INX INSERT NEW LINE
250+MOVL INX ; INSERT NEW LINE
252251 PULB
253252 STAB 1,X
254253 BNE MOVL
@@ -258,8 +257,8 @@ GOTIT LDS #STACK
258257 *
259258 RSTRT JMP START
260259 *
261-PRNT PULB PRINT DECIMAL
262-PRNT2 LDX #DECBUF CONVERT TO DECIMAL
260+PRNT PULB ; PRINT DECIMAL
261+PRNT2 LDX #DECBUF ; CONVERT TO DECIMAL
263262 STX SAVE4
264263 LDX #PWRS10
265264 CVD1 STX SAVE5
@@ -282,41 +281,41 @@ CVD1 STX SAVE5
282281 BNE CVD1
283282 *
284283 LDX #DECB_1
285- COM 5,X ZERO SUPPRESS
284+ COM 5,X ; ZERO SUPPRESS
286285 ZRSUP INX
287286 LDAB 0,X
288287 CMPB #'0
289288 BEQ ZRSUP
290289 COM LASTD
291290 *
292-PNTMSG CLRA ZERO FOR DELIM
293-STRTMS STAA DELIM STORE DELIMTER
291+PNTMSG CLRA ; ZERO FOR DELIM
292+STRTMS STAA DELIM ; STORE DELIMTER
294293 *
295-OUTMSG LDAB 0,X GENERAL PURPOSE PRINT
294+OUTMSG LDAB 0,X ; GENERAL PURPOSE PRINT
296295 INX
297296 CMPB DELIM
298297 BEQ CTLC
299298 JSR OUTCH
300299 BRA OUTMSG
301300 *
302-CTLC JSR POLCAT POL FOR CHARACTER
301+CTLC JSR POLCAT ; POL FOR CHARACTER
303302 BCC RTS2
304303 BSR INCH2
305- CMPB #BREAK BREAK KEY?
304+ CMPB #BREAK ; BREAK KEY?
306305 BEQ RSTRT
307306 *
308307 INCH2 JMP INCH
309308 *
310-STRING BSR STRTMS PRINT STRING LITERAL
309+STRING BSR STRTMS ; PRINT STRING LITERAL
311310 LDAA 0,X
312311 CMPA #';
313312 BEQ OUTD
314313 JMP CRLF
315314 *
316-EVAL BSR GETVAL EVALUATE EXPRESSION
315+EVAL BSR GETVAL ; EVALUATE EXPRESSION
317316 *
318317 NXTRM PSHA
319- LDAA 0,X END OF LINE?
318+ LDAA 0,X ; END OF LINE?
320319 BEQ OUTN
321320 CMPA #')
322321 OUTN PULA
@@ -325,7 +324,7 @@ OUTN PULA
325324 LDX SAVE0
326325 BRA NXTRM
327326 *
328-TERM PSHA GET VALUE
327+TERM PSHA ; GET VALUE
329328 PSHB
330329 LDAA 0,X
331330 PSHA
@@ -338,11 +337,11 @@ TERM PSHA GET VALUE
338337 PULA
339338 PULB
340339 *
341- CMPA #'* SEE IF *
340+ CMPA #'* ; SEE IF *
342341 BNE EVAL2
343- PULA MULTIPLY
342+ PULA ; MULTIPLY
344343 MULTIP STAA SAVE2
345- STAB SAVE2+1 2'S COMPLEMENT
344+ STAB SAVE2+1 ; 2'S COMPLEMENT
346345 LDAB #$10
347346 STAB SAVE1
348347 CLRA
@@ -355,12 +354,12 @@ MULTI BSR ADD
355354 NOAD ASL 1,X
356355 ROL 0,X
357356 DEC SAVE1
358- BNE MULT LOOP TIL DONE
357+ BNE MULT ; LOOP TIL DONE
359358 RTS2 RTS
360359 *
361-GETVAL JSR CVBIN GET VALUE
360+GETVAL JSR CVBIN ; GET VALUE
362361 BCC OUTV
363- CMPB #'? OF LITERAL
362+ CMPB #'? ; OF LITERAL
364363 BNE VAR
365364 STX SAVE9 ; OR INPUT
366365 JSR INLN
@@ -384,48 +383,48 @@ VAR1 CMPB #'(
384383 VAR2 BSR CONVP ; OR VARIABLE
385384 LDAA 0,X ; OR ARRAY ELEMENT
386385 LDAB 1,X
387- LDX SAVE6 LOAD OLD INDEX
386+ LDX SAVE6 ; LOAD OLD INDEX
388387 RTS
389388 *
390-ARRAY BSR EVAL LOCATE ARRAY ELEMENT
389+ARRAY BSR EVAL ; LOCATE ARRAY ELEMENT
391390 ASLB
392391 ROLA
393392 ADDB AMPR+1
394393 ADCA AMPR
395394 BRA PACK
396395 *
397-CONVP LDAB 0,X GET LOCATION
396+CONVP LDAB 0,X ; GET LOCATION
398397 INX
399398 PSHB
400399 CMPB #':
401- BEQ ARRAY OF VARIABLE OR
402- CLRA ARRAY ELEMENT
400+ BEQ ARRAY ; OF VARIABLE OR
401+ CLRA ; ARRAY ELEMENT
403402 ANDB #$3F
404403 ADDB #$02
405404 ASLB
406405 *
407-PACK STX SAVE6 STORE OLD INDEX
406+PACK STX SAVE6 ; STORE OLD INDEX
408407 STAA SAVE4
409408 STAB SAVE4+1
410- LDX SAVE4 LOAD NEW INDEX
409+ LDX SAVE4 ; LOAD NEW INDEX
411410 PULB
412411 RTS
413412 *
414-EVAL2 CMPA #'+ ADDITION
413+EVAL2 CMPA #'+ ; ADDITION
415414 BNE EVAL3
416415 PULA
417416 ADD ADDB 1,X
418417 ADCA 0,X
419418 RTS
420419 *
421-EVAL3 CMPA #'- SUBTRACTION
420+EVAL3 CMPA #'- ; SUBTRACTION
422421 BNE EVAL4
423422 PULA
424423 SUBTR SUBB 1,X
425424 SBCA 0,X
426425 RTS
427426 *
428-EVAL4 CMPA #'/ SEE IF IT'S DIVIDE
427+EVAL4 CMPA #'/ ; SEE IF IT'S DIVIDE
429428 BNE EVAL5
430429 PULA
431430 BSR DIVIDE
@@ -435,7 +434,7 @@ EVAL4 CMPA #'/ SEE IF IT'S DIVIDE
435434 LDAB SAVE2+1
436435 RTS
437436 *
438-EVAL5 SUBA #'= SEE IF EQUAL TEST
437+EVAL5 SUBA #'= ; SEE IF EQUAL TEST
439438 BNE EVAL6
440439 PULA
441440 BSR SUBTR
@@ -445,7 +444,7 @@ EVAL5 SUBA #'= SEE IF EQUAL TEST
445444 NOTEQ LDAB #$FF
446445 EQL BRA COMBOUT
447446 *
448-EVAL6 DECA SEE IF LESS THAN TEST
447+EVAL6 DECA ; SEE IF LESS THAN TEST
449448 PULA
450449 BEQ EVAL7
451450 *
@@ -459,18 +458,18 @@ EVAL7 BSR SUB2 ; GT TEST
459458 COMBOUT COMB
460459 BRA COMOUT
461460 *
462-PWRS10 FCB $27 10000
461+PWRS10 FCB $27 ; 10000
463462 FCB $10
464- FCB $03 1000
463+ FCB $03 ; 1000
465464 FCB $E8
466- FCB $00 100
465+ FCB $00 ; 100
467466 FCB $64
468- FCB $00 10
467+ FCB $00 ; 10
469468 FCB $0A
470- FCB $00 1
469+ FCB $00 ; 1
471470 FCB $01
472471 *
473-DIVIDE CLR SAVE1 DEVIDE 16-BITS
472+DIVIDE CLR SAVE1 ; DEVIDE 16-BITS
474473 GOT INC SAVE1
475474 ASL 1,X
476475 ROL 0,X
@@ -483,7 +482,7 @@ DIV2 BSR SUBTR
483482 BCC OK
484483 BSR ADD
485484 CLC
486- FCB $9C WHAT?
485+ FCB $9C ; WHAT?
487486 OK SEC
488487 ROL SAVE2+1
489488 ROL SAVE2
@@ -493,7 +492,7 @@ OK SEC
493492 ROR 1,X
494493 BRA DIV2
495494 *
496-TSTN LDAB 0,X TEST FOR NUMERIC
495+TSTN LDAB 0,X ; TEST FOR NUMERIC
497496 CMPB #$3A
498497 BPL NOTDEC
499498 CMPB #'0
@@ -505,7 +504,7 @@ DUN RTS
505504 *
506505 CVTLN BSR INLN
507506 *
508-CVBIN BSR TSTN CONVERT TO BINARY
507+CVBIN BSR TSTN ; CONVERT TO BINARY
509508 BCS DUN
510509 CONT CLRA
511510 CLRB
@@ -530,32 +529,32 @@ CBLOOP ADDB 0,X
530529 ROLA
531530 BRA CBLOOP
532531 *
533-INLN6 CMPB #'@ CANCEL
532+INLN6 CMPB #'@ ; CANCEL
534533 BEQ NEWLIN
535- INX '.'
536- CPX #74 LINE LENGTH +2
534+ INX ; '.'
535+ CPX #74 ; LINE LENGTH +2
537536 BNE INLN2
538537 NEWLIN BSR CRLF
539538 *
540-INLN LDX #2 INPUT LINE FROM TERMINAL
539+INLN LDX #2 ; INPUT LINE FROM TERMINAL
541540 INLN5 DEX
542541 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?
546545 BEQ INLN5
547546 *
548-INLIN3 CMPB #$0D CARRIAGE RETURN
547+INLIN3 CMPB #$0D ; CARRIAGE RETURN
549548 BMI INLN2
550549 BNE INLN6
551550 *
552-INLIN4 CLR $87,X CLEAR LAST CHAR
551+INLIN4 CLR $87,X ; CLEAR LAST CHAR
553552 LDX #LINBUF
554553 BRA LF
555554 *
556-CRLF LDAB #$0D CARR-RET
555+CRLF LDAB #$0D ; CARR-RET
557556 BSR OUTCH2
558-LF LDAB #$0A LINE FEED
557+LF LDAB #$0A ; LINE FEED
559558 OUTCH2 JMP OUTCH
560559 *
561560 OKM FCB $0D