Sample routines for saving calculator state to FLASH
Sequence of steps to create the write from 800 to XXX (XXX is your choice of user FLASH ram this example uses 0C9). Check with the manual for available addresses, and for why YFNS should be in RAM when writing to FLASH.
Note that the production version of the 41CL loads the 'YFNZ' version of the Y functions ROM, which uses module ID 15, at page 7 when the MMU is disabled, such as for instance after a MEMORY LOST. The production documentation also uses the same version of the ROM in its example code for initializing the 41CL. (i.e. 'YFNZ' PLUG1L MMUEN.) Code written with functions from this ROM will fail if the 'YFNS' version is loaded instead.
“812-RAM” >>YFNS in RAM so YFWR and YFERASE can be used.
Now at a complete “MEMORY LOSS” state. MANUALLY execute the following, as any routine will be erased at line 7 and will not complete! I have been advised that a physical ROM plugged into the 41C with a routine based on the keystrokes below would indeed run uninterrupted, thus automating the restoration process also. Angel Martin has created a ROM of utilities which automate the backup and restore routines listed below. Thanks Angel!
MMUCLR >>basic reboot steps to enable MMU etc.
“0C9>800” >>copy calc state from FLASH back to 800
XEQ “U-PG” >>optional; see below
XEQ “SGMT” >>optional; see below
Routine adaptable to any configuration desired: Unplug and PLug
“FUN WORK UPG” >>these can be any titles or letters, just use the first letter
AVIEW >>of each mnemonic for the GETKEY function, in this example F, W, U
GTO IND X
LBL 21 >>GETKEY “F”
LBL 63 >>GETKEY “W”
LBL 61 >>GETKEY “U”
“DONE” >>I place the “DONE” here as the routine is so fast you
AVIEW >>will not know it has completed.
Clock set, after restoring calculator back to desired state, following “MEMORY LOSS”
Provided by: Geoff Quickfall