I wonder if GW-BASIC may have had a method for allowing the creation of self-modifying programs just using BASIC, without needing to use PEEKs or POKEs, and not accessing disk-drives or similar memory.
At the moment, I'm wondering if you could open the actual file of the current program.
I'm looking at the OPEN instruction detailed at www.antonis.de, and wondering if it may contain a method of opening the actual file of the current program.
Two questions I have at the moment are:
OPEN "0"
Could "0" above, specify the location of the current program file?
Or
OPEN "0:" FOR OUTPUT AS #0
Could #0 in this line, somehow specify the file of the current program?
The document I'm looking at at the moment is www.antonis.de -
OPEN "O",#1,"DATA"
"Open the file in output (O) mode" from www.antonis.de, so that specifies the letter "O" for "O" mode, not a location named "0" ( specifying the number "0" ), which is one of my two questions
Normally, I have only seen the following type of format -
OPEN "C: PROGRAM" FOR OUTPUT AS #1
#Nis simply a channel number that can be used in I/O statements. I see no reason why#0is even valid (your link says numbers start from 1), much less that it has a mysterious association to the source file.POKEin the program's memory have self-modifying capabilities?