Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 155

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

Advertisement

Utility Programs
Sample Use
Before using the two programs, make sure that channel A is connected to a
modem and that channel B is fitted with the serial terminator or connected to
some other serial device (e.g., a serial printer). Then, underTRsDOSREADY,
type:
DO DOCOM32
or
DO DOCOM64
depending on whether you have a 32K or 64K computer. DOCOM32 and
DOCOM64 name DO files which
1.
Execute the SETCOM command (parameters are set to default values)
2. Load the appropriate COMSUB subroutine
3. Load BASIC and reserve enough memory for COMSUB. When the BASIC
prompt appears on the screen, type:
RUN "BASCOM32"
or
RUN "BASCOM64"
The program will load and begin.
Error Handling
When a transmit or receive error is detected, COMSUB will print the word
ERROR followed by an 8-bit error code. The leftmost digit represents bit 7;
the right-most digit, bit zero. (The program will continue to attempt serial
I/O.)
If bit
3
is on, then the modem carrier was lost. Check the telephone
connection and all other connections.
If bits 0, 1, and 2 are all off, the error will be a receive error. See ARVC, page
4/78 in the TRSDOS manual, for further details on the error code.
If bits 4,5,6, and 7 are all off, the error is a transmit error. SeeATx, page 4/79
in the TRSDOS manual, for details.
Source Listing of COMSUB
The following fully commented listing is provided to aid assembly-language
programmers in writing their own serial I/O routines.
Notice that the program is oRGed at
X'EF80'.
This is an appropriate address
for 64K machines. For 32K machines, use a start address of
X'6F80'.
191

Advertisement

loading