10 CLS 20 PRINT "Program Lister ":PRINT :PRINT 30 INPUT "Enter filespec of Program to be Listed ";FILE$ 40 INPUT "Enter 1 for single, 2 for double strike ";S$ 50 INPUT "Enter Author's name or initials ";AUTH$ 60 IF S$ = "2" THEN LPRINT CHR$(27) + "G" 'Set double Strike 70 PRINT "Align Paper and press any key " 80 K$ = INKEY$: IF K$ = "" THEN GOTO 80 'Wait for a key 90 ON ERROR GOTO 500 100 OPEN FILE$ FOR INPUT AS # 1 105 PAD = (40 - LEN(FILE$)) / 2 107 REC$ = STRING$(PAD," ") + FILE$ 109 LPRINT CHR$(14);LEFT$(REC$,40):LPRINT:LPRINT CHR$(20)+CHR$(27)+"H" 110 LINE INPUT#1,REC$ 'Read a record 120 RNUM = RNUM + 1 'Count records 130 LNUM = LNUM + 1 'Count Lines on a page 140 IF LNUM <> 1 THEN 170 'Skip if not line 1 170 IF REC$ = CHR$(92) THEN GOSUB 1000 ELSE LPRINT CHR$(15),LEFT$(REC$,132):LPRINT 'else print line 180 IF EOF(1) = 0 THEN GOTO 110 'if not eof,go for more 190 GOSUB 1000 'do final eject 200 SYSTEM 500 IF ERR = 53 THEN PRINT "File "+FILE$+" not found" 505 PRINT "Error ";ERR 510 SYSTEM 1000 REM Print footing and eject to next page 1010 IF LNUM > 59 THEN 1050 'if page is full 1020 FOR LNUM = LNUM TO 60 'find end of page 1030 LPRINT 1040 NEXT LNUM 1050 LPRINT CHR$(18)+CHR$(27)+"H" 'drop compressed mode 1060 PNUM = PNUM + 1 1070 LPRINT CHR$(15);AUTH$,DATE$,TIME$,"Page ";PNUM 1080 LPRINT CHR$(18); 'drop compressed mode 1090 IF S$ = "2" THEN LPRINT CHR$(27)+"G"; 'set double strike 1100 LPRINT CHR$(12) 'eject to next page 1110 LNUM = 0 'reset line count 1120 RETURN T CHR$(12)