10 REM DICCONV 20 REM Convert dictionary to text file 30 REM For B/B+/E/M/C (with discs) 40 REM by Alan Blundell 50 REM (c) 1989 60 : 70 CLS 80 PROCinit 90 FOR letter%=0 TO 25 100 PROCloaddict(letter%) 110 PROCconvert 120 NEXT 130 CLOSE #in% 140 CLOSE #out% 150 PROCcursor(1) 160 PRINT 170 CHAIN "Spell" 180 : 190 DEFPROCinit 200 maxunits%=28 210 DIM dictbuf% maxunits%*256 220 DIM index% 211 230 DIM block% 12 240 osgbpb=&FFD1 250 PROCcursor(0) 260 ON ERROR CLOSE #0:PRINT ''':REPORT:PRINT:END 270 in%=OPENIN("Diction") 280 IF in%=0 PRINT '''"No dictionary!":END 290 out%=OPENOUT("DictTxt") 300 PRINT "Converting dictionary" 310 PRINT "Words starting with ' ' being converted"; 320 PROCgbpb(3,in%,index%,212,0) 330 ENDPROC 340 : 350 DEFPROCloaddict(letter%) 360 A%=3 370 fileptr%=index%!(letter%*8) 380 dictsize%=index%!((letter%+1)*8)-fileptr% 390 dictlen%=index%!(letter%*8+4) 400 dicttop%=dictbuf%+dictlen% 410 PROCgbpb(A%,in%,dictbuf%,dictsize%,fileptr%) 420 PRINT TAB(21,VPOS)CHR$(letter%+65); 430 ENDPROC 440 : 450 DEFPROCconvert 460 IF dictlen%=0 ENDPROC 470 dictptr%=dictbuf% 480 REPEAT 490 BPUT #out%,letter%+65 500 word$=$dictptr% 510 FOR ltr%=1 TO LEN(word$) 520 BPUT #out%,ASC(MID$(word$,ltr%,1)) 530 NEXT 540 BPUT #out%,13 550 dictptr%=dictptr%+LEN($dictptr%)+1 560 UNTIL dictptr%=dicttop% 570 ENDPROC 580 : 590 DEFPROCcursor(on%) 600 VDU 23,1,on%;0;0;0; 610 ENDPROC 620 : 630 DEFPROCgbpb(A%,in%,address%,size%,fileptr%) 640 X%=block% MOD 256 650 Y%=block% DIV 256 660 block%?0=in% 670 block%!1=address% 680 block%!5=size% 690 block%!9=fileptr% 700 CALL osgbpb 710 ENDPROC