Several years ago Mike Mitchell wrote a SuperBASIC program that got the QL on line with a modem.
It was far from perfect, particularly as the QL has difficulty receiving data at the serial port, but it was widely copied in newsletters.
Independently, Mike Jonas wanted to use an unexpanded QL to access a remote computer from home to use an EMACS editor (instead of Quill).
Mike got around a number of the QL’s serial port problems with some nifty programming. But CAUTION! As presented Jonas_term is not very well-mannered since it does not send an automatic disconnect signal on hanging up.
It sets up two arrays: one for characters received (chi$), the other for characters sent (cho$). Note that all codes above 127 are duplicated.
Some, such as chi$(8), chi$(10) and chi$(13) are modified to be in accord with standards used in other systems than the QL. Other changes are made to cho$() characters. Refer to the Concepts section of the QL manual for their significance, but the important one is that CTRL H (HALT) replaces CTRL C.
Thus characters sent or received are those stored in the arrays, not the ones in the QL character set.
The connect Procedure is the nifty bit of programming. It is a one line loop that makes ten consecutive efforts to read incoming data for each byte originating from the QL.
Being a one-liner it is about as fast as SuperBASIC can be and because it focusses on the incoming data stream there is less chance that the serial buffer will be overloaded.
Mike reports that it is quite reliable at 1200 Baud, and as unreliable at 300 Baud as any other program without a modapter.
1 REMark by Mike Jonas
5 DEFine PROCedure init
10 LOCal i
15 DIM chi$(255,1),cho$(255,1)
20 FOR i=1 TO 127
25 chi$(i)=CHR$(i) :
chi$(i+128)=CHR$(i)
30 cho$(i)=CHR$(i)
35 END FOR i
40 chi$(8) =CHR$(188) : chi$(136)
=CHR$(188)
45 chi$(10) ="" : chi$(138) =""
50 chi$(13)=CHR$(10) : chi$(141)
=CHR$(10)
55 cho$(16) =CHR$(3)
60 cho$(10) =CHR$(13)
65 cho$(194)=CHR$(8)
70 END DEFine init
75 DEFine PROCedure setup
80 LOCal rates
85 OPEN#3,ser2ir
90 MODE 4: PAPER 7: INK 0: CLS
95 INPUT "(1) - 300, (2) - 1200, or
<return> ";rate$
100 IF rate$='1' THEN BAUD 300 :
ELSE IF rate$='2' THEN BAUD 1200
105 END DEFine init
110 DEFine PROCedure connect
115 REPeat loop:
PRINT#3,cho$(CODE(INKEY$)); : PRINT
chi$(CODE(INKEY$(#3)))&chi$(CODE(IN
KEY$(#3)))&chi$(CODE(INKEY$(#3)))&c
hi$(CODE(INKEY$(#3)))&chi$(CODE(INK
EY$(#3)))&chi$(CODE(INKEY$(#3)))&chi
$(CODE(INKEY$(#3)))&chi$(CODE(INKE
Y$(#3)))&chi$(CODE(INKEY$(#3)))&chi$
(CODE(INKEY$(#3)));
120 END DEFine connect
125 REMark *** main ***
130 init : setup : connect
NESQLUG NEWS November/December 1990