Page 2 of 5
Re: BASLOAD
Posted: Sat Aug 12, 2023 3:52 pm
by voidstar
Yeah, "." can work. (if no conflict with float value constants?)
But I also forgot "camel caps" in labels should also work, like "ThisLongLabel" might be good enough.
Long variables = awesome feature! Pro Edition category
Could the label and length be maybe 20 char instead of 12? (then it's a trade between total number of variables, I think you mentioned like ~2100 total per listing?)
Re: BASLOAD
Posted: Sat Aug 12, 2023 5:52 pm
by voidstar
Another feature to consider: a "no parse" option (or maybe detect if line numbers are already present in the text file) - in this mode, it just loads the input file text as if typing into the X16 BASIC. i.e. a way to load some BASIC that was prepared off-system in a text file. (otherwise I think now, we have to use -bas in the x16emu and save it back to an actual .BAS file; so an option to bring in a BASIC text file that is not dependent on the emu would be good) Maybe could be a "!I" (import) command?
NOTE for context: X16 BASIC does support two character variables already, like "AA=42". You can technically still type something like "AAZ=50" and it's not an error, but it is treated as just "AA" anyway. i.e. AAG=50, then AAH=60 will overwrite AAG. Or as in my earlier example, you could do "INPUT ANS" now, not a syntax error, but it is storing into "AN" variable. (same for string variables also)
Re: BASLOAD
Posted: Sun Aug 13, 2023 7:26 pm
by Ed Minchau
The way to load BASIC from an external text file is to select all, ctrl C, then in the X16, ctrl V. Pasting like that is interpreted by the X16 as if you were just typing really fast
Re: BASLOAD
Posted: Sun Aug 13, 2023 10:36 pm
by ahenry3068
Ed Minchau wrote: ↑Sun Aug 13, 2023 7:26 pm
The way to load BASIC from an external text file is to select all, ctrl C, then in the X16, ctrl V. Pasting like that is interpreted by the X16 as if you were just typing really fast
Very,,, very,,, very fast...
Re: BASLOAD
Posted: Mon Aug 14, 2023 9:09 am
by voidstar
But I'm meaning from the SD card on the physical hardware.
Even if a NIC or UserPort transfer option is available, something will need to adapt from ISO/ASCII over into tokenized BASIC.
Re: BASLOAD
Posted: Mon Aug 21, 2023 12:35 pm
by MarkTheStrange
Yeah, the equivalent of e.g. Atari BASIC's ENTER "textfile" for loading a BASIC program saved as text instead of a PRG was something I always missed in C= BASIC. You could _create_ such a file, albeit with an extra trailing READY prompt etc, with e.g. OPEN 2,8,2,"FILE.BAS,S,W":CMD2:LIST, but there's no way to read it back in.
You can't use arrays everywhere you can use a regular variable, for example as the loop control var in a for loop. So transpiling user-chosen variable names to arrays is a non-starter.
My preference would be to keep single-char varnames as-is and translate all others into first-letter + counter, so e.g. ENTRY and EXIT become E0 and E1, and after x9 you move up to xA, xB... xZ so you can have up to 36 variables of a given type starting with each letter (37 counting the single letter itself).
Re: BASLOAD
Posted: Sat Sep 30, 2023 11:43 am
by Stefan
Version 0.2.2 published.
It fixes BASIC memory management by lowering the top of BASIC memory. This is to prevent BASIC programs from crashing.
It also adds support for Windows style line breaks (CRLF) when counting line numbers.
Re: BASLOAD
Posted: Tue Oct 03, 2023 1:55 pm
by Stefan
Version 0.2.3 published.
It adds support for a label target after the RESTORE command.
Re: BASLOAD
Posted: Wed Oct 18, 2023 8:57 am
by ahenry3068
I have a suggestion. I don't know how hard it is to implement. Have BASLOAD drop any lines that just start with REM unless they are a target of a GOTO/GOSUB/etc.. I'm not sure how other developers are looking at this, but I'm kind of looking at BASLOAD as a psuedo-compiler. Our executables don't need to have Remarks in them only the source code we are working on. REM's take up BASIC memory.
Re: BASLOAD
Posted: Thu Oct 19, 2023 1:10 am
by ahenry3068
ahenry3068 wrote: ↑Wed Oct 18, 2023 8:57 am
I have a suggestion. I don't know how hard it is to implement. Have BASLOAD drop any lines that just start with REM unless they are a target of a GOTO/GOSUB/etc.. I'm not sure how other developers are looking at this, but I'm kind of looking at BASLOAD as a psuedo-compiler. Our executables don't need to have Remarks in them only the source code we are working on. REM's take up BASIC memory.
I've got a ditto on this comment. At least one other programmer thinks as I do.