10 REMBBCPDCatalogueDatabase 20 REMbyStevenFlintham 30 REMandAndrewPepperell 40 REM 50 REMVersion1.76-PublicDomain 60 : 70 IFFNmode=0THENMODE128ELSEMODE132 80 IFHIMEM=&3000THENMODE4 90 PROCdisable 100 PROCinit 110 IFFNmode=0THENPROCmode0_instructionsELSEPROCmode4_instructions 120 CHAIN"CATDISP" 130 END 140 DEFPROCdisable 150 *FX229,1 160 *FX4,2 170 ENDPROC 180 DEFPROCenable 190 *FX229 200 *FX4 210 ENDPROC 220 DEFPROCinit 230 ONERRORMODE7:PROCerror:END 240 VDU23,128,24,60,126,255,24,24,24,0 250 VDU23,129,24,24,24,255,126,60,24,0 260 VDU23,130,16,48,112,255,112,48,16,0 270 VDU23,131,8,12,14,255,14,12,8,0 280 chan%=OPENIN("CATALOG") 290 date$=FNread_line(chan%) 300 CLOSE#chan% 310 PROCdraw_screen(FNmode=0) 320 ENDPROC 330 DEFPROCerror 340 REPORT 350 PRINT" at line ";ERL 360 PROCenable 370 ENDPROC 380 DEFFNmode 390 LOCALA%,return$ 400 IFM%=0ORM%=80THEN=0 410 A%=135 420 return$=STR$~USR(&FFF4) 430 =VAL(MID$(return$,3,2)) 440 DEFPROCdraw_screen(mode0%) 450 MOVE0,799+64 460 DRAW0,1023 470 DRAW1279,1023 480 DRAW1279,831+64 490 DRAW1263,831+64 500 DRAW1263,799+64 510 MOVE31,991+16 520 DRAW511,991+16 530 DRAW511,831+48 540 DRAW31,831+48 550 DRAW31,991+16 560 PRINTTAB(3,1)"------" 570 PRINTTAB(3,2)"BBC PD" 580 PRINTTAB(3,3)"------" 590 IFmode0%PRINTTAB(14,1)"Public Domain":PRINTTAB(17,3)"Software" 600 IFmode0%THENPRINTTAB(43,1)"Catalogue edition dated ";date$ELSEPRINTTAB(18,1)"Catalogue ";date$ 610 COLOUR0 620 COLOUR129 630 IFmode0%VDU28,0,31,79,5:CLS:VDU28,2,30,77,8 640 IFNOTmode0%VDU28,0,31,39,5:CLS:VDU28,1,30,39,6 650 VDU23,1,0;0;0;0; 660 ENDPROC 670 DEFPROCmode0_instructions 680 VDU28,42,30,78,6 690 PROCinstructions 700 VDU28,2,30,40,6 710 ENDPROC 720 DEFPROCmode4_instructions 730 PROCinstructions 740 PRINT''"Press SPACE to continue..."; 750 *FX21 760 REPEATUNTILGET=32 770 ENDPROC 780 DEFPROCinstructions 790 IFFNmode=0THENPRINT 800 PRINT"Database control keys:" 810 PRINT 820 PRINTCHR$128;" - go to the first item" 830 PRINTCHR$129;" - go to the last item" 840 PRINTCHR$130;" - go to the previous item" 850 PRINTCHR$131;" - go to the next item" 860 PRINT 870 PRINT"@ - go to a selected item" 880 PRINT"P - print record(s)" 890 PRINT"S - search records" 900 PRINT 910 PRINT"ESCAPE - return to the main menu" 920 PRINT 930 PRINT"Disc formats:" 940 PRINT 950 PRINT"A - DFS 40T, single sided, 100K" 960 PRINT"B - DFS 40T, double sided, 200K" 970 PRINT"C - DFS 80T, single sided, 200K" 980 PRINT"D - DFS 80T, double sided, 400K" 990 PRINT"E - ADFS 40T, single sided, 160K (S)" 1000 PRINT"F - ADFS 80T, single sided, 320K (M)" 1010 PRINT"G - ADFS 80T, double sided, 640K (L)" 1020 ENDPROC 1030 DEFFNread_line(chan%) 1040 LOCALline$,byte% 1050 REPEAT 1060 byte%=BGET#chan% 1070 IFbyte%<>13THENline$=line$+CHR$(byte%) 1080 UNTILbyte%=13OREOF#chan% 1090 =line$