kelli217 wrote: ↑Tue Mar 21, 2023 12:51 am
Are you talking about the sort of scripting that calls other programs, or the type of scripting that does everything internal to the script interpreter? Because the latter is already present, in BASIC.
The former requires someone to basically build an entire pipe system so that data can be passed from one tool to another in a script.
Another way for the first to work within BASIC would be to have a system that works with Basic programs of, say, 8KB or less, data included, which installs a FN to call Basic programs where the FN packs the calling BASIC program, including the next line to be executed, into a designated HighRAM Bank, calls the Basic language being executed, and then on return restarts the calling Basic program from the next line to execute.
In other words, flip the normal "sub-program" call where instead of the
calling program being a normal basic program which is chaining to a subprogram, the
called program is a normal basic program, and the calling program is a special program which uses a special facility (loading and installing the machine language routines that make it work would be the first few lines of the BASIC program.
Then a pipe system is not hard ... before the Basic calling routine starts a BASIC program, it looks for an INPUT.SEQ file. If it doesn't find it, it looks for an OUTPUT.SEQ file and renames it to INPUT.SEQ. Then the called BASIC program just works with INPUT.SEQ and creates an OUTPUT.SEQ file from it if it has output. Then a utility menu program can be loaded by the "scripting Basic" program that selects a file and copies it to OUTPUT.SEQ.
If the scripting Basic program leaves breadcrumbs which HighRAM segment it is using to save itself while a Basic subprogram is running, then the scripting Basic programs can nest.