HP (Hewlett-Packard) HP 82160A Printer User Manual


 
34
Section 3: Mass Storage Operations
READSUB
ALPHA
filename
The
READSUB
(read subroutine) function operates similarly to the
READP
function, except that the
program is placed in program memory after the last program. This function is particularly useful in a
program that copies a subroutine program from a mass storage device, executes that subroutine, and then
continues the main program.
READSUB
does not change the position of the calculator in program
memory.
Example of storing and retrieving a program: After entering a program into your calculator, store it on
the medium, clear it from program memory, and then recall it from the medium.
Keystrokes Display
GTO


0.0000 Creates new program space. (Display assumed
cleared.)
PRGM
LBL
ALPHA
AREA
ALPHA
01 LBL
AREA .
x
2
02 X
2 . Sample program AREA
03 PI .
×
04
×
××
× .
PRGM
0.0000.
X-register
ALPHA
,ML
,ML_ Specifies current program and filename ML.
ALPHA
0.0000
WRTP
0.0000 Program AREA stored in file ML.
CLP
ALPHA
AREA
AREA_
Clears program AREA.
ALPHA
0.0000
ALPHA
ML
ML_ Specifies filename ML.
ALPHA
0.0000
READSUB
0.0000 Copies program AREA at end of program
memory.
GTO
ALPHA
AREA
GTO AREA_ Positions calculator to AREA.
ALPHA
0.0000
PRGM
01 LBL
AREA First line of retrieved program
PRGM
0.0000.
Storing and Retrieving Data
A collection of data can conveniently be stored on the medium and recalled when needed. Using the
functions described below, the entire collection—or any portion—can be stored or recalled.
CREATE
X
filesize
ALPHA
filename
The
CREATE
function allocates a portion of the medium for a data file and fills all registers with zero
values. The number in the X-register specifies the number of registers to be allocated in the new data file.
The contents of the ALPHA register specify the name of the file. (If a file with the specified name exists
on the medium, DUP FL NAME is displayed and no new file is created.)
SEEKR
X
registger
ALPHA
filename
The
SEEKR
(seek register) function positions the storage medium to a specific register within a data file.
This permits data to be stored and retrieved from individual registers within a file using the
WRTRX
and
}