10 'listing printer
20 'this is setup to print 50 lines per page
30 'space is thus available if some lines are
40 'longer than 80 characters.
50 'lines 60 & 300 are commands for Gemimi-10X printer
60 LPRINT CHR$(27);CHR$(55);CHR$(0)
70 DIM LN$(60)
80 PRINT CHR$(26)
90 INPUT"What is the program name";N$
100 PRINT CHR$(26)
110 PN$=N$ + ".BAS"
120 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
130 PRINT TAB(10)"PRINTING FROM FILE":PRINT:PRINT TAB(10)PN$
140 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
150 LPRINT:LPRINT"LISTING FROM ";PN$;" FILE"
160 LPRINT:LPRINT
170 OPEN"I",#1,PN$
180 FOR X = 1 TO 50
190	IF EOF (1) THEN GOTO 310
200	LINE INPUT #1,LN$(X)
210 NEXT X
220 FOR P = 1 TO 50
230	LPRINT LN$(P)
240 NEXT P
250 LPRINT CHR$(12)
260 GOTO 180
270 PRINT CHR$(26):PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
280 PRINT TAB(15) "LISTING COMPLETED"
290 CLOSE #1
300 PRINT:PRINT:LPRINT CHR$(27);CHR$(55);CHR$(1):END
310 'print the last lines
320 FOR P = 1 TO X-1
330	LPRINT LN$(P)
340 NEXT P
350 LPRINT:LPRINT:LPRINT TAB(10)"END OF ";PN$;" FILE"
360 LPRINT CHR$(12)
370 GOTO 270
 X-1
