EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 52

Radio Shack TRS-80 Model III
274 pages
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...
TRS-80
MODEL
III
Using the
Model III
as
a
Terminal
Probably
the most common
use
of
the RS-232-C
interface will
be
to
allow
the Model
III to
act like
a
"terminal"
to another
"host"
computer. In this
application,
whatever you
type on
the keyboard is
sent via RS-232-C to
the other host
computer,
and
whatever the host
computer sends
to
you
is displayed
on your
screen.
Before going into
the details
of RS-232-C
operation, we'll show
you a BASIC
program
that
sets
up
a simplified terminal
operation.
1
.
Make
sure the RS-232-C
characteristics are
set
to
match those of
the host
computer.
If they are
not, then change
them, as explained
later in this
chapter.
Note: For this
BASIC Program,
you must
use a baud rate of 110.
An equivalent
Z-80 program could
use any baud
rate.
2. Connect the
Model III to
the host computer
via the RS-232-C.
You will
need a
telephone
interface
(modem) or other
means of communication
.
3
.
Type
in
and run
the following BASIC
program (you do
not need to
type in the
comments
(material
that starts with
a single
quote). The program
displays
characters
received
via the RS-232-C,
and sends
characters you
type in. It is
for
demonstration
only, and
is not
meant
to
function
as
a
practical
terminal.
Notice
there are
no spaces
between
the
"
"in line
1 60.
5
DEFINT
A--Z
10
POKE
16890,
POKE
Ul
=
U2
=
POKE
POKE
15
17
18
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
165
166
170
180
190
200
16888? (2*16)
+2
16526
16527
Ul, 90
U2ยป
X
=
USR<0)
RCV
=
80
TX
=
85
CI
=
16872
CO
=
16880
'
CHECK
FOR
SERIAL
POKE
Ul,
RCV
X
=
USR<0)
C*
=
CHR*(PEEK(CD)
PRINT
C$5
'
CHECK
FOR
KEYBOARD
C*
=
INKEY*
IF C*
=
"
" THEN
100
PRINT
C$5
POKE
CO,
ASC(C$)
POKE
Ul,
TX
X
=
USR<0)
GOTO
100
INPUT
'INTEGER
VARIABLE
FOR SPEED
'DON'T
WAIT FOR
SERIAL. I/O
'TX/RCV
AT
BAUD RATE
110
'LSB OF
USR CALL
ADDRESS
'MSB OF USR
CALL.
ADDRESS
'SET
UP USR
CALL,
LSB
MSB
'CALL
*RSINIT
'LSB OF
$RSRCV
'LSB
OF
*RSTX
'CHARACTER
INPUT BUFFER
' CHARACTER
OUTPUT
BUFFER
'SET
UP
USR CALL
TO
*RSRCV
'
CALL
'
LOOK
'
IF
C
INPUT
*RSRCV
AT
INPUT
BUFFER
=
0, NOTHING
HAPPENS
'NO
KEY,
SO GO
CHECK
SERIAL.
'DELETE
THIS
LINE
IF HOST
PROGRAM
'HAS
AN
ECHO
FEATURE
'PUT
CHAR.
INTO
OUTPUT
BUFFER
'SET
UP USR
CALL
TO *RSTX
'CALL
$RSTX
'GO
CHECK
SERIAL.
INPUT
42

Other manuals for Radio Shack TRS-80 Model III

Related product manuals