8 -14
96622 Issue 4.0 Jan 0
A$ = INPUT$(1, #1)
’GET A CHARACTER FROM INPUT PORT
IF A$ <> CHR$(4) THEN
B$ = B$ + A$
’BUILD STRING IN B$
GOTO INLOOP
END IF
TIMER OFF
B$ = RIGHT$(B$, (LEN(B$) - 2))
PRINT “MESSAGE IN PRINT STATION = ”; B$
LOCATE 20, 1: INPUT “HIT ENTER KEY TO CONTINUE ”;
DUMMY$
GOTO MAIN
’GET ACK OR NAK PROM HEAD
GETRESP:
TIMER ON
WHILE LOC(1) < 1
’WAIT FOR STRING FROM HEAD
WEND
TIMER OFF
FOR N
=
1 TO 10000: NEXT N
’SOME PROCESSING TIME
A$ = INPUT$(LOC(1),#1)
’GET A CHARACTER FOR INPUT PORT
IF A$ = CHR$(6) THEN
‘SEE IF WE GOT BACK A NACK
A$ = “OKAY”
RETURN
END IF
IF A$ = CHR$(21) + “6” THEN
’IF IT A NAK 6
A$ = “PRINT STATION NOT READY FOR NEW
MESSAGE”
RETURN
END IF
IF LEFT$(A$, 1) = CHR$(21) THEN
A$ = “PRINT STATION RETURNED A NAK ” +
RIGHT$(A$, 1)
RETURN
END IF
RETURN