Download Print this page

Radio Shack TRS-80 PC-2 Owner's Manual page 12

Hide thumbs Also See for TRS-80 PC-2:

Advertisement

For example, to save the current program through the
RS-232C in ASCII format, use the following command
sequence:
SETDEV CO
CSAVEa "PROGRAM"
CSAVEr
Send Reserve Program to RS-232C
CSAVEr "filename"
CSAVE r saves the current function key definitions and
menus (a "reserve program") from the RS-232C. CSAVEr
functions only when the cassette output is routed to the
RS·232C (as with SETDEV COl.
For example, to save the function key definitions and
menus (the "reserve program") through the RS-232C,
use the following command sequence:
SETDEV CO
CSAVEr "RESRVPRG"
OEV$
Fetch Current Device Routings
DEV$
DEV$ does for the PC-2's current device setting what
COM$ does for RS-232C settings. DEV$ may be used in
either the RUN or PRO mode.
18
DEV$ returns a string of up to 14 characters listing the
names of the input devices which are currently disabled
and whose functions are being handled by the RS-232C.
It is used with the same syntax as any other function
which returns a string. For example, PRINT DEV$ and
Z$
=
DEV are both valid uses.
For example, to display route settings from within a
BASIC program, use the following string:
100 PRINT DEV$
To route cassette input from the RS-232C without alter-
ing any other routings, use a similar command sequence to
the following:
100 A$
=
DEV$
+ ",
CI"
110 SETDEV A$
To route the printer to the RS-232C, execute a subroutine
1000, then return to the original settings, use a command
sequence similar to the following:
100 A$
=
DEV$
110 SETDEV PO
120 GOSUB 1000
130 SETDEV A$
ERL
Return Line Number of Error
ERL
ERL is used with ON ERROR GOTO in error trapping.
ERL returns the line number of the statement which
caused the current error. If an error is not present, ER L
returns
O.
19

Advertisement

loading