This program is written while examining command line commands on Wacky-Talky. The great advantage is that BASIC programs converted to WT modules can be compressed with !Squash application and retain their run and load actions.
Anyway, there is only a tiny thing to change in a BASIC program before converting it to a WT module, that is on the way you get the parameter string with SYS "OS_GetEnv" bacause BASIC does not allows parameters after this 'BASIC -Quit @xxxxxxxx,xxxxxxxx'.
To get the parameter string you should use something like:
IF $&7000="WTm" env_str$=$USR&7004 ELSE SYS"OS_GetEnv" TO env_str$
At address &7000 a marker is stored which allows to check if you have been downloaded from a WT module or not, if that is the case at address &7004 there is routine which returns the pointer to parameter string; this is necessary because the marker must me corrupted after reading it.
The parameter string will be something like:
BASIC -Quit @00009000,000090B1A bla bla bla
The option '-q' in parameter string means automatic kill the module before starting BASIC.
NOTE: You *must* call once at &7004 even if you don't need the parameter string, you can do that using: