Diagnostic Programs
BASIC Code Listings
PARALLEL PRINTER TESTS

5100 REM
5105 REM ==== PARALLEL PRINTER TESTS ====
5110 CLS
5120 INPUT "Enter port to test: 1) LPT1 2) LPT2 3) LPT3 "; D%
5130 IF (D% < 1) OR (D% > 3) THEN 5120
5140 IF D% = 1 THEN D$ = "LPT1:"
5142 IF D% = 2 THEN D$ = "LPT2:"
5144 IF D% = 3 THEN D$ = "LPT3:"
5148 OPEN D$ FOR RANDOM AS #1
5150 GOSUB 5800
5152 PRINT "Test completed."
5154 END
5800 REM ==== OUTPUT TEST LOOP ====
5802 ON ERROR GOTO 5850
5805 INPUT "Enter number of test lines to print "; N%
5810 PRINT : PRINT "Press any key to terminate test"
5820 I% = 0
5822 WHILE (I% < N%) AND (INKEY$ = "")
5824 PRINT #1, I% + 1, "The quick brown fox jumps over the lazy dog's back. ";
5825 PRINT #1, "8 bit test: wą"
5828 I% = I% + 1
5829 WEND
5830 GOTO 5880
5850 REM ==== ERROR MESSAGES FOR PRINTER TESTS ====
5852 PRINT "Error: ";
5854 IF ERR = 24 THEN PRINT "Device Timeout."
5856 IF ERR = 25 THEN PRINT "Device Fault."
5858 IF ERR = 27 THEN PRINT "Out of Paper."
5860 IF ERR = 68 THEN PRINT "Device Unavailable."
5862 PRINT "Test Terminated."
5880 ON ERROR GOTO 0
5885 RETURN