74
CipherLab BASIC Programming Part I
UPDATE_BASIC
Purpose To have a BASIC program become the active program.
Syntax A% = UPDATE_BASIC(file%)
Remarks “A%” is an integer variable to be assigned to the result.
-1 Invalid file number
-2 Invalid file format
-8 No free space in flash before writing
-9 Fail to read program header (.ini)
-10
Note
Fail to read object file (.syn)
-11 RAM size cannot fit.
-12
Note
Fail to write new program into flash
due to insufficient space,
illegal address or the sector of flash cannot be erased.
-13
Note
Fail to write program header after new program written into flash
-14 Cannot find file on SD card
-15 Cannot read file on SD card
-16 File on SD card with filename length over 64 bytes
Note that
it may not return the error code if the original BASIC program has
been overwritten.
“file%” is an integer variable, indicating from which transaction file
file on 8200/8400/8700) the program is
copied to the active area in flash
memory. If successful, it will restart automatically.
1~6 Application program saved in file system
Source file will be kept unless you erase it manually.
18 Application program (.tkn)
DOWNLOAD_BASIC(18)
Source file will be removed after execution.
(currently supported on 8000, 8200, 8300, 8400, 8700 only)
19 Runtime program (.bin) saved in SRAM via FTP
Source file will be removed after execution, b
will be kept.
(currently supported on 8000, 8200, 8300, 8400, 8700 only)
20~39 Application program (.tkn, or .syn, .ini) saved on SD card
A .tkn file takes the first priority.
Source file will be kept after execution.