8-Bit Software Online Conversion
8BS Catalogue/Printer - Listing
10DEFFNS="CatRd3"
20MODE7
30Z$=""
40V%=0
50H%=0
60X%=9
70CLOSE#0
80VDU23;8202;0;0;0;
90PRINT'"
100PRINT"
110PRINT''" This utility will print/vi
ew the 8BS"'" catalogue to either single
sheets or"'" fanfold paper, on one or b
oth sides."
120PRINT'" Place the top of printer he
ad at the"'" top of the sheet."
130PRINT'TAB(11);" Enter 1 or 2"
140PRINT'" 1. Single sided printo
ut. "
150PRINT'" 2. Double sided printo
ut. "
160REPEAT
170C$=GET$
180UNTILINSTR("12",C$)
190PRINT'" How Many Catalogues? "'
200INPUT" ";Q%
210PRINT'" Printer? Y/N "
220IF INSTR("Yy",GET$) P%=2 ELSE P%=3
230MODE0
240IFP%=3 PRINT''"Press SHIFT to scrol
l the text"'':VDU14
250VDUP%
260F%=OPENIN"Cat"
270A%=EXT#F%/&41A
280B%=A%/3+A%MOD3:REM PAGES IN THIS CA
TALOGUE
290FORR%=1TOQ%
300PROCpage1
310C%=VAL C$
320REPEAT
330PROCprtpage
340C%=C%+1
350IF C$="2" C%=C%+1
360UNTILC%>=B%
370NEXT
380IF C$="2":VDU3:PRINT'"Turn sheet ar
ound and press a key.":VDUP%:REPEATUNTIL
GET:FORR%=1TOQ%:C%=1:REPEATPROCprtpage:C
%=C%+2:UNTILC%>=B%:NEXT
390VDU3
400CLOSE#F%
410END:REM the rest requires the front
page on disc
420IFP%=3 END
430FORL%=1TOQ%
440MODE7
450VDU28,0,19,39,0
460*LO.SCREEN 7C00
470*GDUMP
480VDU2,1,27,1,126,1,49,1,5:REM DOUBLE
490PRINT'TAB(4)"The BBC and Master P.D
. Library"
500PRINTTAB(9)"and Postal User Group."
510VDU1,27,1,126,1,49,1,6:REM QUAD
520PRINT''TAB(5)"Catalogue."
530VDU1,27,1,126,1,49,1,5:REM DOUBLE
540PRINTTAB(12)LEFT$(TIME$,15)
550PRINT'TAB(10)"17 Lambert Park Road.
"
560PRINTTAB(10)"Hedon."
570PRINTTAB(10)"Hull."
580PRINTTAB(10)"HU12 8HF."
590PRINTTAB(10)"Tel 0482 896868."
600IF P%=2 VDU12,3
610NEXT
620END
630DEFPROCprtpage
640H%=0
650IF P%=3 PRINT'
660IF C%<>0PRINTSPC(X%);"Page ";C%+1;S
PC(X%);
670PTR#F%=C%*(&41A*3):REM GET NEXT PAG
E START
680E%=0
690REPEAT
700E%=E%+1
710INPUT#F%,A$
720IF C%=0 PRINTA$ ELSE IF A$<>STRING$
(33," ")PROCprt
730UNTILE%=90 OR EOF#F%:IF P%=2 VDU12
740IFC$="1" PROCcont
750ENDPROC
760DEFPROCprt
770IF E%=1 PROCpas:PRINT:PRINTSPC(X%);
:Z$=A$:ENDPROC
780IF 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
790IF LEFT$(A$,1)=" ":REPEAT:A$=RIGHT$
(A$,LENA$-1):UNTILLEFT$(A$,1)<>" "
800IF RIGHT$(A$,1)=" ":REPEAT:A$=LEFT$
(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
810IF V%=1 V%=2
820IF INSTR(MID$(A$,3,2),"-")<>0 V%=1:
PRINT'SPC(X%-2);:I%=H%:H%=0:IFI%=1 PRINT
'SPC(X%-2);
830IF V%=1 VDU1,27,1,45,1,1
840IF V%=2 PRINTSPC(6);:V%=0
850PRINTA$;
860VDU1,27,1,45,1,0
870H%=H%+1
880IF H%=1PRINT" "; ELSE H%=0:PRINT'SP
C(X%);
890ENDPROC
900DEFPROCpage1
910PTR#F%=0
920FORL%=1TO30
930INPUT#F%,I$
940PRINTSPC(X%);I$;": ";
950PTR#F%=PTR#F%+&41A-35
960INPUT#F%,I$
970PRINT;I$
980PTR#F%=PTR#F%-&41A
990NEXT
1000PTR#F%=PTR#F%+&41A
1010FOR L%=1 TO 30
1020INPUT#F%,A$
1030PRINTTAB(25);A$
1040NEXT
1050IF P%=2 VDU12
1060IFC$="1" PROCcont
1070ENDPROC
1080DEFPROCpas
1090IF LEFT$(A$,1)=" ":REPEAT:A$=RIGHT$
(A$,LENA$-1):UNTILLEFT$(A$,1)<>" "
1100IF RIGHT$(A$,1)=" ":REPEAT:A$=LEFT$
(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
1110IF E%<>1PRINTSPC(X%);
1120VDU1,27,1,45,1,1
1130PRINTA$'
1140VDU1,27,1,45,1,0
1150ENDPROC
1160DEFPROCcont
1170IF P%=3 ENDPROC
1180VDU3
1190*FX21
1200PRINT''"Press a key to continue"
1210REPEATUNTILGET
1220VDUP%
1230ENDPROC