HP IBASIC Supplement 9-3
Using Subprograms
Built-In High-Speed Subprograms
Built-In High-Speed Subprograms
You can use LOADSUB to access pre-compiled routines stored as
instrument firmware in internal memory. Any IBASIC program running
on the analyzer can access these subprograms; programs running on
external computers cannot. The external program must use the
equivalent code listed in this chapter in place of a built-in subprogram.
IBASIC programs which use the built-in subprograms are simpler and
run faster. For example, most data transfer operations run twice as fast
when using the built-in subprograms; math operations run many times
faster. Built-in subprograms are stored in memory designated as
“MEM,0,0”.
To access a subprogram, the subprogram first must be loaded into the
main program using the LOADSUB keyword. The LOADSUB keyword
requires a filename be specified from which to load the subprogram.
Three built-in files are “XFER”, “MATH”, and “RPG”.
• “XFER” file adds support to transfer trace data between the
instrument and the IBASIC program.
• “MATH” file adds high speed support for complex array operations.
• “RPG” file adds fast RPG (rotary pulse generator — front panel knob)
response for markers.
LOADSUB <Subprogram name> FROM <Filename:MEM,O,O> loads
the named subprogram from the built-in file “FILENAME”.
LOADSUB ALL FROM <Filename:MEM,O,O> loads all the
subprograms in the named built-in file “FILENAME”. See the following
table for subprogram names within the files “XFER”, “MATH”, and
“RPG”.