
The SAVE command can be used to store data into internal flash memory. There's a dedicated section for BASIC programs where they can store non-volatile information. SAVE needs two arguments:
1) The first one is a zero-based address of the flash memory, where the object should be stored.
2) The second one is the object itself, which can be a complete array, a string, an array-element or a single 32 bit signed integer variable.
A string is stored "0" terminated - thus there is one more byte for each string. A 32 bit integer is stored in 4 bytes, a byte stored as one byte.
The length of the storage area is 4k Byte. There is no 'wear' leveling - so write cycles are limited to 100.000.
This program first stores a string into flash memory at address 2000, then reads it back and prints it out.
outmode -2
let a$ = "hello"
save 2000, a$
load 2000, b$
print a$
print b$
See also: LOAD (
more) command.