Download Print this page

Radio Shack TRS-80 PC-2 Owner's Manual page 17

Hide thumbs Also See for TRS-80 PC-2:

Advertisement

OUTSTAT
Output Status
OUTSTAT
n
n is a number from 0 to 31 whose binary bit
configuration represents the desired RS-
232C output status.
The OUTSTAT command forces a certain status to be
output at the RS-232C port. OUTSTAT may be used in
either RUN or PRO mode.
Bit
Signal
0 (write)
DTR (Data Terminal Ready)
1 (write)
RTS (Request To Send)
2 (read)
CTS (Clear To Send)
3 (read)
CD (Carrier Detect)
4 (read)
DTR (Data Terminal Ready)
5 and up
not used
For example, to force output status to data terminal
ready and clear to send (set bits 0 and 4), type:
100 A = INSTAT
110 B=A OR 5
120 OUTSTAT B
PRINT#-8,
Send Data to the RS-232C
PRINT#-8,
28
PRINT#-8, differs from PRINT only in that it sends
data to the RS-232C instead of the display. Whatever list
of data is sent is formatted exactly as it would be for
PRINT.
The syntax of a PRINT#-8, statement takes exactly the
same form as BASIC's normal PRINT.
For example, to list the contents of an array U (3,2) to a
remote terminal via the
RS-232C, use a command
sequence similar to the following:
100 FOR 1=0 TO 3
110FORJ=OT02
120 PRINT #-8, U(I,J)
130 NEXT J
140 NEXT I
PRINT and LPRINT Enhancements
The previously existing BASIC statements PR INT and
LPR INT are both given extra capabilities with the addi-
tion of the RS-232C accessory when their output is
routed to the RS-232C channel.
First, multiple commas may be used in one print list as
delimiters. For example, PRINT A, B, C, D is an accept-
able statement.
Second, with the same results as normal comma and semi-
colon statements, delimiters may be mixed randomly
within a print list. For example, LPRINT A$; B, C$; D
is an acceptable statement.
29

Advertisement

loading