8-Bit Software Online Conversion

:2.B.CatDisp - Listing

10CLS:PROCA:PROCB:REPEAT:PROCC(`%):RE PEAT:REPEAT:£%=INKEY-58:a%=INKEY-42:b%=I NKEY-26:c%=INKEY-122:d%=INKEY-72:e%=INKE Y-56:f%=INKEY-82:g%=INKEY-113:UNTIL£%EOR a%EORb%EORc%EORg%EORd%EORe%EORf%:REPEATU NTILNOTINKEY-58ANDNOTINKEY-42ANDNOTINKEY -122ANDNOTINKEY-26ANDNOTINKEY-113ANDNOTI NKEY-72ANDNOTINKEY-56ANDNOTINKEY-82:h%=` %:IF£%`%=1 20IFa%`%=i% 30IFb%AND`%>1THEN`%=`%-1 40IFc%AND`%<i%`%=`%+1 50IFd%h%=i%+1:`%=FNA(`%) 60IFe%h%=i%+1:PROCD 70IFf%h%=i%+1:PROCE 80UNTILh%<>`%ORg%:UNTILg%:CLOSE#j%:*F X21 90CHAIN"$.PDmenu":END 100DEFPROCA:*FX229 110*FX4,2 120ENDPROC 130DEFPROCF:*FX229 140*FX4 150ENDPROC 160DEFPROCB:ONERRORPROCG:END 170DIMk%16,l%1024,A$(23,1):FORm%=0TO22 :FORn%=0TO1:A$(m%,n%)=STRING$(38," "):NE XT:NEXT:*LOAD CATCODE A00 180j%=OPENIN"CATALOG":A$=FNB(j%):i%=VA L(FNB(j%)):CLOSE#j%:DIMA%(i%):j%=OPENIN" CATDATA":FORo%=1TOi%:INPUT#j%,A%(o%):NEX T:CLOSE#j%:j%=OPENIN"CATALOG":`%=1:ENDPR OC 190DEFPROCG:IFERR=17CLOSE#j%:VDU3:OSCL I"DRIVE0":OSCLI"EXEC $.!BOOT":END 200CLS:REPORT:PRINT" at line ";ERL:PRO CF:ENDPROC 210DEFFNC:LOCALA%,B$:A%=135:B$=STR$÷US R&FFF4:=VAL(MID$(B$,3,2)) 220DEFFNB(j%):LOCALC$,p%:REPEAT:p%=BGE T#j%:IFp%>=32THENC$=C$+CHR$p% 230UNTILp%=13OREOF#j%:=C$ 240DEFFND:!&70=q%:!&72=l%:!&74=0:CALL& A00:q%=!&74:=$&900 250DEFPROCH(r%):IFr%VDU28,2,30,40,6ELS EVDU28,1,30,39,6 260ENDPROC 270DEFPROCC(s%):LOCALD$,C$,E$:PROCI(s% ,j%):q%=0:D$=FNE(FND):CLS:VDU26:COLOUR12 8:COLOUR1:IFFNC=0PRINTTAB(77-LEN(" Disc "+D$),3);" Disc ";D$ELSEPRINTT AB(38-LEN(" Disc "+D$),3);" Di sc ";D$ 280PROCH(FNC=0):COLOUR129:COLOUR0:REPE AT:C$=FND:IFLEFT$(C$,1)<>"÷"PRINTC$ 290UNTILLEFT$(C$,1)="÷":PRINTTAB(0,23) ;"USER RATING: ";FNF(MID$(C$,2)):E$=FND: PRINTTAB(0,21);"DISCS: A=";FNG(E$,1);" B =";FNG(E$,2);" C=";FNG(E$,3);" D=";FNG(E $,4);" E=";FNG(E$,5);" F=";FNG(E$,6);" G =";FNG(E$,7):ENDPROC 300DEFFNG(E$,i%):LOCALF$:F$=MID$(E$,i% ,1):IFF$="0"THEN="/" 310=F$ 320DEFFNA(t%):LOCALF$:CLS:COLOUR128:CO LOUR1:VDU26:IFFNC=0PRINTTAB(68,3);SPC10; ELSEPRINTTAB(28,3);SPC10; 330PROCH(FNC=0):COLOUR129:COLOUR0:PRIN T"Enter the number of the disc you wish" '"to go to. If the disc is split up"'"in to an (a) and a (b) part, you do not"'"h ave to enter the letter part unless"'"yo u want to."''"Pressing RETURN will go ba ck to the"'"disc contents "; 340PRINT"shown before @ was"'"pressed. "''"Disc number: ";:F$=FNH(5,0):=FNI(F$, t%) 350DEFFNI(F$,t%):LOCALu%,v%,f%,G$,H$:u %=VALF$:IFu%=0ANDLENF$<>1THEN=t% 360IFu%>i%ORu%<0THEN=t% 370v%=-1:FORf%=u%TOi%:PTR#j%=A%(f%):G$ =FNB(j%):IFVALG$=u%v%=f%:f%=i%+1 380NEXT:IFv%=-1THEN=t% 390H$=RIGHT$(F$,1):IFASCH$>=65ANDASCH$ <=90THENH$=CHR$(ASCH$+32) 400IFH$<"a"ORH$>"z"THEN=v% 410FORf%=v%TOi%:PTR#j%=A%(f%):G$=FNB(j %):IFRIGHT$(G$,1)=H$v%=f%:f%=i%+1ELSEIFH $>RIGHT$(G$,1)ANDLEFT$(F$,LENF$-1)=LEFT$ (G$,LENG$-1)v%=f%ELSEIFFNJ(F$,G$)v%=f%:f %=i%+1 420NEXT:=v% 430DEFFNJ(F$,G$):H$=RIGHT$(F$,1):IFASC H$>=65ANDASCH$<=90THENH$=CHR$(ASCH$+32) 440IFLEFT$(F$,LENF$-1)=G$ANDH$>="a"AND H$<="z"THEN=TRUE 450=FALSE 460DEFFNH(w%,x%):LOCALI$,y%:I$="":REPE AT:REPEAT:*FX21,0 470y%=GET:UNTILy%=13ORy%=127OR(y%>=32A NDy%<=126):IFy%=127ANDLENI$=0PROCJ 480IFy%<>127ANDy%<>13ANDLENI$=w%PROCJ 490IFy%<>127ANDy%<>13ANDLENI$<w%VDUy%: I$=I$+CHR$y% 500IFy%=127ANDLENI$>0VDU8,32,8:I$=LEFT $(I$,LENI$-1) 510UNTILy%=13ANDLENI$>=x%:=I$ 520DEFPROCJ:SOUND3,-10,101,5:ENDPROC 530DEFFNE(C$):REPEAT:IFRIGHT$(C$,1)=CH R$0THENC$=LEFT$(C$,LENC$-1) 540UNTILRIGHT$(C$,1)<>CHR$0:=C$ 550DEFPROCD:LOCALJ$,e%,C$,z%,E$:CLS:VD U26:COLOUR128:COLOUR1:IFFNC=0PRINTTAB(68 ,3);SPC10;ELSEPRINTTAB(28,3);SPC10; 560PROCH(FNC=0):COLOUR129:COLOUR0:IFNO TFNKPRINT"The printer is off-line or not "'"connected."''"Press SPACE to continue ...":PROCK:ENDPROC 570PRINT"Do you want to print just thi s item?":REPEAT:J$=CHR$(GETAND&DF):UNTIL J$="Y"ORJ$="N":IFJ$="Y"PRINT"Yes":£%=`%: a%=`%ELSEPRINT"No" 580IFJ$="N"£%=FNL:IF£%=-1ENDPROC 590IFJ$="N"a%=FNM:IFa%=-1ORa%<£%ENDPRO C 600IFJ$="N"IFFNNPROCL(£%,a%):ENDPROC 610PROCM("BBC PD Catalogue: "+A$+CHR$1 3+CHR$13):FORe%=£%TOa%:PROCI(e%,j%):q%=0 :D$=FND:PROCM("Disc "+D$+CHR$13+CHR$13): REPEAT:C$=FND:IFLEFT$(C$,1)<>"÷"PROCM(C$ +CHR$13) 620UNTILLEFT$(C$,1)="÷":z%=VAL(MID$(C$ ,2)):PROCM(CHR$13+"USER RATING: "):IFz%= 0PROCM("unrated"+CHR$13)ELSEPROCM(FNF(MI D$(C$,2))+CHR$13) 630E$=FND:PROCM(CHR$13+"DISCS: A="+FNG (E$,1)+" B="+FNG(E$,2)+" C="+FNG(E$,3)+" D="+FNG(E$,4)+" E="+FNG(E$,5)+" F="+FNG (E$,6)+" G="+FNG(E$,7)+CHR$13+CHR$13):NE XT:ENDPROC 640DEFFNL:LOCALK$,£%:PRINT'"Please ent er the disc number of the"'"first item t o be printed. Just press"'"RETURN for th e first item."''"First item: ";:K$=FNH(5 ,0):IFK$=""£%=1ELSE£%=FNI(K$,-1) 650=£% 660DEFFNM:LOCALL$,a%:PRINT''"Please en ter the disc number of the"'"last item t o be printed. Just press"'"RETURN for th e last item."''"Last item: ";:L$=FNH(5,0 ):IFRIGHT$(L$,1)>="0"ANDRIGHT$(L$,1)<="9 "L$=L$+"z" 670IFL$=""a%=i%ELSEa%=FNI(L$,-1) 680=a% 690DEFPROCM(C$):LOCALAA%:VDU2:FORAA%=1 TOLENC$:VDU1,ASC(MID$(C$,AA%,1)):NEXT:VD U3:ENDPROC 700DEFFNK:LOCALBA%,CA%:BA%=ADVAL-4:VDU 2,1,0,1,0,1,0,1,0,1,0,3:CA%=TIME:REPEATU NTILTIME-CA%>=10:IFADVAL-4<BA%THEN=FALSE 710=TRUE 720DEFFNF(M$):LOCALz%,DA%,B$:z%=VAL(LE FT$(M$,1)):IFz%=0THEN="unrated" 730B$=STRING$(z%,"*")+" ("+STR$z%+") " :IFLENM$=1THEN=B$ 740DA%=VAL(MID$(M$,2)):=B$+"(based on "+STR$DA%+")" 750DEFPROCK:*FX21 760REPEATUNTILGET=32:ENDPROC 770DEFPROCE:LOCALN$,v%,f%,A%,X%,Y%,C$: CLS:VDU26:COLOUR128:COLOUR1:IFFNC=0PRINT TAB(68,3);SPC10;ELSEPRINTTAB(28,3);SPC10 ; 780PROCH(FNC=0):COLOUR129:COLOUR0:PRIN T"Enter the string you wish to search"'" for. Press RETURN to go back to the"'"di sc contents shown before S was"'"pressed . The search is not case-"'"sensitive, s o you can ignore the CAPS"'"LOCK status. "''"String: ";:N$=FNH(30,0) 790IFN$=""ENDPROC 800N$=FNO(N$):v%=-1:FORf%=1TOi%:PROCI( f%,j%):q%=0:REPEAT:C$=FNO(FND):UNTILINST R(C$,N$)<>0ORLEFT$(C$,1)="÷":IFINSTR(C$, N$)<>0THENv%=f%:f%=i%+1 810NEXT:IFv%=-1PRINT''"That string cou ld not be found."''"Press SPACE to conti nue...":PROCK:ENDPROC 820`%=v%:ENDPROC 830DEFFNO(O$):LOCALAA%,P$,EA%:FORAA%=1 TOLENO$:EA%=ASC(MID$(O$,AA%,1)):IFEA%>=9 7ANDEA%<=122THENEA%=EA%-32 840P$=P$+CHR$EA%:NEXT:=P$ 850DEFFNN:LOCALJ$:PRINT''"Do you want to print using two"'"columns? ";:REPEAT: *FX21 860J$=CHR$(GETAND&DF):UNTILJ$="Y"ORJ$= "N":IFJ$="Y"PRINT"Yes":=TRUE 870PRINT"No":=FALSE 880DEFPROCL(£%,a%):LOCALe%,FA%:e%=£%:F ORGA%=1TOINT(((a%-£%+1)/4)+0.999999999): PROCM(CHR$13+CHR$13+"BBC PD Catalogue: " +A$+CHR$13+CHR$13+CHR$13):FORFA%=0TO2STE P2:IFFA%=2PROCM(CHR$13+CHR$13+CHR$13+CHR $13) 890IFFA%+e%<a%PROCN(FA%+e%) 900IFFA%+e%=a%PROCO(FA%+e%) 910NEXT:e%=e%+4:VDU2,1,12,3:NEXT:ENDPR OC 920DEFPROCI(s%,j%):LOCALA%,X%,Y%:PTR#j %=A%(s%):A%=4:X%=k%MOD256:Y%=k%DIV256:?k %=j%:k%!1=l%:k%!5=1024:CALL&FFD1:ENDPROC 930DEFPROCN(i%):LOCALo%,HA%,IA%,M$,E$, e%:FORo%=i%TOi%+1:FORHA%=0TO23:A$(HA%,o% -i%)="":NEXT:PROCI(o%,j%):q%=0:IA%=-1:RE PEAT:IA%=IA%+1:IFIA%=24THENIA%=23 940A$(IA%,o%-i%)=FNE(FND):IFIA%=0THENA $(IA%,o%-i%)="Disc "+A$(IA%,o%-i%) 950UNTILLEFT$(A$(IA%,o%-i%),1)="÷":M$= MID$(A$(IA%,o%-i%),2):A$(IA%,o%-i%)="":A $(22,o%-i%)="USER RATING: "+FNF(M$):E$=F NE(FND):A$(23,o%-i%)="DISCS: A="+FNG(E$, 1)+" B="+FNG(E$,2)+" C="+FNG(E$,3)+" D=" +FNG(E$,4)+" E="+FNG(E$,5)+" F="+FNG(E$, 6)+" G="+FNG(E$,7):NEXT:FORe%=0TO23 960PROCM(A$(e%,0)+STRING$(40-LENA$(e%, 0)," ")+A$(e%,1)+CHR$13):IFe%=0ORe%>=22P ROCM(CHR$13) 970NEXT:ENDPROC 980DEFPROCO(i%):LOCALHA%,IA%,M$,E$,e%: FORHA%=0TO23:A$(HA%,0)="":NEXT:PROCI(i%, j%):q%=0:IA%=-1:REPEAT:IA%=IA%+1:IFIA%=2 4THENIA%=23 990A$(IA%,0)=FND:IFIA%=0THENA$(IA%,0)= "Disc "+A$(IA%,0) 1000UNTILLEFT$(A$(IA%,0),1)="÷":M$=MID$ (A$(IA%,0),2):A$(IA%,0)="":A$(22,0)="USE R RATING: "+FNF(M$):E$=FND:A$(23,0)="DIS CS: A="+FNG(E$,1)+" B="+FNG(E$,2)+" C="+ FNG(E$,3)+" D="+FNG(E$,4)+" E="+FNG(E$,5 )+" F="+FNG(E$,6)+" G="+FNG(E$,7):FORe%= 0TO23:PROCM(A$(e%,0)+CHR$13) 1010IFe%=0ORe%>=22PROCM(CHR$13) 1020NEXT:ENDPROC