GW-BASIC : Methods of making Self-modifying programs just using Basic ?
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 Peek's or Poke's, 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" ( THE NUMBER "0"), specify the location of the 'current program' file ? ]
OPEN "0: " FOR OUTPUT AS #0 [ Could #0 ( The number "0" after the # ) 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