• 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

Revisionb68d967e5cea256a6c148117634016d282c03704 (tree)
Time2022-09-25 19:56:00
AuthorJoel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Log Message

Went too far too fast

Change Summary

Incremental Difference

--- a/VTL_runtime.ASM
+++ b/VTL_runtime.ASM
@@ -3,7 +3,7 @@
33 * 9-23-76
44 * BY GARY SHANNON
55 * & FRANK MCCOY
6-* COPYWRIGHT 1976, THE COMPUTER STORE
6+* Original version COPYRIGHT 1976, THE COMPUTER STORE
77 *
88 * Modified 2022 by Joel Rees
99 *
@@ -56,13 +56,14 @@ RSTKSZ EQU 24 ; 2 bytes per call, room for interrupts
5656
5757 * DEFINE LOCATIONS IN MONITOR
5858 * INCH EQU $FF00 ; per VTL.ASM
59-* INCH EQU $F012 ; exorsim mdos Input byte with echo unless AECHO is set
59+EINCH EQU $F012 ; exorsim mdos Input byte with echo unless AECHO is set
6060 * INCH EQU $F015 ; exorsim mdos Input char with echo (F012 -> strip bit 7)
6161 * POLCAT EQU $FF24 ; from VTL.ASM
6262 * POLCAT EQU POLCATROB ; dummy return, assume INCH takes care of things
6363 * OUTCH EQU $FF81 ; from VTL.ASM
64-* OUTCH EQU $F018 ; exorsim mdos Output character with NULs
64+EOUTCH EQU $F018 ; exorsim mdos Output character with NULs
6565 * OUTS EQU $FF82 ; from VTL.ASM
66+EPCRLF EQU $F021 ; Primarily for forced initialization in exorsim.
6667 ******* Want to define these at bottom because of POLCAT, but ...
6768 *
6869 * FOR SBC6800
@@ -167,13 +168,13 @@ USTKINI EQU *
167168
168169 RSTKLIM RMB RSTKSZ
169170 RSTKINI EQU *
170-STACK EQU RSTKINI-1 ; See TSX/TXS function for why.
171+STACK EQU RSTKINI-1 ; See TSX/TXS op-code for why.
171172 RMB 8 ; buffer zone
172173
173174 STALTOP EQU *
174175
175176
176-* Most assemblers are scared of address calculations,
177+* Most early assemblers are scared of address calculations,
177178 * So do this in your head:
178179 * IF STATLIM >= ALLIMIT
179180 * ERROR "Move stack allocations higher!"
@@ -196,15 +197,16 @@ CODE EQU *
196197 PRGM EQU * ; PROGRAM STARTS HERE
197198 *
198199 *
199-START LDS #STACK ; S on 6800 is first free byte on stack.
200- LDX #USTKINI ; U stack will be top byte (last pushed).
201- STX vUSP
200+ ORG $7800
201+COLD LDS #STACK ; S on 6800 is first free byte on stack.
202+ JSR TRMINI
202203 LDX #GLOBASE
203204 STX vTASK
204- BRA REALSTART
205+START
206+ LDS #STACK ; reset the stack
207+ LDX #USTKINI ; U stack will be top byte (last pushed).
208+ STX vUSP
205209 *
206-
207-REALSTART
208210 CLRA
209211 LDX #OKM
210212 BSR STRGT
@@ -667,8 +669,11 @@ INLN6 CMPB #'@ ; CANCEL
667669 BNE INLN2
668670 NEWLIN BSR CRLF
669671 *
670-INLN LDX #2 ; INPUT LINE FROM TERMINAL
672+INLN LDX vTASK ;#2 ; INPUT LINE FROM TERMINAL
673+ INX
674+*************
671675 INLN5 DEX
676+ CPX
672677 BEQ NEWLIN
673678 INLN2 JSR INCH ; INPUT CHARACTER
674679 STAB $87,X ; STORE IT
@@ -683,6 +688,7 @@ INLIN4 CLR $87,X ; CLEAR LAST CHAR
683688 LDX #LINBUF
684689 BRA LF
685690 *
691+*CRLF JSR EPCRLF
686692 CRLF LDAB #$0D ; CARR-RET
687693 BSR OUTCH2
688694 LF LDAB #$0A ; LINE FEED
@@ -690,34 +696,38 @@ OUTCH2 JMP OUTCH
690696 *
691697 OKM FCB $0D
692698 FCB $0A
699+ FCC ' DONE'
700+ FCB $0D
701+ FCB $0A
693702 FCC 'OK'
694703 FCB $00
695704 *
696-* RECIVE POLING
705+TRMINI LDAB #40
706+TRMILP JSR EPCRLF
707+ DECB
708+ BNE TRMILP
709+ RTS
710+*
711+* RECEIVER POLLING
697712 POLCAT LDAB ACIACS
698713 ASRB
699714 RTS
700715 *
701-* INPUT ONE CHAR INTO A-REGISTER
702-INCH BSR POLCAT
703- BCC INCH RECEIVE NOT READY
704- LDAB ACIADA INPUT CHARACTER
705- ANDB #$7F RESET PARITY BIT
706- CMPB #$7F
707- BEQ INCH IF RUBOUT, GET NEXT CHAR
708- BSR OUTCH
716+* INPUT ONE CHAR INTO B ACCUMULATOR
717+INCH PSHA
718+ JSR EINCH
719+ TAB
720+ PULA
709721 RTS
710722 *
711723 * OUTPUT ONE CHAR
712-OUTCH PSHB
713-OUTCH1 BSR POLCAT
714- ASRB
715- BCC OUTCH1
716- PULB
717- STAB ACIADA
724+OUTCH PSHA
725+ TBA
726+ JSR EOUTCH
727+ PULA
718728 RTS
719729 *
720- ORG START
730+ ORG COLD
721731 *
722732 END
723733