8-Bit Software Online Conversion

8BS Messaging System - Listing

2MODE7:LOMEM=TOP+452:PROCa:b$=FNc:ON ERRORPROCd:b$=" " 310IFb$=" "ANDFNb=4THENb$="D" 320IFb$=" "ANDFNb=8THENb$="A" 330IFb$=" "ANDFNb=16THENb$="H" 335IFb$="A"THENPROCe 340IFb$="D"THENPROCf 350IFb$="H"THENPROCj 355ONERRORVDU3:PROCg("FX3"):CLOSE#0:IF ERR=17THENPROCg("FX229,1"):GOTO410ELSEMO DE7:REPORT:PRINT" at line ";ERL:PROCh:EN D 360:DIMM% -1:IFHIMEM-M%<256THENPROCi(" There are less than 256 bytes of RAM fre e. The program will run but you will kee p receiving warnings about the shortage of RAM.") 390:IFFNj("!Mesg")THENPROCkELSEPROCl 410REPEAT:PROCm:n%=FNo:IFn%=1THENPROCp 450IFn%=2THENPROCq 460IFn%=3THENPROCr 470IFn%=4THENPROCs 480IFn%=5THENPROCt 490IFn%=6THENPROCu 500UNTILn%=7::MODE7:PROCh:END 550 570DEFPROCv 580*FX4,1 590*FX225,200 600*FX226,210 610*FX227,220 620*FX202,48 630ENDPROC 640 660DEFPROCh 670*FX118 680*FX225,1 690*FX226,128 700*FX227,144 710*FX229 720*FX4 730ENDPROC 740 760DEFPROCa:ONERRORMODE7:REPORT:PRINT" at line ";ERL:PROCh:END 770CLOSE#0:PROCv:PROCw:PROCx:PROCy:PRO Cz:I%=4096:y%=25:v%=TRUE:aa%=TRUE:DIMp% 32,e% I%,a$(y%),a%(y%),b$(y%):o%=1:PROCK :ENDPROC 910 950DEFPROCe 960*MOUNT 0 970*DIR $ 980ENDPROC 990 1010DEFPROCf 1020*DRIVE 0 1030*DIR $ 1040ENDPROC 1050 1052DEFPROCj 1053*DIR :0.$ 1054ENDPROC 1055 1070DEFPROCw:VDU23,1,0;0;0;0; 1080ENDPROC 1090 1110DEFPROCo:VDU23,1,1;0;0;0; 1120ENDPROC 1130 1150DEFPROCg($p%):LOCALX%,Y%:X%=p%MOD25 6:Y%=p%DIV256:CALL65527:ENDPROC 1200 1220DEFPROCx:r%=150:£%=147:i%=135:s%=13 1:ba%=131:ca%=132:da%=135:ea%=130:fa%=13 1:U%=135:ga%=131:ha%=135:ia%=135:ja%=135 :ka%=135:la%=135:ma%=135:na%=135:oa%=135 :ENDPROC 1420 1440DEFPROCy:LOCALpa%:VDU26,12 1460PRINTTAB(0,23);CHR$(r%);"||||||||| ||||||||||||||||||||||||||||";:VDU30,11 ,30 1480PRINT" ";CHR$(r%);"///// //%/////////////////";:PRINTCHR$(r%);" ///////////*//////// ";C HR$(r%);"";:PRINTCHR$(r%);"";CHR$(£%); "6£4 7i(h0 6) 0`$t` ` 0 0` ";CH R$(r%);""; 1510PRINTCHR$(r%);"";CHR$(£%);"6£4!7ij j 2ijjj!5jhj`nj =! ";CHR$(r%);" ";:PRINTCHR$(r%);" ";CHR$(£%);""£ £!" ! "! !" " !! £" "! ":FORpa%=1TO1 9:PRINTCHR$(r%);"";SPC(36);CHR$(r%);"" ;:NEXT 1580PRINTTAB(6,5);CHR$(£%-16);"8BS mess aging system 2.00C":VDU28,2,23,37,7:ENDP ROC 1590 1610DEFPROCz:IF?31784=r%THENENDPROC 1620PROCi("Sorry, this program uses dir ect screen access and the screen RAM is not at &7C00. If you have them, try disa bling your shadow RAM and/or second proc essor."):VDU26,12 1640PROCo:PROCh:END 1670 1690DEFPROCK:j%=TOP:qa%=j%+31:ra%=j%+16 4:sa%=j%+183:ta%=j%+201:ua%=j%+235:va%=j %+294:wa%=j%+344:xa%=j%+394:ya%=j%+426:E NDPROC 1820 1840DEFPROCb(T$):PROCA(T$,i%,TRUE):ENDP ROC 1860 1880DEFPROCB(T$):PROCA(T$,i%,FALSE):END PROC 1900 1930DEFPROCA(T$,C%,N%):REPEAT:IFLEN(T$) <36THENPRINTCHR$(C%);T$;SPC((35-LEN(T$)) *-N%);:T$=""ELSEA%=INSTR(T$," ",37):A%=A %+(A%=0)*-36:REPEAT:A%=A%-1:UNTILMID$(T$ ,A%,1)=" ":PRINTCHR$(C%);LEFT$(T$,A%-1); SPC(36-A%);:T$=MID$(T$,A%+1) 1950UNTILT$="":ENDPROC 1970 1990DEFPROCi(m$):CLS:PROCb(m$):PRINT'CH R$(i%);"Press SPACE to continue..." 2030REPEATUNTILGET=32:ENDPROC 2050 2070DEFPROCL(m$):CLS:PROCb(m$):PRINT'CH R$(i%);"Press SPACE to return to BASIC" 2110REPEATUNTILGET=32:VDU26,12 2130PROCo:PROCh:END 2160 2180DEFFNc:LOCALb%,n$:CLS:PROCb("Please insert your submission disc in drive 0. This disc should remain in the drive at all times when you are using this progr am."):PRINT 2220PROCb("When you have done this, pre ss"+STRING$(7," ")+"A if it an ADFS disc ,"+STRING$(15," ")+"D if it is a DFS dis c,"+STRING$(14," ")+"H if it is an HADFS disk or"+STRING$(8," ")+"SPACE to use t he current filing system."):PRINT:PROCb( "If in doubt, just press SPACE."):REPEAT 2270b%=GET:n$=CHR$((b%AND223)-32*(b%=32 )):UNTILINSTR(" ADH",n$)<>0:=n$ 2330DEFFNb:LOCALA%,Y%:=(USR(65498)AND25 5) 2390DEFPROCd:SOUND1,-10,52,5:ENDPROC 2410 2430DEFFNj(y$):LOCALa%:a%=OPENIN(y$):IF a%<>0THENCLOSE#a% 2460=(a%<>0) 2490DEFPROCk:LOCALa%,za%,g%:CLS:PRINTCH R$(i%);"Please wait...":a%=OPENIN("!Mesg "):za%=BGET#a%:IFza%<>0THENPROCL("The !M esg file on this disc is a version "+STR $(za%)+" file. This program can only han dle version 0 files.") 2550INPUT#a%,e$:INPUT#a%,d$:d$=FNl(d$): J%=PTR#a%:INPUT#a%,g%:Aa%=PTR#a%:CLOSE#a %:ENDPROC 2630 2650DEFFNl(i$):REPEAT:IFRIGHT$(i$,1)=" "THENi$=LEFT$(i$,LEN(i$)-1) 2670UNTILRIGHT$(i$,1)<>" ":=i$ 2710DEFPROCl:LOCALa%:e$="":d$="":PROCC: a%=OPENOUT("!Mesg"):BPUT#a%,0:PRINT#a%,e $:PRINT#a%,LEFT$(d$+STRING$(20," "),20): J%=PTR#a%:PRINT#a%,0:Aa%=PTR#a%:CLOSE#a% :ENDPROC 2830 2850DEFPROCC:CLS:PROCb("Please enter yo ur three-character ID. If you don't know it, it is shown in the top left hand co rner of the menu."):PRINT'CHR$(i%);"ID:" ;CHR$(s%);:e$=FNi(FNe(3,3,e$)):PRINT' 2900PROCb("Please enter your name as yo u wish it to appear in message headings. Just enter a blank name if you wish to remain anonymous."):PRINT'CHR$(s%);:d$=F Ne(0,20,d$):ENDPROC 2940 2960DEFFNe(Ba%,Ca%,c$):LOCALDa%,Ea%,b%: Da%=POS:Ea%=VPOS:PRINTLEFT$(c$+STRING$(C a%,"."),Ca%);TAB(Da%+LEN(c$),Ea%);:REPEA T:REPEAT 3030b%=GET:UNTILb%=13OR(b%>=32ANDb%<=12 7):IFb%=127ANDLEN(c$)>0THENVDU8,46,8:c$= LEFT$(c$,LEN(c$)-1) 3060IFb%<>127ANDb%<>13ANDLEN(c$)<Ca%THE NVDUb%:c$=c$+CHR$(b%) 3070UNTIL(b%=13ANDLEN(c$)>=Ba%):=c$ 3110DEFFNi(o$):LOCALl$,Fa%,w%:l$="":IFo $=""THEN="" 3140FORFa%=1TOLEN(o$):w%=ASC(MID$(o$,Fa %,1)):IFw%>=ASC"a"ANDw%<=ASC"z"THENw%=w% -32 3170l$=l$+CHR$(w%):NEXT:=l$ 3220DEFFNo:LOCALx%,j$,b%:CLS:PRINTFNa(" Start a new message","N");FNa("View/edit /print messages","V");FNa("Print all the messages","P");FNa("Tidy the messages", "T");FNa("Re-enter your user ID/name","R ");FNa("Undelete deleted messages","U"); 3250PRINTFNa("Quit the program","Q"):PR OCb("Use the up and down cursor keys to move the bar, or press the key shown aft er the option you want. Press RETURN to select the highlighted option."):PRINT 3280PROCB("If you select an option by m istake, pressing ESCAPE will usually ret urn you to this menu."):x%=o%:j$="NVPTRU Q":PRINTTAB(1,o%-1);CHR$(ca%);CHR$157;CH R$(da%):REPEAT:REPEAT 3350b%=GETAND223:UNTILINSTR(CHR$138+CHR $139+CHR$13+j$,CHR$(b%))<>0:o%=INSTR(j$, CHR$(b%)):IFo%=0THENo%=x% 3380IFb%=138ANDo%<LEN(j$)THENo%=o%+1 3390IFb%=139ANDo%>1THENo%=o%-1 3400IFo%<>x%THENPRINTTAB(1,x%-1);" ";C HR$(ba%);TAB(1,o%-1);CHR$(ca%);CHR$157;C HR$(da%):x%=o% 3410UNTILb%=13:=o% 3450DEFFNa(r$,j$)=" "+CHR$(ba%)+r$+ST RING$(28-LEN(r$)," ")+j$+" "+CHR$156 3470DEFPROCp:LOCALg$,V%:CLS:IFFNf>=y%TH ENPROCi("Sorry, there is a limit of "+ST R$(y%)+" messages."):ENDPROC 3500PROCb("Please enter the 3-character ID of the person who will receive the m essage. Messages to individual members a re private and will not be published. En ter 999 to send a message to everyone or CCC to send in a comment for publicatio n.") 3510PRINT'CHR$(i%);"ID:";CHR$(s%); 3530g$=FNi(FNe(3,3,"")) 3550PROCM:V%=(g$<>"CCC"):IFg$="999"THEN s$="(all members)"ELSEs$="" 3580IFV%THENPROCn(CHR$(ea%)+"To: "+ CHR$(fa%)+g$+" "+s$,e%) 3590IFd$=""THENt$=""ELSEt$="("+d$+")" 3600PROCn(CHR$(ea%)+"From: "+CHR$(fa% )+e$+" "+t$,e%-40*V%):PROCn(CHR$(ea%)+"S ubject:"+CHR$(fa%),e%+40-40*V%):g$=FNm(1 0,1-V%,g$):PROCD(g$):ENDPROC 3650 3670DEFPROCD(a$):LOCALa%,g%:PRINTTAB(0, 0);CHR$(oa%);"Please wait, saving messag e...";:a%=OPENUP("!Mesg"):PTR#a%=EXT#a%: PRINT#a%,a$:BPUT#a%,0:PROCE(FNk+1,a%):PT R#a%=J%:INPUT#a%,g%:PTR#a%=J%:PRINT#a%,g %+1:CLOSE#a%:v%=TRUE:ENDPROC 3830 3850DEFFNk:!112=e%+I%+1:!114=e%:CALLta% :!114=0:=(!112)-e% 3920DEFPROCE(h%,a%):LOCALA%,X%,Y%:p%?0= a%:p%!1=e%:p%!5=h%:A%=2:X%=p%MOD256:Y%=p %DIV256:CALL65489:BPUT#a%,152:ENDPROC 4020 4040DEFFNf:LOCALa%:IFNOTv%ANDNOTaa%THEN =Ga% 4060a%=OPENIN("!Mesg"):PTR#a%=J%:INPUT# a%,Ga%:CLOSE#a%:aa%=FALSE:=Ga% 4140DEFPROCn(p$,Ha%):LOCALl%:l%=Ha%?LEN (p$):$Ha%=p$:Ha%?LEN(p$)=l%:ENDPROC 4190 4210DEFPROCM:!112=e%:!114=e%+I%+1:CALLx a%:ENDPROC 4250 4270DEFFNm(f%,c%,a$):LOCALd%,F%,z%,t%,b %:VDU22,7 4290d%=0:F%=0:z%=(I%DIV40)-25:t%=FALSE: PROCc(a$,t%):PROCF(d%) 4340REPEAT:VDU31,f%,c% 4360REPEAT:b%=GET:UNTIL(b%>=32ANDb%<=12 7)OR(b%>=136ANDb%<=139)OR(b%>=200ANDb%<= 229)ORb%=13ORb%=27ORb%=20:IFb%=ASC"£"THE Nb%=35ELSEIFb%=ASC"#"THENb%=95ELSEIFb%=A SC"`"THENb%=96 4410IFb%>=32ANDb%<=126ANDNOTt%THEN?(f%+ c%*40+31744)=b%:e%?(f%+(c%+d%)*40)=b%:f% =f%+1:IFf%=40ANDNOT(d%=z%ANDc%=23)ANDb%< >32THENf%=FNp(c%,d%):c%=c%+1:F%=-1 4430IFb%=32ANDf%=40THENf%=39:b%=13 4440IFb%>=200ANDb%<=229THENIa%=FNq(b%,f %,c%):f%=f%-Ia%:IFf%=40ANDNOT(d%=z%ANDc% =23)THENf%=0:c%=c%+1:F%=-1 4450IFb%=127ANDf%>0THEN!112=e%+(c%+d%)* 40:?114=f%:CALLra%:!112=31744+c%*40:?114 =f%:CALLra%:f%=f%-1 4460IFb%=13THENIFNOT(d%=z%ANDc%=23)THEN e%?((c%+1+d%)*40)=e%?((c%+d%)*40):f%=1:c %=c%+1:F%=-1 4470IFb%=209THENt%=NOTt%:PROCc(a$,t%) 4480IFb%=219THENa$=FNr(a$):PROCc(a$,t%) 4490IFINSTR("QWASZXqwaszx",CHR$(b%))<>0 ANDt%THENPROCN(f%,c%,d%,b%) 4500IFb%=226THENPROCO(f%,c%,d%) 4510IFb%=227THENPROCP(c%,d%):F%=-1 4520IFb%=228THENPROCQ(c%,d%):F%=-1 4530IFb%=20THENPROCR(f%,c%,d%,z%):F%=-1 4540IFb%=136THENf%=f%-1 4550IFb%=137THENf%=f%+1 4560IFb%=138THENc%=c%+1 4570IFb%=139THENc%=c%-1 4580IFf%<0THENf%=39:c%=c%-1 4590IFf%>39THENf%=0:c%=c%+1 4600IFc%<0THENc%=0:d%=d%+(d%>0) 4610IFc%>23THENc%=23:d%=d%-(d%<z%) 4620IFF%<>d%THENPROCF(d%):F%=d%:PROCc(a $,t%) 4630UNTILb%=27ANDNOTt%:PROCw:PROCy:=a$ 4690DEFPROCO(f%,c%,d%):IFf%=39THENe%?(3 9+(c%+d%)*40)=32:?(31744+39+c%*40)=32:EN DPROC 4700!112=e%+(c%+d%)*40:?114=f%:CALLsa%: !112=31744+c%*40:?114=f%:CALLsa%:ENDPROC 4770 4790DEFPROCP(c%,d%):LOCALu%,O%:u%=FNk:I Fu%>=I%-80THENPROCd:ENDPROC 4820IF(c%+d%)*40>u%THENENDPROC 4830!112=e%+(c%+d%-1)*40:!114=e%+(u%DIV 40)*40:CALLva%:FORO%=(c%+d%)*40TO39+(c%+ d%)*40:e%?O%=32:NEXT:ENDPROC 4900 4920DEFPROCQ(c%,d%):LOCALu%,O%:u%=FNk:I F(c%+d%)*40>u%THENENDPROC 4950IFu%>=(c%+d%)*40ANDu%<=39+(c%+d%)*4 0THENFORO%=(c%+d%)*40TO39+(c%+d%)*40:e%? O%=32:NEXT:ENDPROC 4960!112=e%+(c%+d%)*40:!114=e%+(u%DIV40 )*40:CALLwa%:FORO%=(u%DIV40)*40TO(u%DIV4 0)*40+40:e%?O%=32:NEXT:ENDPROC 5030 5050DEFPROCc(a$,t%):PRINTTAB(0,24);SPC( 39);TAB(0,24);CHR$(ma%);"Message to ";a$ ;TAB(29,24);:IFt%THENPRINT"Pixel edit";E LSEPRINTSPC(10); 5070ENDPROC 5080 5100DEFFNp(c%,d%):LOCALG%,S%:G%=40:REPE AT:G%=G%-1:UNTILe%?(G%+(c%+d%)*40)=32ORG %=0:IFe%?(G%+(c%+d%)*40)<>32THENe%?((c%+ 1+d%)*40)=e%?((c%+d%)*40):=1 5160FORS%=G%+1TO39:e%?(S%-G%+(c%+1+d%)* 40)=e%?(S%+(c%+d%)*40):e%?(S%+(c%+d%)*40 )=32:NEXT:e%?((c%+1+d%)*40)=e%?((c%+d%)* 40):=40-G% 5240DEFPROCF(d%):!112=e%+d%*40:CALLya%: ENDPROC 5270 5290DEFFNq(b%,f%,c%):LOCALB%:B%=-1:IFb% >=200ANDb%<=208THENB%=b%-71 5320IFb%>=210ANDb%<=216THENB%=b%-65 5330IFb%>=217ANDb%<=218THENB%=b%-61 5340IFb%>=220ANDb%<=221THENB%=b%-67 5350IFb%>=222ANDb%<=223THENB%=b%-64 5360IFb%>=224ANDb%<=225THENB%=365-b% 5370IFB%<>-1THEN?(f%+c%*40+31744)=B%:e% ?(f%+(c%+d%)*40)=B%:=TRUE 5380=FALSE 5410DEFFNr(a$):PRINTTAB(0,24);SPC(39);T AB(0,24);CHR$(na%);"Send this message to :";CHR$(s%);:=FNi(FNe(3,3,a$)) 5450DEFPROCN(f%,c%,d%,b%):LOCALW%,K%,Ja %:W%=2^((INSTR("QWASZ X",CHR$(b%AND223)) )-1):K%=e%+f%+(c%+d%)*40:IF(?K%AND160)<> 160THEN?K%=?K%OR160 5490IF(?K%ANDW%)=W%THENJa%=?K%AND(255-W %)ELSEJa%=?K%ORW% 5500?K%=Ja%:?(31744+f%+c%*40)=Ja%:ENDPR OC 5530 5550DEFPROCR(f%,c%,d%,z%):LOCALh%,c$:PR OCw:PROCy:PRINTCHR$(i%);"Are you sure yo u want to read in"'CHR$(i%);"a text file ?";CHR$(s%);:IFNOTFNdTHENVDU22,7:ENDPROC 5600PRINT':PROCb("Please insert the dis c containing the text file into drive 0 and press SPACE...") 5630REPEATUNTILGET=32:h%=10:IFFNb=4THEN PROCf:h%=7 5660IFFNb=8THENPROCe 5670IFFNb=16THENPROCj 5675PRINT:PRINTCHR$(i%);"Filename:";CHR $(s%);:c$=FNe(0,h%,""):IFc$<>""THENPROCS (f%,c%,d%,z%,c$) 5710PROCb("Please insert your submissio n disc in drive 0 and press SPACE...") 5730REPEATUNTILGET=32:IFFNb=4THENPROCf 5750IFFNb=8THENPROCe 5760IFFNb=16THENPROCj 5765VDU22,7 5770ENDPROC 5780 5800DEFPROCS(f%,c%,d%,z%,c$):LOCALa%,f$ ,l%,P%:a%=OPENIN(c$):IFa%=0THENPRINT':PR OCb("The file "+c$+" is not present on t his disc."):PRINT:ENDPROC 5830IFEOF#a%THENCLOSE#a%:ENDPROC 5840PRINT''CHR$(i%);"Please wait..."':R EPEAT:f$="":REPEAT:l%=BGET#a%:IFl%=ASC"£ "THENl%=35ELSEIFl%=ASC"#"THENl%=95ELSEIF l%=ASC"`"THENl%=96 5910IFl%>=33ANDl%<=126THENf$=f$+CHR$(l% ) 5920UNTILl%<33ORl%>126OREOF#a%:P%=-1:IF f%+LEN(f$)<=39THENP%=f%:Ka%=c%:La%=d%:f% =f%+LEN(f$)+1 5950IFP%=-1THENf%=1:c%=c%+1:j%=?(e%+(c% -1+d%)*40):IFj%>=129ANDj%<=135THEN?(e%+( c%+d%)*40)=j% 5960IFc%>23THENc%=23:d%=d%-(d%<z%) 5970IFP%=-1THENP%=f%:Ka%=c%:La%=d%:f%=f %+LEN(f$)+1 5980$(e%+P%+(Ka%+La%)*40)=f$:?(e%+P%+(K a%+La%)*40+LEN(f$))=32:IFl%=13ORl%=10THE Nf%=1:c%=c%+1:j%=?(e%+(c%-1+d%)*40):IFj% >=129ANDj%<=135THEN?(e%+(c%+d%)*40)=j% 6000UNTILEOF#a%:CLOSE#a%:ENDPROC 6030 6050DEFPROCG:LOCALa%,g%,Ma%,Q%,k%,h$,Na %,a$:a%=OPENIN("!Mesg"):PTR#a%=J%:INPUT# a%,g%:PTR#a%=Aa%:FORMa%=1TOg%:REPEAT:Q%= PTR#a%:INPUT#a%,a$:k%=BGET#a%:k%=(k%<>0) :Na%=FNg(a%):h$=FNn(22):UNTILNOTk%:a$(Ma %)=a$:a%(Ma%)=Q%:b$(Ma%)=h$:NEXT:CLOSE#a %:ENDPROC 6240 6260DEFFNn(Oa%):LOCALk$:e%?128=13:k$="S ubject:":IFINSTR($e%,k$)=0THENk$="Articl e:" 6300IFINSTR($e%,k$)=0THEN="No subject?" 6310=MID$($e%,INSTR($e%,k$)+9,Oa%) 6340DEFPROCq:LOCALg%,H%,x%,m%,Z%,L%,Pa% ,`%,b%,T%:CLS:g%=FNf:IFg%=0THENPROCi("Th ere are no messages on this disc."):ENDP ROC 6380REPEAT:CLS:IFv%THENPROCb("Please wa it, scanning messages..."):PROCG:v%=FALS E 6410H%=1:x%=1:m%=1:Z%=-1:REPEAT:REPEAT: IFm%=Z%THENx%=1:m%=1 6480CLS:PRINTTAB(0,16);CHR$(U%);"Use:"; CHR$(ga%);"V";CHR$(U%);"iew,";CHR$(ga%); "E";CHR$(U%);"dit,";CHR$(ga%);"P";CHR$(U %);"rint,";CHR$(ga%);"D";CHR$(U%);"elete ";:VDU30 6510L%=H%+13:IFL%>g%THENL%=g% 6520FORPa%=H%TOL%:PRINTFNa(a$(Pa%)+": " +LEFT$(b$(Pa%),22)," ");:NEXT:`%=L%-H%+1 :Z%=`%+1:IFg%>14THENPRINTFNa("More messa ges..."," ");:`%=`%+1 6570PRINTTAB(1,m%-1);CHR$(ca%);CHR$157; CHR$(da%):REPEAT:REPEAT 6610b%=GETAND223:UNTILINSTR(CHR$138+CHR $139+CHR$13+CHR$27+"PVED",CHR$(b%))<>0:I Fb%=138ANDm%<`%THENm%=m%+1 6640IFb%=139ANDm%>1THENm%=m%-1 6650IFm%<>x%THENPRINTTAB(1,x%-1);" ";C HR$(ba%);TAB(1,m%-1);CHR$(ca%);CHR$157;C HR$(da%):x%=m% 6660UNTILINSTR(CHR$13+CHR$27+"PVED",CHR $(b%))<>0:IFm%=Z%THENH%=H%+14:IFH%>g%THE NH%=1 6680UNTILm%<Z%ORb%=27:T%=m%+H%-1:IFb%=1 3ORb%=ASC("V")THENPRINTTAB(0,16);SPC(35) ;TAB(0,16);CHR$(ia%);"Loading message, p lease wait...";:h%=FNh(T%) 6710IFb%=13ORb%=ASC("V")THENVDU22,7,23; 8202;0;0;0;:PRINTTAB(0,24);FNs(T%,g%,a$) ;:?116=e%MOD256:?117=e%DIV256:L%=e%+FNt( h%):?118=L%MOD256:?119=L%DIV256:CALLqa%: PROCy 6720IFb%=ASC("P")THENPROCT(T%) 6730IFb%=ASC("D")THENv%=FNu(T%) 6740IFb%=ASC("E")THENv%=FNv(T%) 6750g%=FNf:UNTILv%ORb%=27ORg%=0:UNTILb% =27ORg%=0:ENDPROC 6790 6810DEFFNh(q%):LOCALa%,k%,h%:a%=OPENIN( "!Mesg"):PTR#a%=a%(q%):INPUT#a%,a$:k%=BG ET#a%:h%=FNg(a%):CLOSE#a%:=h% 6910DEFFNg(a%):LOCALA%,X%,Y%:p%?0=a%:p% !1=e%:p%!5=I%+1:A%=4:X%=p%MOD256:Y%=p%DI V256:CALL65489:!112=e%-1:!114=e%+I%+1:CA LLua%:!118=0:PTR#a%=PTR#a%-(I%-p%!5)+(!1 16-e%):=(!116-e%) 7070DEFFNs(q%,Qa%,a$)=CHR$(ha%)+"This i s message "+STR$(q%)+" of "+STR$(Qa%)+", to "+a$ 7090DEFFNt(h%):IFh%<960THENh%=960 7100IF(h%MOD40)<>0THENh%=h%+(40-(h%MOD4 0)) 7110=h%-960 7160DEFFNu(q%):PRINTTAB(0,16);SPC(35);T AB(0,16);CHR$(ja%);"Delete this - are yo u sure?";CHR$(s%);:IFNOTFNdTHEN=FALSE 7180PROCH(q%,FALSE):=TRUE 7220DEFPROCH(q%,Ra%):LOCALa%,a$:a%=OPEN UP("!Mesg"):PTR#a%=a%(q%):INPUT#a%,a$:IF Ra%THENBPUT#a%,128ELSEBPUT#a%,255 7270PTR#a%=J%:INPUT#a%,g%:PTR#a%=J%:PRI NT#a%,g%-1:CLOSE#a%:ENDPROC 7330 7370DEFFNv(q%):LOCALh%,a$:PRINTTAB(0,16 );SPC(35);TAB(0,16);CHR$(la%);"Edit this - are you sure?";CHR$(s%);:IFNOTFNdTHEN =FALSE 7400PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(ia%);"Loading message, please wait... ";:h%=FNh(q%):a$=FNm(1,4,a$(q%)):PROCD(a $):PROCH(q%,TRUE):=TRUE 7500DEFFNd:LOCALb%:REPEAT 7530b%=GETAND223:UNTILb%=ASC("Y")ORb%=A SC("N"):IFb%=ASC("Y")THENPRINT"Yes";:=TR UE 7560PRINT"No";:=FALSE 7600DEFPROCT(q%):LOCALh%:PRINTTAB(0,16) ;SPC(35);TAB(0,16);CHR$(ka%);"Print this - are you sure?";CHR$(s%); 7630IFNOTFNdTHENPROCg("FX229,1"):ENDPRO C 7640PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(ia%);"Loading message, please wait... ";:h%=FNh(q%):PRINTTAB(0,16);SPC(35);TAB (0,16);CHR$(ka%);"Printing, please wait. ..";:PROCI(h%) 7690ENDPROC 7700 7720DEFPROCr:LOCALg%,R%:CLS:g%=FNf:IFg% =0THENPROCi("There are no messages on th is disc."):ENDPROC 7760PRINTCHR$(i%);"Are you sure you wan t to print the"'CHR$(i%);"messages?";CHR $(s%); 7780IFNOTFNdTHENPROCg("FX229,1"):ENDPRO C 7790PRINT':IFv%THENPRINTCHR$(i%);"Pleas e wait, scanning messages..."':PROCG:v%= FALSE 7810PROCb("Please wait, printing - pres s ESCAPE to stop..."):FORR%=1TOg%:PROCI( FNh(R%)):NEXT 7860ENDPROC 7870 7890DEFPROCI(h%):LOCALR%,w% 7910FORR%=0TOh%-1:w%=e%?R%:IFw%>=32ANDw %<=126THENVDUw%ELSEVDU32 7940IF(R%MOD40)=39ORR%=h%-1THENPRINT 7950NEXT:PRINT 7980ENDPROC 7990 8010DEFPROCt:LOCALu$,v$,a%:u$=e$:v$=d$: PROCC:IFe$=u$ANDd$=v$THENENDPROC 8050a%=OPENUP("!Mesg"):PTR#a%=1:PRINT#a %,e$:PRINT#a%,LEFT$(d$+STRING$(20," "),2 0):CLOSE#a%:ENDPROC 8110 8130DEFPROCs:LOCALg%,D%,E%,w$,x$,S%,a$, k%,h%:CLS:PRINTCHR$(i%);"Are you sure yo u want to tidy the"'CHR$(i%);"messages?" ;CHR$(s%); 8170IFNOTFNdTHENPROCg("FX229,1"):ENDPRO C 8180*FX229,1 8190PRINT''CHR$(i%);"Please wait...";:v %=TRUE:IFFNj("!MesgB")THENPROCg("Delete !MesgB") 8220*Rename !Mesg !MesgB 8230D%=OPENIN("!MesgB"):E%=OPENOUT("!Me sg"):BPUT#E%,BGET#D%:INPUT#D%,w$:PRINT#E %,w$:INPUT#D%,x$:PRINT#E%,x$:INPUT#D%,g% :PRINT#E%,g%:IFg%=0THENCLOSE#D%:CLOSE#E% :PROCg("Delete !MesgB"):ENDPROC 8300FORS%=1TOg%:REPEAT:INPUT#D%,a$:k%=B GET#D%:k%=(k%<>0):h%=FNg(D%):IFNOTk%THEN PRINT#E%,a$:BPUT#E%,0:PROCE(h%+1,E%) 8360UNTILNOTk%:NEXT:CLOSE#D%:CLOSE#E% 8410ENDPROC 8420 8440DEFPROCu:LOCALg%,q$,a%,Q%,k%,Na%,h$ ,Sa%:CLS:g%=FNf:IFg%=y%THENPROCi("Sorry, there is a limit of "+STR$(y%)+" messag es."):ENDPROC 8480*FX229 8490PRINTCHR$(i%);"Please wait..."':q$= "":a%=OPENUP("!Mesg"):PTR#a%=Aa%:IFEOF#a %THENPROCi("There are no messages on thi s disc."):CLOSE#a%:ENDPROC 8540REPEAT:REPEAT:INPUT#a%,a$:Q%=PTR#a% :k%=BGET#a%:k%=(k%=255):Na%=FNg(a%):h$=F Nl(FNn(30)):Sa%=(PTR#a%=EXT#a%):UNTILk%O RSa%:IFk%THENq$="more ":g%=FNw(a%,Q%,a$, h$,g%) 8670UNTILSa%ORg%=y%:CLOSE#a% 8700IFg%=y%THENPROCb("There are now the maximum "+STR$(y%)+" messages. Press SP ACE to continue...")ELSEPROCb("There are no "+q$+"deleted messages. Press SPACE to continue...") 8710*FX21 8720REPEATUNTILGET=32:ENDPROC 8740 8760DEFFNw(a%,Q%,a$,h$,g%):LOCALTa%:PRO CB("Undelete the message to "+a$+" with subject '"+h$+"'?"):IFPOS>31THENPRINT 8790VDUs% 8800IFNOTFNdTHENPRINT':=g% 8810PRINT' 8830Ta%=PTR#a%:PTR#a%=Q%:BPUT#a%,0:PTR# a%=J%:PRINT#a%,g%+1:PTR#a%=Ta% 8900v%=TRUE:=g%+1 8940DEFPROCm:DIMM% -1:IFHIMEM-M%>=256TH ENENDPROC 8960IFHIMEM-M%>=128THENPROCi("There are less than 256 bytes of RAM free. I reco mmend quitting the program and restartin g, as a crash may occur if RAM is exhaus ted."):ENDPROC 8970PROCi("There are less than 128 byte s of RAM free. You should quit the progr am and restart it very soon, otherwise a crash may occur due to lack of RAM."):E NDPROC