EasyManua.ls Logo

Radio Shack TRS-80 PC-2 - Page 10

Radio Shack TRS-80 PC-2
35 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CLOADr
Load Reserve Program from RS-232C
CLOADr
"filename"
filename
is
a
standard,
previously assigned file
name.
CLOADr loads
the
set
of
function
key
definitions
and
menus
(a
"reserve
program")
from
the
RS-232C.
CLOADr
functions
only
when
cassette
input
is
routed
from
the
RS-232C (as with
SETDEV
CIl.
The
syntax
for
CLOADr
is
identical
to
that
for
CLOAD.
For
example,
to
load a
set
of
function
key
definitions
and
menus
via
the
RS-232C, use
the
following
command
sequence:
SETDEV
CI
CLOADr
COM$
Fetch
Communications
Parameters
COM$ provides a
way
for
you
to
examine
the
current
RS-232C settings. COM$
may
be used in
either
the
RUN
or
PRO Mode as a
direct
command
or
part
of
a program.
This
function
returns
a string
of
characters
defining
the
current
RS-232C setting, in
format
"baud,
word,
parity,
stop."
(This
is
the
same
format
SETCOM uses
to
set
the
parameters.)
As with
any
function,
COM$
must
be used
in
conjunction
with a
command
(such as PR INT COM$)
or
variable (as
in
Z$
= COM$).
14
It
should
be
noted
that
COM$ always
returns
a string no
longer
than
16
bytes;
therefore,
it can be used safely
with
undimensioned
string variables.
For
example,
if
the
RS-232C
is
currently
set
at
2400
Baud, 7 Bit Words,
Odd
Parity,
and
2
Stop
Bits,
type:
PRINT
COM$
(ENTER)
and
the
Display will
show:
2400,7,0,2
During
execution
of
a BASIC program, reset
communica-
tion
parameters
to
300
baud, 8
bit
words, even
parity,
and
2
stop
bits,
execute
subroutine
1000,
then
restore
to
original settings.
100
A$
= COM$
110
SETCOM
300,8,
E,
2
120
GOSUB
1000
130
SETCOM
A$
CONSOLE
Set
End-of-Line
Protocol
CONSOLE x.
Y.
z
x sets
the
number
of
characters
sent
and
is
either
0
or
a
number
between
16
-
255.
Y.
z specifies
to
send a carriage
return,
line
feed,
or
both.
y, z
is
a
combination
of
0
and
1. See Table 3
for
details.
CONSOLE
is
used
to
specify
the
combination
of
line
feeds
and
carriage
returns
transmitted
as
an end-of-line
symbol.
15

Related product manuals