Introduction
It's quite simpler that in Petit Computer, instead of using GRP files or whatever, seperate programs can be used as save files, using a seperate SLOT and using the commands PRGEDIT, PRGSET, AND PRGGET$.
Commands
•PRGEDIT
Syntax: PRGEDIT (Program SLOT),(Line number)
Program SLOT is which SLOT you want to get the stuff from. Putting in the currently used slot will give an error.
Line number is the line you wish to manipulate and get strings from. If omitted, it will be the first line. If -1 then it will be the last line.
•PRGSET
Syntax: PRGSET "(Character string)"
Character string is what you want replace the current line with.
•PRGGET$
Syntax: (Variable)=PRGGET$()
Gets a string from the line specified from PRGEDIT.
Examples of how to use
•Basic Use
First of all, you should load the save file on a different SLOT than the main program.
LOAD "PRG1:SAVEFILE"
The you can use PRGEDIT to select where your memory is. Then use PRGGET$ to retrieve what's on the line. Like this:
SLOT 0
LOAD "PRG1:SAVE"
PRGEDIT 1,2
CASH=VAL(PRGGET$)
?CASH
SLOT 1
CASH FILE
500
That takes the 500 from the second SLOT, converts from a string to a value, and prints it in the main SLOT.