Metrologic Optimus S Programming Manual page 43

"c" programming guide
Table of Contents

Advertisement

Description
Upon calling this routine, the user program stops running and jumps to the
kernel, and then the Program Manager will take over the control.
The Program Manager menu is displayed.
Return
None
See Also
ActivateProgram, LoadProgram, ProgramInfo
UpdateBank
Purpose
To copy a user program from SRAM to flash memory.
Syntax
int UpdateBank (const char *filename);
char *filename;
Example
val = UpdateBank ("PlayTest");
Description
This routine copies a user program from the file system (SRAM) to Program
Manager (flash memory).
Return
If successful, it returns the residence location of program, i.e. slot 1 ~ 6.
On error, it returns -1.
See Also
DownLoadProgram, UpdateUser
UpdateUser
Purpose
To make a user program (.SHX) in SRAM become the active program.
Syntax
int UpdateUser (const char *filename, int mode, int remove);
char *filename;
int mode;
int remove;
val = UpdateUser ("PlayTest", KEEP_FILE_SYSTEM, 0);
Example
Description
This routine copies the desired program from the file system directly to the
active area of the Program Manager in flash memory, and thus makes it become
the active program. The original file system may be kept or cleared (mode).
Chapter 3 Terminal Specific Function Library
A file name can be 8 bytes at most, the null character not included.
If the file name specified is identical to that of an existing program in flash
memory, the new program will replace the old one.
Otherwise, it will be stored in an automatically assigned residence
location.
/* pointer to a buffer where filename of the program is stored */
/* if file system is kept, may remove the program from it */
/* activate the program, and keep the file system as well as this program */
/* file name of program to be loaded */
/* clear or keep file system */
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents