I have made a Github-repository for my ZX81-programs:
https://github.com/mobluse/zx81-mob
Since Github prefers text-files I converted them to ZXText2P-format using a modified version of p2txt that is also in the same repository. There are also some ported programs from More BASIC Computer Games edited by David H. Ahl, published 1979.
More programs and p-files are here:
http://www.df.lth.se.orbin.se/~mikaelb/sinclair/zx81/
I was thinking of improving p2txt further by showing not used characters as hex-codes and use hex-codes for the **-operator and all keywords and functions in REM-statements, e.g. \C4 is CODE in a REM-statement. Then I first have to change ZXText2P so that it can handle this. This would make it possible to convert more programs from bas- to p-files. Any opinions about this?
Github repository w/ ZX81 BASIC-programs
Github repository w/ ZX81 BASIC-programs
Started w/ BASIC on ABC80 & ZX81 then Forth, Z80… http://scratch.mit.edu/users/mobluse/ https://www.youtube.com/user/MOBiL4u/ https://twitter.com/mobluse/
Re: Github repository w/ ZX81 BASIC-programs
Has a "zxml" format been suggested before perhaps? With entities such as &input; and hex codes preceded as usual with hash, so something around
Code: Select all
<sysvars>
...
</sysvars>
<program>
<lineno>10</lineno><statement>&rem;#c9/statement>
<lineno>20</lineno><statement>&rand;&usr;#4082</statement>
</program>
<display>
...
</display>
<vars>
...
</vars>
Re: Github repository w/ ZX81 BASIC-programs
Perhaps you could routinely encode all REM statements which contain non-alphanumerics as hex streams. It would be neater, maybe.
Forget XML. Just my 2€ worth.
Forget XML. Just my 2€ worth.
Re: Github repository w/ ZX81 BASIC-programs
I agree to that XML would not be very suitable for Github since one wants the files in an easily editable text-format. One could have REM:s with hex-streams e.g.:sirmorris wrote:Perhaps you could routinely encode all REM statements which contain non-alphanumerics as hex streams. It would be neater, maybe.
Forget XML. Just my 2€ worth.
1 REM \*2A0C40C9
1 REM [HEX: 2A,0C,40,C9]
(The second notation comes from ZxToken.zip.)
If one wants to mix hex and ordinary code:
1 REM \2A\0C\40\C9 LD HL,(D_FILE);RET
1 REM \*2A0C40C9*\ LD HL,(D_FILE);RET
1 REM [HEX: 2A,0C,40,C9] LD HL,(D_FILE);RET
The system variables are constructed by ZXText2P. If one has a program that has non-typical system-variables one could in a future version of ZXText2P load the content of REM-statements to those addresses using negative line numbers and have the address after @, e.g.
-10 REM @403C \*2A0C40C9
-10 REM @403C [HEX: 2A,0C,40,C9]
or
-10 REM @403C \2A\0C\40\C9
If one wanted to add to the display or variables area one could add REM-statements after the BASIC-program using line numbers with plus:
+10000 REM @D_FILE \*2A0C40C9
+10000 REM @D_FILE [HEX: 2A,0C,40,C9]
+10010 REM @VARS \*2A0C40C9
+10010 REM @VARS [HEX: 2A,0C,40,C9]
+10020 REM @VARS+5*4 \*2A0C40C9
+10020 REM @VARS+5*4 [HEX: 2A,0C,40,C9]
Started w/ BASIC on ABC80 & ZX81 then Forth, Z80… http://scratch.mit.edu/users/mobluse/ https://www.youtube.com/user/MOBiL4u/ https://twitter.com/mobluse/