Home » CEEFAX disks » telesoftware4.adl » 15-01-88/SEARCH
15-01-88/SEARCH
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware4.adl |
Filename: | 15-01-88/SEARCH |
Read OK: | ✔ |
File size: | 07AE bytes |
Load address: | FFFF1900 |
Exec address: | FFFF8023 |
File contents
1MODE7:PRINT''"SEARCH"''"Program to load disc data"'"23 discs at a time and search"'"for specified filename"'"or ambiguous filename"''"This is Listing 2 $.SEARCH"''"Press any key to continue";:G=GET 10REM Listing 2 "$.SEARCH" 20REM by John Macrae 30REM BBC B,B+/128 40REM 50REM Program to load disc data 60REM 23 discs at a time and search 70REM for specified filename 80REM or ambiguous filename 90REM 100REMONERRORVDU3:CHAIN"$.CATALOG" 110*FX6,10 120DIMdata%20735,bk%20 130CALL&0900 140PROCsetblock 150REM Main loop 160REPEAT:PROCsearch:UNTILFALSE 170: 180REM Loads data and enters search 190DEFPROCloadit 200PROCsk(0,0) 210?&8C=B% 220noofloads%=B%DIV23 230FORI%=0TOnoofloads% 240D%=0 250bk%!1=data% 260PROCrb(0,7+8*I%,9,&21) 270FORD%=0TO7 280bk%!1=data%+D%*&0A00+&100 290IF 8+8*I%+D%>=P% GOTO310 300PROCrb(128,8+8*I%+D%,0,&2A) 310NEXTD% 320?&8F=I%*10 330CALL&090D 340NEXTI% 350PRINT?&8D;CHR$134;"DISCS SEARCHED" 360ENDPROC 370: 380REM sets up osword data block 390DEFPROCsetblock 400?bk%=0:bk%!1=data%:!&88=data% 410?&8F=0 420X%=bk%MOD256:Y%=bk%DIV256 430ENDPROC 440: 450REM Seek Command 460DEFPROCsk(dr%,tr%) 470?bk%=dr%:bk%?5=1:bk%?6=&69 480bk%?7=tr% 490PROCosword(8) 500ENDPROC 510: 520REM Osword &7F routine 530DEFPROCosword(J%) 540A%=&7F 550CALL&FFF1 560IF(bk%?J%)<>0PRINTTAB(10,22)CHR$131;"Disc error ";bk%?J%:PRINTTAB(10,24)CHR$131;"Press space":VDU7:X=GET 570ENDPROC 580: 590REM Sets data block for read 600DEFPROCrb(F%,G%,H%,K%) 610?bk%=F%:bk%?5=3:bk%?6=&53:bk%?7=G% 620bk%?8=H%:bk%?9=K% 630PROCosword(10) 640ENDPROC 650: 660REM Main routine 670REM inputs filename etc 680DEFPROCsearch 690?&81=0:CLS:PRINTTAB(5,5)CHR$134;"Do you require a printout?":X$=GET$ 700*FX202,32 710CLS:PRINTTAB(5,5)CHR$134;"Input the filename";CHR$(131);:INPUTA$:IFLEN(A$)>7ORA$=" "ORLEN(A$)<=0GOTO710 720IFLENA$=7GOTO740 730REPEAT:A$=A$+" ":UNTILLEN(A$)=7 740FORV%=0TO6:?(&70+V%)=ASC(MID$(A$,7-V%,1)):?(&77+V%)=ASC(MID$(A$,7-V%,1))OR32:NEXT 750PROCscreen 760IFX$="Y"OR X$="y"VDU2 770VDU14 780?&8D=0:PROCloadit 790VDU3 800PRINT'''''''''''''''''''' 810VDU26,15 820ENDPROC 830: 840REM Sets up screen 850DEFPROCscreen 860CLS:IFX$="Y"OR X$="y"VDU2 870VDU30:PRINT''''" ";CHR$130" DISC FILENAME":VDU3:PRINTTAB(7,24)CHR$131"SHIFT TO REPEAT"';CHR$130;" ESCAPE TO MAIN MENU" 880VDU28,0,22,39,4 890VDU30 900ENDPROC
��7:�''"SEARCH"''"Program to load disc data"'"23 discs at a time and search"'"for specified filename"'"or ambiguous filename"''"This is Listing 2 $.SEARCH"''"Press any key to continue";:G=� � Listing 2 "$.SEARCH" � by John Macrae � BBC B,B+/128 (� 2� Program to load disc data <#� 23 discs at a time and search F� for specified filename P� or ambiguous filename Z� d!�ONERRORVDU3:CHAIN"$.CATALOG" n*FX6,10 x�data%20735,bk%20 � �&0900 � �setblock �� Main loop ��:�search:�� �: �"� Loads data and enters search ���loadit ��sk(0,0) �?&8C=B% �noofloads%=B%�23 ��I%=0�noofloads% �D%=0 �bk%!1=data% �rb(0,7+8*I%,9,&21) �D%=0�7 bk%!1=data%+D%*&0A00+&100 "� 8+8*I%+D%>=P% �TvA ,�rb(128,8+8*I%+D%,0,&2A) 6�D% @?&8F=I%*10 J �&090D T�I% ^�?&8D;�134;"DISCS SEARCHED" h� r: |� sets up osword data block ���setblock �!?bk%=0:bk%!1=data%:!&88=data% � ?&8F=0 �X%=bk%�256:Y%=bk%�256 �� �: �� Seek Command ���sk(dr%,tr%) �?bk%=dr%:bk%?5=1:bk%?6=&69 � bk%?7=tr% ��osword(8) �� �: � Osword &7F routine ��osword(J%) A%=&7F & �&FFF1 0S�(bk%?J%)<>0�10,22)�131;"Disc error ";bk%?J%:�10,24)�131;"Press space":�7:X=� :� D: N� Sets data block for read X��rb(F%,G%,H%,K%) b&?bk%=F%:bk%?5=3:bk%?6=&53:bk%?7=G% lbk%?8=H%:bk%?9=K% v�osword(10) �� �: �� Main routine �� inputs filename etc ���search �9?&81=0:�:�5,5)�134;"Do you require a printout?":X$=� � *FX202,32 �O�:�5,5)�134;"Input the filename";�(131);:�A$:�(A$)>7�A$=" "��(A$)<=0�dFB ��A$=7�ddB ��:A$=A$+" ":��(A$)=7 �B�V%=0�6:?(&70+V%)=�(�A$,7-V%,1)):?(&77+V%)=�(�A$,7-V%,1))�32:� ��screen ��X$="Y"� X$="y"�2 �14 ?&8D=0:�loadit �3 �'''''''''''''''''''' * �26,15 4� >: H� Sets up screen R��screen \�:�X$="Y"� X$="y"�2 fp�30:�''''" ";�130" DISC FILENAME":�3:�7,24)�131"SHIFT TO REPEAT"';�130;" ESCAPE TO MAIN MENU" p�28,0,22,39,4 z�30 �� �
00000000 0d 00 01 c0 eb 37 3a f1 27 27 22 53 45 41 52 43 |.....7:.''"SEARC| 00000010 48 22 27 27 22 50 72 6f 67 72 61 6d 20 74 6f 20 |H"''"Program to | 00000020 6c 6f 61 64 20 64 69 73 63 20 64 61 74 61 22 27 |load disc data"'| 00000030 22 32 33 20 64 69 73 63 73 20 61 74 20 61 20 74 |"23 discs at a t| 00000040 69 6d 65 20 61 6e 64 20 73 65 61 72 63 68 22 27 |ime and search"'| 00000050 22 66 6f 72 20 73 70 65 63 69 66 69 65 64 20 66 |"for specified f| 00000060 69 6c 65 6e 61 6d 65 22 27 22 6f 72 20 61 6d 62 |ilename"'"or amb| 00000070 69 67 75 6f 75 73 20 66 69 6c 65 6e 61 6d 65 22 |iguous filename"| 00000080 27 27 22 54 68 69 73 20 69 73 20 4c 69 73 74 69 |''"This is Listi| 00000090 6e 67 20 32 20 24 2e 53 45 41 52 43 48 22 27 27 |ng 2 $.SEARCH"''| 000000a0 22 50 72 65 73 73 20 61 6e 79 20 6b 65 79 20 74 |"Press any key t| 000000b0 6f 20 63 6f 6e 74 69 6e 75 65 22 3b 3a 47 3d a5 |o continue";:G=.| 000000c0 0d 00 0a 1a f4 20 4c 69 73 74 69 6e 67 20 32 20 |..... Listing 2 | 000000d0 22 24 2e 53 45 41 52 43 48 22 0d 00 14 14 f4 20 |"$.SEARCH"..... | 000000e0 62 79 20 4a 6f 68 6e 20 4d 61 63 72 61 65 0d 00 |by John Macrae..| 000000f0 1e 12 f4 20 42 42 43 20 42 2c 42 2b 2f 31 32 38 |... BBC B,B+/128| 00000100 0d 00 28 05 f4 0d 00 32 1f f4 20 50 72 6f 67 72 |..(....2.. Progr| 00000110 61 6d 20 74 6f 20 6c 6f 61 64 20 64 69 73 63 20 |am to load disc | 00000120 64 61 74 61 0d 00 3c 23 f4 20 32 33 20 64 69 73 |data..<#. 23 dis| 00000130 63 73 20 61 74 20 61 20 74 69 6d 65 20 61 6e 64 |cs at a time and| 00000140 20 73 65 61 72 63 68 0d 00 46 1c f4 20 66 6f 72 | search..F.. for| 00000150 20 73 70 65 63 69 66 69 65 64 20 66 69 6c 65 6e | specified filen| 00000160 61 6d 65 0d 00 50 1b f4 20 6f 72 20 61 6d 62 69 |ame..P.. or ambi| 00000170 67 75 6f 75 73 20 66 69 6c 65 6e 61 6d 65 0d 00 |guous filename..| 00000180 5a 05 f4 0d 00 64 21 f4 4f 4e 45 52 52 4f 52 56 |Z....d!.ONERRORV| 00000190 44 55 33 3a 43 48 41 49 4e 22 24 2e 43 41 54 41 |DU3:CHAIN"$.CATA| 000001a0 4c 4f 47 22 0d 00 6e 0b 2a 46 58 36 2c 31 30 0d |LOG"..n.*FX6,10.| 000001b0 00 78 15 de 64 61 74 61 25 32 30 37 33 35 2c 62 |.x..data%20735,b| 000001c0 6b 25 32 30 0d 00 82 0a d6 26 30 39 30 30 0d 00 |k%20.....&0900..| 000001d0 8c 0d f2 73 65 74 62 6c 6f 63 6b 0d 00 96 0f f4 |...setblock.....| 000001e0 20 4d 61 69 6e 20 6c 6f 6f 70 0d 00 a0 10 f5 3a | Main loop.....:| 000001f0 f2 73 65 61 72 63 68 3a fd a3 0d 00 aa 05 3a 0d |.search:......:.| 00000200 00 b4 22 f4 20 4c 6f 61 64 73 20 64 61 74 61 20 |..". Loads data | 00000210 61 6e 64 20 65 6e 74 65 72 73 20 73 65 61 72 63 |and enters searc| 00000220 68 0d 00 be 0c dd f2 6c 6f 61 64 69 74 0d 00 c8 |h......loadit...| 00000230 0c f2 73 6b 28 30 2c 30 29 0d 00 d2 0b 3f 26 38 |..sk(0,0)....?&8| 00000240 43 3d 42 25 0d 00 dc 14 6e 6f 6f 66 6c 6f 61 64 |C=B%....noofload| 00000250 73 25 3d 42 25 81 32 33 0d 00 e6 14 e3 49 25 3d |s%=B%.23.....I%=| 00000260 30 b8 6e 6f 6f 66 6c 6f 61 64 73 25 0d 00 f0 08 |0.noofloads%....| 00000270 44 25 3d 30 0d 00 fa 0f 62 6b 25 21 31 3d 64 61 |D%=0....bk%!1=da| 00000280 74 61 25 0d 01 04 17 f2 72 62 28 30 2c 37 2b 38 |ta%.....rb(0,7+8| 00000290 2a 49 25 2c 39 2c 26 32 31 29 0d 01 0e 0b e3 44 |*I%,9,&21).....D| 000002a0 25 3d 30 b8 37 0d 01 18 1d 62 6b 25 21 31 3d 64 |%=0.7....bk%!1=d| 000002b0 61 74 61 25 2b 44 25 2a 26 30 41 30 30 2b 26 31 |ata%+D%*&0A00+&1| 000002c0 30 30 0d 01 22 19 e7 20 38 2b 38 2a 49 25 2b 44 |00..".. 8+8*I%+D| 000002d0 25 3e 3d 50 25 20 e5 8d 54 76 41 0d 01 2c 1c f2 |%>=P% ..TvA..,..| 000002e0 72 62 28 31 32 38 2c 38 2b 38 2a 49 25 2b 44 25 |rb(128,8+8*I%+D%| 000002f0 2c 30 2c 26 32 41 29 0d 01 36 07 ed 44 25 0d 01 |,0,&2A)..6..D%..| 00000300 40 0e 3f 26 38 46 3d 49 25 2a 31 30 0d 01 4a 0a |@.?&8F=I%*10..J.| 00000310 d6 26 30 39 30 44 0d 01 54 07 ed 49 25 0d 01 5e |.&090D..T..I%..^| 00000320 1f f1 3f 26 38 44 3b bd 31 33 34 3b 22 44 49 53 |..?&8D;.134;"DIS| 00000330 43 53 20 53 45 41 52 43 48 45 44 22 0d 01 68 05 |CS SEARCHED"..h.| 00000340 e1 0d 01 72 05 3a 0d 01 7c 1f f4 20 73 65 74 73 |...r.:..|.. sets| 00000350 20 75 70 20 6f 73 77 6f 72 64 20 64 61 74 61 20 | up osword data | 00000360 62 6c 6f 63 6b 0d 01 86 0e dd f2 73 65 74 62 6c |block......setbl| 00000370 6f 63 6b 0d 01 90 21 3f 62 6b 25 3d 30 3a 62 6b |ock...!?bk%=0:bk| 00000380 25 21 31 3d 64 61 74 61 25 3a 21 26 38 38 3d 64 |%!1=data%:!&88=d| 00000390 61 74 61 25 0d 01 9a 0a 3f 26 38 46 3d 30 0d 01 |ata%....?&8F=0..| 000003a0 a4 19 58 25 3d 62 6b 25 83 32 35 36 3a 59 25 3d |..X%=bk%.256:Y%=| 000003b0 62 6b 25 81 32 35 36 0d 01 ae 05 e1 0d 01 b8 05 |bk%.256.........| 000003c0 3a 0d 01 c2 12 f4 20 53 65 65 6b 20 43 6f 6d 6d |:..... Seek Comm| 000003d0 61 6e 64 0d 01 cc 11 dd f2 73 6b 28 64 72 25 2c |and......sk(dr%,| 000003e0 74 72 25 29 0d 01 d6 1e 3f 62 6b 25 3d 64 72 25 |tr%)....?bk%=dr%| 000003f0 3a 62 6b 25 3f 35 3d 31 3a 62 6b 25 3f 36 3d 26 |:bk%?5=1:bk%?6=&| 00000400 36 39 0d 01 e0 0d 62 6b 25 3f 37 3d 74 72 25 0d |69....bk%?7=tr%.| 00000410 01 ea 0e f2 6f 73 77 6f 72 64 28 38 29 0d 01 f4 |....osword(8)...| 00000420 05 e1 0d 01 fe 05 3a 0d 02 08 18 f4 20 4f 73 77 |......:..... Osw| 00000430 6f 72 64 20 26 37 46 20 72 6f 75 74 69 6e 65 0d |ord &7F routine.| 00000440 02 12 10 dd f2 6f 73 77 6f 72 64 28 4a 25 29 0d |.....osword(J%).| 00000450 02 1c 0a 41 25 3d 26 37 46 0d 02 26 0a d6 26 46 |...A%=&7F..&..&F| 00000460 46 46 31 0d 02 30 53 e7 28 62 6b 25 3f 4a 25 29 |FF1..0S.(bk%?J%)| 00000470 3c 3e 30 f1 8a 31 30 2c 32 32 29 bd 31 33 31 3b |<>0..10,22).131;| 00000480 22 44 69 73 63 20 65 72 72 6f 72 20 22 3b 62 6b |"Disc error ";bk| 00000490 25 3f 4a 25 3a f1 8a 31 30 2c 32 34 29 bd 31 33 |%?J%:..10,24).13| 000004a0 31 3b 22 50 72 65 73 73 20 73 70 61 63 65 22 3a |1;"Press space":| 000004b0 ef 37 3a 58 3d a5 0d 02 3a 05 e1 0d 02 44 05 3a |.7:X=...:....D.:| 000004c0 0d 02 4e 1e f4 20 53 65 74 73 20 64 61 74 61 20 |..N.. Sets data | 000004d0 62 6c 6f 63 6b 20 66 6f 72 20 72 65 61 64 0d 02 |block for read..| 000004e0 58 15 dd f2 72 62 28 46 25 2c 47 25 2c 48 25 2c |X...rb(F%,G%,H%,| 000004f0 4b 25 29 0d 02 62 26 3f 62 6b 25 3d 46 25 3a 62 |K%)..b&?bk%=F%:b| 00000500 6b 25 3f 35 3d 33 3a 62 6b 25 3f 36 3d 26 35 33 |k%?5=3:bk%?6=&53| 00000510 3a 62 6b 25 3f 37 3d 47 25 0d 02 6c 15 62 6b 25 |:bk%?7=G%..l.bk%| 00000520 3f 38 3d 48 25 3a 62 6b 25 3f 39 3d 4b 25 0d 02 |?8=H%:bk%?9=K%..| 00000530 76 0f f2 6f 73 77 6f 72 64 28 31 30 29 0d 02 80 |v..osword(10)...| 00000540 05 e1 0d 02 8a 05 3a 0d 02 94 12 f4 20 4d 61 69 |......:..... Mai| 00000550 6e 20 72 6f 75 74 69 6e 65 0d 02 9e 19 f4 20 69 |n routine..... i| 00000560 6e 70 75 74 73 20 66 69 6c 65 6e 61 6d 65 20 65 |nputs filename e| 00000570 74 63 0d 02 a8 0c dd f2 73 65 61 72 63 68 0d 02 |tc......search..| 00000580 b2 39 3f 26 38 31 3d 30 3a db 3a f1 8a 35 2c 35 |.9?&81=0:.:..5,5| 00000590 29 bd 31 33 34 3b 22 44 6f 20 79 6f 75 20 72 65 |).134;"Do you re| 000005a0 71 75 69 72 65 20 61 20 70 72 69 6e 74 6f 75 74 |quire a printout| 000005b0 3f 22 3a 58 24 3d be 0d 02 bc 0d 2a 46 58 32 30 |?":X$=.....*FX20| 000005c0 32 2c 33 32 0d 02 c6 4f db 3a f1 8a 35 2c 35 29 |2,32...O.:..5,5)| 000005d0 bd 31 33 34 3b 22 49 6e 70 75 74 20 74 68 65 20 |.134;"Input the | 000005e0 66 69 6c 65 6e 61 6d 65 22 3b bd 28 31 33 31 29 |filename";.(131)| 000005f0 3b 3a e8 41 24 3a e7 a9 28 41 24 29 3e 37 84 41 |;:.A$:..(A$)>7.A| 00000600 24 3d 22 20 22 84 a9 28 41 24 29 3c 3d 30 e5 8d |$=" "..(A$)<=0..| 00000610 64 46 42 0d 02 d0 0f e7 a9 41 24 3d 37 e5 8d 64 |dFB......A$=7..d| 00000620 64 42 0d 02 da 18 f5 3a 41 24 3d 41 24 2b 22 20 |dB.....:A$=A$+" | 00000630 22 3a fd a9 28 41 24 29 3d 37 0d 02 e4 42 e3 56 |":..(A$)=7...B.V| 00000640 25 3d 30 b8 36 3a 3f 28 26 37 30 2b 56 25 29 3d |%=0.6:?(&70+V%)=| 00000650 97 28 c1 41 24 2c 37 2d 56 25 2c 31 29 29 3a 3f |.(.A$,7-V%,1)):?| 00000660 28 26 37 37 2b 56 25 29 3d 97 28 c1 41 24 2c 37 |(&77+V%)=.(.A$,7| 00000670 2d 56 25 2c 31 29 29 84 33 32 3a ed 0d 02 ee 0b |-V%,1)).32:.....| 00000680 f2 73 63 72 65 65 6e 0d 02 f8 15 e7 58 24 3d 22 |.screen.....X$="| 00000690 59 22 84 20 58 24 3d 22 79 22 ef 32 0d 03 02 07 |Y". X$="y".2....| 000006a0 ef 31 34 0d 03 0c 12 3f 26 38 44 3d 30 3a f2 6c |.14....?&8D=0:.l| 000006b0 6f 61 64 69 74 0d 03 16 06 ef 33 0d 03 20 19 f1 |oadit.....3.. ..| 000006c0 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 |''''''''''''''''| 000006d0 27 27 27 27 0d 03 2a 0a ef 32 36 2c 31 35 0d 03 |''''..*..26,15..| 000006e0 34 05 e1 0d 03 3e 05 3a 0d 03 48 14 f4 20 53 65 |4....>.:..H.. Se| 000006f0 74 73 20 75 70 20 73 63 72 65 65 6e 0d 03 52 0c |ts up screen..R.| 00000700 dd f2 73 63 72 65 65 6e 0d 03 5c 17 db 3a e7 58 |..screen..\..:.X| 00000710 24 3d 22 59 22 84 20 58 24 3d 22 79 22 ef 32 0d |$="Y". X$="y".2.| 00000720 03 66 70 ef 33 30 3a f1 27 27 27 27 22 20 20 20 |.fp.30:.''''" | 00000730 20 20 20 22 3b bd 31 33 30 22 20 44 49 53 43 20 | ";.130" DISC | 00000740 20 20 20 20 20 46 49 4c 45 4e 41 4d 45 22 3a ef | FILENAME":.| 00000750 33 3a f1 8a 37 2c 32 34 29 bd 31 33 31 22 53 48 |3:..7,24).131"SH| 00000760 49 46 54 20 54 4f 20 52 45 50 45 41 54 22 27 3b |IFT TO REPEAT"';| 00000770 bd 31 33 30 3b 22 20 20 20 20 20 45 53 43 41 50 |.130;" ESCAP| 00000780 45 20 54 4f 20 4d 41 49 4e 20 4d 45 4e 55 22 0d |E TO MAIN MENU".| 00000790 03 70 11 ef 32 38 2c 30 2c 32 32 2c 33 39 2c 34 |.p..28,0,22,39,4| 000007a0 0d 03 7a 07 ef 33 30 0d 03 84 05 e1 0d ff |..z..30.......| 000007ae