8-Bit Software Online Conversion
Catalogue Printer Update - Listing
10DEFFNS="CatRd4"
15ONERROR VDU3:CLOSE#0:IF ERR=17:OSCL
I"EX.!BOOT":END ELSE REPORT:PRINTERL:PRI
NT"Press a key":REPEATUNTILGET
20MODE7
30Z$=""
40D%=0
50V%=0
60H%=0
70X%=9
80CLOSE#0
90VDU23;8202;0;0;0;
100PRINT'"
110PRINT"
120PRINT''" This utility will print/vi
ew the 8BS"'" catalogue to either single
sheets or"'" fanfold paper, on one or b
oth sides."
130PRINT'" Place the top of printer he
ad at the"'" top of the sheet."
140PRINT'TAB(11);" Enter 1 2 or 3"
150PRINT'" 1. Print pages 1,2,3,4
etc. "
160PRINT'" 2. Print pages 1,3,5,7
etc. "
170PRINT " Pause, then 2,4,6,8
etc. "
180PRINT'" 3. Printout one page o
nly. "
190REPEAT
200C$=GET$
210UNTILINSTR("123",C$)
220IF C$="1" O%=14
230IF C$="2" O%=16
240IF C$="3" O%=19
250PRINTTAB(0,O%);" "'" "TAB(0,19)
260IF C$<>"3" PRINT'" How Many Catal
ogues? "'
270IF C$<>"3" INPUT" ";Q% ELSE Q%=1
280PRINT'" Printer? Y/N "
290IF INSTR("Yy",GET$) P%=2 ELSE P%=3
300 IF P%=2 IF C$="1" OR C$="2" PRINT'
" Pause between pages? Y/N ":IF INST
R("Yy",GET$) K%=1 ELSE K%=0
310F%=OPENIN"Cat"
320A%=EXT#F%/&41A
330B%=A%/3:IF A%MOD3<>0 B%=B%+1:REM PA
GES IN THIS CATALOGUE
340IF C$="3" REPEAT:PRINT'" Print whic
h page? 1-";STR$B%:INPUT'" ";D%:UNTIL D%
>0 AND D%<=B%
350MODE0
360IFP%=3 PRINT''"Press SHIFT to scrol
l the text"'':VDU14
370VDUP%
380IF D%=1 C%=0:PROCpage1:VDU3:END
390IF D%<>0 C%=D%-1:PROCprtpage:VDU3:E
ND
400FORR%=1TOQ%
410PROCpage1
420C%=VAL C$
430REPEAT
440PROCprtpage
450C%=C%+1
460IF C$="2" C%=C%+1
470UNTILC%>=B%
480NEXT
490IF C$="2":PROCtrnover
500VDU3
510CLOSE#F%
520END:REM the rest requires the front
page on disc
530IFP%=3 END
540FORL%=1TOQ%
550MODE7
560VDU28,0,19,39,0
570*LO.SCREEN 7C00
580*GDUMP
590VDU2,1,27,1,126,1,49,1,5:REM DOUBLE
600PRINT'TAB(4)"The BBC and Master P.D
. Library"
610PRINTTAB(9)"and Postal User Group."
620VDU1,27,1,126,1,49,1,6:REM QUAD
630PRINT''TAB(5)"Catalogue."
640VDU1,27,1,126,1,49,1,5:REM DOUBLE
650PRINTTAB(12)LEFT$(TIME$,15)
660PRINT'TAB(10)"17 Lambert Park Road.
"
670PRINTTAB(10)"Hedon."
680PRINTTAB(10)"Hull."
690PRINTTAB(10)"HU12 8HF."
700PRINTTAB(10)"Tel 0482 896868."
710IF P%=2 VDU12,3
720NEXT
730END
740DEFPROCprtpage
750H%=0
760IF P%=3 PRINT'
770IF C%<>0PRINTSPC(X%);"Page ";C%+1;S
PC(X%);
780PTR#F%=C%*(&41A*3):REM GET NEXT PAG
E START
790E%=0
800REPEAT
810E%=E%+1
820INPUT#F%,A$
830IF C%=0 PRINTA$ ELSE IF A$<>STRING$
(33," ")PROCprt
840UNTILE%=90 OR EOF#F%:IF P%=2 VDU12
850IF K% PROCcont
860ENDPROC
870DEFPROCprt
880IF E%=1 PROCpas:PRINT:PRINTSPC(X%);
:Z$=A$:ENDPROC
890IF E%=31 OR E%=61:IF INSTR(A$,Z$)=0
:Z$=A$:PRINT''SPC(X%+8);:PROCpas:ENDPROC
ELSE IF E%=31 OR E%=61 ENDPROC
900IF LEFT$(A$,1)=" ":REPEAT:A$=RIGHT$
(A$,LENA$-1):UNTILLEFT$(A$,1)<>" "
910IF RIGHT$(A$,1)=" ":REPEAT:A$=LEFT$
(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
920IF V%=1 V%=2
930IF INSTR(MID$(A$,3,2),"-")<>0 V%=1:
PRINT'SPC(X%-2);:I%=H%:H%=0:IFI%=1 PRINT
'SPC(X%-2);
940IF V%=1 VDU1,27,1,45,1,1
950IF V%=2 PRINTSPC(6);:V%=0
960PRINTA$;
970VDU1,27,1,45,1,0
980H%=H%+1
990IF H%=1PRINT" "; ELSE H%=0:PRINT'SP
C(X%);
1000ENDPROC
1010DEFPROCpage1
1020PTR#F%=0
1030FORL%=1TO30
1040INPUT#F%,I$
1050PRINTSPC(X%);I$;": ";
1060PTR#F%=PTR#F%+&41A-35
1070INPUT#F%,I$
1080PRINT;I$
1090PTR#F%=PTR#F%-&41A
1100NEXT
1110PTR#F%=PTR#F%+&41A
1120FOR L%=1 TO 30
1130INPUT#F%,A$
1140PRINTTAB(25);A$
1150NEXT
1160IF P%=2 VDU12
1170IF K% PROCcont
1180ENDPROC
1190DEFPROCpas
1200IF LEFT$(A$,1)=" ":REPEAT:A$=RIGHT$
(A$,LENA$-1):UNTILLEFT$(A$,1)<>" "
1210IF RIGHT$(A$,1)=" ":REPEAT:A$=LEFT$
(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
1220IF E%<>1PRINTSPC(X%);
1230VDU1,27,1,45,1,1
1240PRINTA$'
1250VDU1,27,1,45,1,0
1260ENDPROC
1270DEFPROCcont
1280IFP%=3 ENDPROC
1290VDU3
1300*FX21
1310PRINT''"Press a key to continue"
1320REPEATUNTILGET
1330VDUP%
1340ENDPROC
1350DEFPROCtrnover
1360VDU3
1370*FX21
1380PRINT'"Turn sheet around and press
a key."
1390VDUP%
1400REPEATUNTILGET
1410FORR%=1TOQ%
1420C%=1
1430REPEAT
1440PROCprtpage
1450C%=C%+2
1460UNTILC%>=B%
1470IF B% MOD2 VDU12
1480NEXT
1490ENDPROC