Code: Select all
#SELF MODIFYING CODE: REPLACES LET O0=0, LET O1=1...LET OE=14, LET OF=15
100 FOR N=0 TO 15
110 POKE PEEK 16425+256*PEEK 16426+6,N+28
120 LET 0X=N
130 NEXT N
140 PRINT 00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F
System variable 16425 NXTLIN "The Address of next program line to be executed, " is used to define a series of variables.
In this example, I'm assuming the purpose is to define a series of variables representing Hex numbers Oo=0, O1=1....OE=14, OF=15. You could define variables all the way up to OZ if you wanted.
I've used this technique before, to save RAM. Unfortunatly I don't know where I got it from...heck maybe I came up with it, who knows!
FYI, NXTLINE is also often used to call "Inline" MC routines, which can float around in the BASIC area. Works nicely as long as only relative jumps are used.
Regards;
Greg