CipherLab BASIC Programming
FLASH_READ$
Purpose
To read a data string from the memory bank 0xF60000 ~ 0xF6FFFF.
Syntax
A$ = FLASH_READ$(N%)
Remarks
"A$" is a string variable to be assigned to the result.
"N%" is an integer variable in the range of 1 to 256, indicating the ordinal
number of the record.
Example
A$ = FLASH_READ$(3)
FLASH_WRITE
Purpose
To write a data string to the memory bank 0xF60000 ~ 0xF6FFFF.
Syntax
A% = FLASH_WRITE(N%, A$)
Remarks
"A%" is an integer variable to be assigned to the result.
"N%" is an integer variable in the range of 1 to 256, indicating the ordinal
number of the record.
"A$" is a string variable, representing the data string to be saved.
err% = FLASH_WRITE(0, "ERASE")
Note that the record number must be 0, and the string must be "ERASE".
After erasing the whole memory bank, you can then write data to it by one
record at a time. Be aware that whenever you need to write data to any used
record, the whole memory bank needs to be erased; otherwise, this command
will fail.
Example
err% = FLASH_WRITE(1, "data number#1")
...
err% = FLASH_WRITE(256, "data number#256")
ROM_SIZE
Purpose
To get the size of the whole flash memory in kilobytes.
Syntax
A% = ROM_SIZE
Remarks
"A%" is an integer variable to be assigned to the result.
Example
PRINT "Flash size = ", ROM_SIZE
See Also
MEMORY_INFORMATION(4)
146
Part I
A%
Meaning
1
Write flash memory successfully.
-1
The BASIC program is too large; no free flash memory available.
-2
Error command for erasing the flash memory.
-3
The given index is out of the range.
-4
Fail to write (probably flash memory is not erased yet or something
goes wrong).
Before writing data to any used record, it is necessary to use the following
command to erase the memory bank first:
' read the 3rd record
Need help?
Do you have a question about the 8 Series and is the answer not in the manual?