I'm trying to avoid saving the whole program in the data file.
You had to code a data filler (as a Fast-Load), to get only datas.
So system variables needs to be modified
The DIM variable isn't occurred by a VARS change... except a CLEAR and DIM function.
IF the DIM is set in the program Header.
, so only the data portion is saved. Then the system variables needs to be restored, so the program can continue.
Just set the RAM_top to get room in memory, code a loader to the upper memory (above the RAMTOP), and load the main program.
A new, or a load won't affect this memory part... but, you had to code a program to save the "loader" how will recall the main program.
LOADER->NEW or LOAD->MAIN PRG->NEW or LOAD->SAVER (SAVE LOADER[^RAM-TOP^]).