EasyManua.ls Logo

Radio Shack TRS-80 Model 100

Radio Shack TRS-80 Model 100
210 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...
telephone off the hook. " The second statement
CALL
21283t0tD
calls a machine language subroutine in the Model
100
ROM which dials the telephone
number and sends the log-on sequence stored
in
D$.
This program is incomplete in that it only dials and logs-on
to
a host system. There is
no
provision for further communication with the other system. For example, there is
no way
to
disconnect from the other system or even hang up the telephone.
Experiment
#4
BASIC Communications
Through
the Modem
The previous experiment showed how
to
log-on to the hypothetical Information
Service, but
no
provision was made for receiving the NEWS service.
This program segment will display received text after the log-on sequence, send the
log-off sequence when an end-of-file character CTRL-Z
is
received, and hang up the
telephone.
5 MAXFILES=2
140
OPEN
IMDM:7I1D"
FOR
INPUT
AS
1
150
I$=INPUT$(
1
t1):
PRINT
1$;
160
IF
I$<>CHR$(26)
GOTO
150
170
OPEN
"MDM:7I1D"
FOR
OUTPUT
AS
2
180
PRINT
#2t
"BYE" + CHR$(13)
180
CALL
21178
200
CLOSE
Line 5 Since
the
program has two files open simultaneously, it
is
necessary
to
use the
MAXFILES statement
to
provide buffer space for them.
Line
146 The modem
is
opened
to
accept input using file number
1.
Note that the
status
is
included in the OPEN statement, but the baud rate
is
not specified, since it
is
assumed
to
be 300 baud through the modem.
Line
158 Received characters are returned one at a time by the INPUT$(1,1) function
and then stored in the string variable
1$.
Each character is displayed by the PRINT
1$;
statement.
Line
168 It is necessary
to
look for the end-of-file character CTRL-Z
to
detect the end
of the NEWS bulletin. If the character received is not a CTRL-Z ( CHR$(26) ),
execution returns
to
line 150
to
receive the next character.
If
a CTRL-Z
is
received,
execution resumes with line 170.
Line
178 The modem is simultaneously opened for output
as
file number 2
to
allow
characters to be sent
to
the bulletin board system.
Line
188 The log-off sequence BYE plus a carriage return is output
to
file number 1
(the modem).
Line
198 A machine language subroutine in the Model 100 ROM is executed
to
"hang
up"
the telephone.
183

Other manuals for Radio Shack TRS-80 Model 100

Related product manuals