Printing DOS Text Files

DOS text files do not transfer directly to a printer.  Use this program to
print text files to any slot desired by the user. The program does not strip
leading spaces or limit strings to 239 characters.

100 TEXT: NORMAL: HOME
110 D$ = CHR$(4)
120 KB = -16384: KS = -16368
130 INPUT "TEXT FILE NAME? ";FILE$
140 PRINT
150 INPUT "DESTINATION SLOT? ";S : REM PRINTER SLOT NUMBER
160 ON ERR GOTO 500
170 PRINT D$;"OPEN ";FILE$
180 PRINT D$;"READ ";FILE$
190 GET A$
200 PRINT D$;"PR#";S
210 PRINT A$
220 IF (PEEK (KB) <> 155) GOTO 190
230 POKE KS,0
500 PRINT D$;"PR#0"
510 PRINT
520 PRINT D$;"CLOSE ";FILE$
540 END

Keying ESCAPE stops the program before it reaches the end of the file.
Published Date: Feb 18, 2012