Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 154

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Modell! TRSDOS
BASCOM (BASIC Program)
COMSUB (USR Subroutine)
DOCOM (TRSDOS DO-File)
Serial I/O Demonstration
BASCOMnn
is the name of the BASIC program;
nn
== 32 for
. 64K computers.
COMSUBnn
is the name of theuSR subroutine;
nn
=
32 or 64 as above.
DOCOMnn
.
is the name of a TRSDOS Do-file that automatically
initiali:ze~~
chamlelA f()rserilil
I/O,
loads
COMSUBnn
and starts BASIC;
nn
=
32 or 64
The
BASIC
communication program
BASCOM
and the communications
subroutine
COMSUB
together perform a "terminal" function, demonstrating
an application for Model II's serial interface. The programs are provided to
give you a feel for interfacing programs at the assembly-language level with·
BASIC
programs.
BASCOM
calls the machine-language
COMSUB
via the
USR
function. Like
TERMINAL, BASCOM
and
COMSUB
are included on your
system diskette and may be examined by employing the
TRSDOS
command
LIST
(or the
BASIC
command
LIST
in the case of
BASCOM).
The programs allow you to use the keyboard of the Model II to send data in
the form of
ASCII
characters to another computer or device; at the same time,
characters transmitted on the other device will be received by the Model II
and printed on the Display.
Serial channel
A
is used for sending and receiving. (You must put a terminator plug
on channel B.) The programs alternately check channel A for a character received,
and the keyboard for a character typed. Characters typed will be automatically
echoed to the Video Display, though this can be defeated by making a two-byte
modification to COMSUB; the NOPs at X'6F9F and X'6FAO' (COMSUB32) or X'EF9F
and X'EFAO' (COMSUB64) should be modified to a
LD (HL),
00.
190

Advertisement

loading