Metrologic Optimus S Programming Manual page 42

"c" programming guide
Table of Contents

Advertisement

36
"C" Programming Guide For Optimus S/R
LoadProgram
ProgramInfo
ProgramManager
Purpose
To download a user program (.SHX) to flash memory.
Syntax
void LoadProgram (int Prog);
int Prog;
LoadProgram (3);
Example
Description
Upon calling this routine, the system exists the user application and enters the
Program Manager menu > Download page immediately.
Simply choose "Download Via" and then "Baud Rate" in order to download the
user program to the specified location.
Return
None
See Also
ActivateProgram, ProgramInfo, ProgramManager
Purpose
To list program information.
int ProgramInfo (int slot, char *programtype, char *programname);
Syntax
int slot;
char *programtype;
char *programname;
Example
val = ProgramInfo (2, typebuffer, namebuffer);
Description
This routine retrieves program information including its size and name.
The program size, in kilo-bytes, depends on how many memory banks one
program occupies.
The program name is the same one as shown in the menu of Program
Manager.
The file type will be returned with a small letter: "c" for a C program, "b"
for a BASIC program, and "f" for a font file.
Since one bank is 64 KB, the return value will be 64, 128, ..., etc.
Return
If successful, it returns the bank size of program.
Otherwise, it returns 0 to indicate the program does not exist.
See Also
ActivateProgram, LoadProgram, ProgramManager
To enter the kernel and bring up the menu of Program Manager.
Purpose
void ProgramManager (void);
Syntax
Example
ProgramManager();
/* 1 ~ 6, represents one of the 6 resident locations */
/* load the user program to location #3 */
/* 1 ~ 6, represents one of the 6 resident locations */
/* pointer to a buffer where program type is stored */
/* pointer to a buffer where program name is stored */
/* jump to the menu of Program Manager */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents