Download Print this page

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

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

Advertisement

I
SETCOM may be used to reset only some of the com-
munications paramters by specifying null parameters for
the settings not to be changed. For example, to change
only the parity to ODD, you could enter SETCOM, ,0
(ENTER)
To reset only the baud rate, use the command:
SETCOM 1200
To reset the baud rate to 600 and the parity to even, use
the command:
SETCOM 600" E
To change the communications parameters from within a
BASIC program, enter:
100 INPUT "Enter new commu params "; A$
110 SETCOM A$
SETDEV
Route I/O Devices To/From the RS-232C
SETDEV device, device, ...
device is two-letter name which specifies a
PC-2 I/O device.
devices are:
KI--
Keyboard Input;
DO - - Display Output
(LCD); PO - - Printer Output; CI - -
Cassette Input; CO - - Cassette Output
The SETDEV command is used to route the PC-2's I/O
devices (keyboard, LCD, printer, tape) to or from the
RS-232C communication channel.
SETDEV is a new
BASIC word, and may be used in either the RUN or PRO
modes as a direct command or as a part of a program.
32
Each device specified in the SETDEV command is
disabled and its input (or output) is filled from (or sent
to) the RS-232C channel.
If the command SETDEV is used alone, all device routings
are cleared and all devices are enabled.
As an example, output from the LPR INT statement
normally is handled by the printer/plotter.
If SETDEV
PO is specified, anything that would have been handled by
the printer (LPRINT, LLlST, etc.) will now be sent to the
RS-232C channel.
For example, to route all printer output to the RS-232C,
enter:
SETDEV PO (ENTER)
To route all tape input and output to (or from) the RS-
232C, enter:
SETDEV CI, CO (ENTER)
To clear all device routings, enter:
SETDEV (ENTER)
To route cassette input from the RS-232C without alter-
ing any other routings during execution of a BASIC
program,
use
a command
sequence similar to the
following:
100 A$
=
DEV$
+",
CI"
110 SETDEV A$
To route the printer to the RS-232C, execute subroutine
1000, then restore to original settings wh ile executing a
BASIC program, use a command sequence similar to the
following:
33

Advertisement

loading