10 ! PROGRAM TO TEST TERMINALS
20 ! WILL SEND SINGLE CHARACTERS OR MULTIPLE
21 INPUT "THIS PROGRAM MUST EXECUTE UNDER UIC [1,1] IF NOT, STOP ME NOW";AA
25 ON ERROR GOTO 400
26 IF END  THEN 400
30 DIM A$[80]V,B$[80]V,DV$[4]
40 INPUT "TEST TERMINAL (DDNN) 4 DIGITS, NO : ",DV$
42 B=0 : CALL "SPAWNB" ("TER "+DV$+":/LOCALCOPY/NONEWLINE",B)
50 OPEN #3,DV$+":/LN:80/MO"
65 PRINT CHR$(11)
66 INPUT "LINE TO SEND",A$
67 NC=0
70 INPUT "NUMBER OF TIMES TO REPEAT ",NC
80 FOR ZZ=1 TO NC
90 PRINT #3,CHR$(22);A$
100 INPUT LINE #3, B$
104 IF B$<>A$ GOTO 110
105 IF NC>1 GOTO 155
110 LL=0
120 FOR KK=1 TO LEN(B$)
125 CH=ASC(SBS$(B$,KK,1))
130 PRINT OCT$(CH);" ";
131 IF CH<64 THEN PRINT " ";
132 IF CH<8 THEN PRINT " ";
133 LL=LL+1 : IF LL < 20 THEN  GOTO 140
135 LL=0 : PRINT 
140 NEXT KK
145 PRINT 
150 PRINT B$
155 NEXT ZZ
160 CLOSE 
300 CALL "SPAWNB" ("TER "+DV$+":/NOLOCALCOPY/NEWLINE",B)
310 GOTO 42
400 CALL "SPAWNB" ("TER "+DV$+":/NOLOCALCOPY/NEWLINE",B)
410 STOP 
