8-Bit Software Online Conversion

8BS Messaging System - Listing

280MODE7 290PROCa 330b$=FNc 340ONERRORPROCd:b$=" ":GOTO350 350IFb$=" "ANDFNb=4THENb$="D" 360IFb$=" "ANDFNb=8THENb$="A" 370IFb$="A"THENPROCe 380IFb$="D"THENPROCf 390ONERRORVDU3:PROCg("FX3"):CLOSE#0:IF ERR=17THENPROCg("FX229,1"):GOTO460ELSEMO DE7:REPORT:PRINT" at line ";ERL:PROCh:EN D 410DIMM%-1 420IFHIMEM-M%<256THENPROCi("There are less than 256 bytes of RAM free. The pro gram will run but you will keep receivin g warnings about the shortage of RAM.") 440IFFNj("!Mesg")THENPROCkELSEPROCl 450PROCm 460REPEAT 470PROCn 480o%=FNp 490IFo%=1THENPROCq 500IFo%=2THENPROCr 510IFo%=3THENPROCs 520IFo%=4THENPROCt 530IFo%=5THENPROCu 540UNTILo%=6 560MODE7 570PROCh 580END 600DEFPROCv 610*FX229,1 620*FX4,1 630*FX225,200 640*FX226,210 650*FX227,220 660*FX202,48 670ENDPROC 690DEFPROCh 700*FX202,32 710*FX118 720*FX225,1 730*FX226,128 740*FX227,144 750*FX229 760*FX4 770ENDPROC 790DEFPROCa 800ONERRORMODE7:REPORT:PRINT" at line ";ERL:PROCh:END 810CLOSE#0 820PROCv 830PROCw 840PROCx 850PROCy 860PROCz 870aa%=4080 880ba%=25 900DIMca%32,da%aa%,ea$(ba%-1),fa$(ba%- 1),ga%(ba%-1) 910ha%=1 920PROCia 930ENDPROC 950DEFFNS="SendMes" 970DEFPROCe 980*ADFS 990*MOUNT 0 1000*DIR $ 1010ENDPROC 1030DEFPROCf 1040*DISC 1050*DRIVE 0 1060*DIR $ 1070ENDPROC 1090DEFPROCw 1100VDU23,1,0;0;0;0; 1110ENDPROC 1130DEFPROCja 1140VDU23,1,1;0;0;0; 1150ENDPROC 1170DEFPROCg($ca%) 1180LOCALX%,Y% 1190X%=ca%MOD256 1200Y%=ca%DIV256 1210CALL&FFF7 1220ENDPROC 1240DEFPROCx 1250ka%=150 1260la%=147 1270ma%=135 1280na%=131 1290oa%=131 1300pa%=132 1310qa%=135 1320ra%=130 1330sa%=131 1340ta%=135 1350ua%=131 1360va%=135 1370wa%=135 1380xa%=135 1390ya%=135 1400za%=135 1410ab%=135 1420bb%=135 1430cb%=135 1440ENDPROC 1460DEFPROCy 1470LOCALdb% 1480VDU26,12 1490PRINTTAB(0,23);CHR$(ka%);"|||||||| |||||||||||||||||||||||||||||"; 1500VDU30,11,30 1510PRINT" ";CHR$(ka%);"//// ///%/////////////////"; 1520PRINTCHR$(ka%);"///////////*////// // ";CHR$(ka%);""; 1530PRINTCHR$(ka%);"";CHR$(la%);"6£4 7 i(h0 6) 0`$t` ` 0 0` ";CHR$(ka% );""; 1540PRINTCHR$(ka%);"";CHR$(la%);"6£4!7 ijj 2ijjj!5jhj`nj =! ";CHR$(ka% );""; 1550PRINTCHR$(ka%);" ";CHR$(la%);""£ £ !" ! "! !" " !! £" "! " 1560FORdb%=1TO19 1570PRINTCHR$(ka%);"";SPC(36);CHR$(ka% );""; 1580NEXT 1590PRINTTAB(7,5);CHR$(la%-16);"8BS mes saging system 2.10" 1600VDU28,2,23,37,7 1610ENDPROC 1630DEFPROCz 1640IF?&7C28=ka%THENENDPROC 1650PROCi("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.") 1660VDU26,12 1670PROCja 1680PROCh 1690END 1710DEFPROCia 1720PRINTCHR$(ma%);"Please wait, loadin g..." 1730DIMeb%452 1740OSCLI"Load SendMMC "+STR$~eb% 1750fb%=eb%+&1F 1760gb%=eb%+&A4 1770hb%=eb%+&B7 1780ib%=eb%+&C9 1790jb%=eb%+&EB 1800kb%=eb%+&126 1810lb%=eb%+&158 1820mb%=eb%+&18A 1830nb%=eb%+&1AA 1840ENDPROC 1860DEFPROCob(T$) 1870PROCpb(T$,ma%,TRUE) 1880ENDPROC 1900DEFPROCqb(T$) 1910PROCpb(T$,ma%,FALSE) 1920ENDPROC 1950DEFPROCpb(T$,C%,N%) 1960REPEAT 1970IFLEN(T$)<36THENPRINTCHR$(C%);T$;SP C((35-LEN(T$))*-N%);:T$=""ELSEA%=INSTR(T $," ",37):A%=A%+(A%=0)*-36:REPEAT:A%=A%- 1:UNTILMID$(T$,A%,1)=" ":PRINTCHR$(C%);L EFT$(T$,A%-1);SPC(36-A%);:T$=MID$(T$,A%+ 1) 1980UNTILT$="" 1990ENDPROC 2010DEFPROCi(rb$) 2020CLS 2030PROCob(rb$) 2040PRINT'CHR$(ma%);"Press SPACE to con tinue..." 2050*FX21 2060REPEATUNTILGET=32 2070ENDPROC 2090DEFPROCsb(rb$) 2100CLS 2110PROCob(rb$) 2120PRINT'CHR$(ma%);"Press SPACE to ret urn to BASIC" 2130*FX21 2140REPEATUNTILGET=32 2150VDU26,12 2160PROCja 2170PROCh 2180END 2200DEFFNc 2210LOCALtb%,tb$ 2220CLS 2230PROCob("Please insert your submissi on disc in drive 0. This disc should rem ain in the drive at all times when you a re using this program.") 2240PRINT 2250PROCob("When you have done this, pr ess A if it is an ADFS disc, D if it is a DFS disc or SPACE to use the current f iling system.") 2260PRINT 2270PROCob("If in doubt, just press SPA CE.") 2280REPEAT 2290*FX21 2300tb%=GET 2310tb$=CHR$((tb%AND&DF)-32*(tb%=32)) 2320UNTILINSTR(" AD",tb$)<>0 2330=tb$ 2350DEFFNb 2360LOCALA%,Y% 2370A%=0 2380Y%=0 2390=(USR(&FFDA)AND&FF) 2410DEFPROCd 2420SOUND1,-10,52,5 2430ENDPROC 2450DEFFNj(ub$) 2460LOCALvb% 2470vb%=OPENIN(ub$) 2480IFvb%<>0THENCLOSE#vb% 2490=(vb%<>0) 2510DEFPROCk 2520LOCALvb%,wb% 2530CLS 2540PRINTCHR$(ma%);"Please wait, scanni ng messages..." 2550vb%=OPENIN("!Mesg") 2560wb%=BGET#vb% 2570IFwb%<>1THENPROCsb("The !Mesg file on this disc is a version "+STR$(wb%)+" file. This program can only handle versi on 1 files.") 2580INPUT#vb%,xb$ 2590INPUT#vb%,yb$ 2600yb$=FNzb(yb$) 2610CLOSE#vb% 2620ENDPROC 2660DEFFNzb(ac$) 2670LOCALeb% 2680eb%=ASC(RIGHT$(ac$,1)) 2690REPEAT 2700IFeb%<33OReb%>126THENac$=LEFT$(ac$, LEN(ac$)-1) 2710eb%=ASC(RIGHT$(ac$,1)) 2720UNTIL(eb%>=33ANDeb%<=126)ORac$="" 2730=ac$ 2750DEFPROCl 2760LOCALvb%,bc% 2770xb$="":yb$="" 2780PROCcc 2790PRINT''CHR$(ma%);"Please wait..." 2800vb%=OPENOUT("!Mesg") 2810BPUT#vb%,1 2820PRINT#vb%,xb$ 2830PRINT#vb%,LEFT$(yb$+STRING$(20," ") ,20) 2840FORbc%=0TOba%-1 2850PTR#vb%=256+bc%*4096 2860PRINT#vb%,"XXX" 2870BPUT#vb%,1 2880NEXT 2890PTR#vb%=256+ba%*4096 2900CLOSE#vb% 2910ENDPROC 2930DEFPROCcc 2940CLS 2950PROCob("Please enter your three-cha racter ID. If you don't know it, it is s hown in the top left hand corner of the menu.") 2960PRINT'CHR$(ma%);"ID:";CHR$(na%); 2970xb$=FNdc(FNna(3,3,xb$)) 2980PRINT' 2990PROCob("Please enter your name as y ou wish it to appear in message headings . Just enter a blank name if you wish to remain anonymous.") 3000PRINT'CHR$(na%); 3010yb$=FNna(0,20,yb$) 3020ENDPROC 3040DEFFNna(ec%,fc%,ma$) 3050LOCALgc%,hc%,tb% 3060gc%=POS 3070hc%=VPOS 3080PRINTLEFT$(ma$+STRING$(fc%,"."),fc% );TAB(gc%+LEN(ma$),hc%); 3090REPEAT 3100REPEAT 3110*FX21 3120tb%=GET 3130UNTILtb%=13OR(tb%>=32ANDtb%<=127) 3140IFtb%=127ANDLEN(ma$)>0THENVDU8,46,8 :ma$=LEFT$(ma$,LEN(ma$)-1) 3150IFtb%<>127ANDtb%<>13ANDLEN(ma$)<fc% THENVDUtb%:ma$=ma$+CHR$(tb%) 3160UNTIL(tb%=13ANDLEN(ma$)>=ec%) 3170=ma$ 3190DEFFNdc(ic$) 3200LOCALjc$,kc%,lc% 3210jc$="" 3220IFic$=""THEN="" 3230FORkc%=1TOLEN(ic$) 3240lc%=ASC(MID$(ic$,kc%,1)) 3250IFlc%>=ASC"a"ANDlc%<=ASC"z"THENlc%= lc%-32 3260jc$=jc$+CHR$(lc%) 3270NEXT 3280=jc$ 3300DEFFNp 3310LOCALmc%,nc$,tb% 3320CLS 3330PRINTFNoc("Start a new message","N" );FNoc("View/edit/print messages","V");F Noc("Print all the messages","P");FNoc(" Re-enter your user ID/name","R");FNoc("U ndelete deleted messages","U"); 3340PRINTFNoc("Quit the program","Q") 3350PROCob("Use the up and down cursor keys to move the bar, or press the key s hown after the option you want. Press RE TURN to select the highlighted option.") 3360PRINT 3370PROCqb("If you select an option by mistake, pressing ESCAPE will usually re turn you to this menu.") 3380mc%=ha% 3390nc$="NVPRUQ" 3400PRINTTAB(1,ha%-1);CHR$(pa%);CHR$157 ;CHR$(qa%) 3410REPEAT 3420REPEAT 3430*FX21 3440tb%=GETAND&DF 3450IFINKEY-1ANDtb%=27THENmc%=LEN(nc$): tb%=13 3460UNTILINSTR(CHR$138+CHR$139+CHR$13+n c$,CHR$(tb%))<>0 3470ha%=INSTR(nc$,CHR$(tb%)):IFha%=0THE Nha%=mc% 3480IFtb%=138ANDha%<LEN(nc$)THENha%=ha% +1 3490IFtb%=139ANDha%>1THENha%=ha%-1 3500IFha%<>mc%THENPRINTTAB(1,mc%-1);" ";CHR$(oa%);TAB(1,ha%-1);CHR$(pa%);CHR$1 57;CHR$(qa%):mc%=ha% 3510UNTILtb%=13 3520=ha% 3540DEFFNoc(pc$,nc$)=" "+CHR$(oa%)+pc $+STRING$(28-LEN(pc$)," ")+nc$+" "+CHR$ 156 3560DEFPROCq 3570LOCALqc$,rc% 3580CLS 3590IFsc%>=ba%THENPROCi("Sorry, there i s a limit of "+STR$(ba%)+" messages."):E NDPROC 3600PROCob("Please enter the 3-characte r ID of the person who will receive the message. Messages to individual members are private and will not be published. E nter 999 to send a message to everyone o r CCC to send in a comment for publicati on.") 3610PRINT'CHR$(ma%);"ID:";CHR$(na%); 3620*FX229 3630qc$=FNdc(FNna(3,3,"")) 3640*FX229,1 3650PROCmb 3660rc%=(qc$<>"CCC") 3670IFqc$="999"THENtc$="(all members)"E LSEtc$="" 3680IFrc%THENPROCuc(CHR$(ra%)+"To: "+CHR$(sa%)+qc$+" "+tc$,da%) 3690IFyb$=""THENvc$=""ELSEvc$="("+yb$+" )" 3700PROCuc(CHR$(ra%)+"From: "+CHR$(sa %)+xb$+" "+vc$,da%-40*rc%) 3710PROCuc(CHR$(ra%)+"Subject:"+CHR$(sa %),da%+40-40*rc%) 3720qc$=FNwc(10,1-rc%,qc$) 3730PROCxc(qc$,FNyc) 3740sc%=sc%+1 3750ENDPROC 3780DEFPROCxc(zc$,ad%) 3790LOCALvb% 3800PRINTTAB(0,0);CHR$(cb%);"Please wai t, saving message..."; 3810vb%=OPENUP("!Mesg") 3820PTR#vb%=256+ad%*4096 3830PRINT#vb%,zc$ 3840BPUT#vb%,0 3850PROCbd(FNib+1,vb%) 3860CLOSE#vb% 3870ea$(ad%)=zc$ 3880fa$(ad%)=FNcd(30) 3890ga%(ad%)=0 3900ENDPROC 3930DEFFNyc 3940LOCALdd%,ed% 3950dd%=-1 3960FORed%=0TOba%-1 3970IFga%(ed%)=255THENdd%=ed% 3980IFga%(ed%)=1THENdd%=ed%:ed%=ba% 3990NEXT 4000IFdd%=-1THENPROCi("An attempt was m ade to add a new message when no space w as free"):PROCg("FX125") 4010=dd% 4030DEFFNib 4040!&70=da%+aa%+1 4050!&72=da% 4060CALLib% 4070!&72=0 4080=(!&70)-da% 4100DEFPROCbd(fd%,vb%) 4110LOCALA%,X%,Y% 4120ca%?0=vb% 4130ca%!1=da% 4140ca%!5=fd% 4150A%=2 4160X%=ca%MOD256 4170Y%=ca%DIV256 4180CALL&FFD1 4190BPUT#vb%,152 4200ENDPROC 4220DEFPROCuc(gd$,hd%) 4230LOCALid% 4240id%=hd%?LEN(gd$) 4250$hd%=gd$ 4260hd%?LEN(gd$)=id% 4270ENDPROC 4290DEFPROCmb 4300!&70=da% 4310!&72=da%+aa%+1 4320CALLmb% 4330ENDPROC 4350DEFFNwc(jd%,kd%,zc$) 4360LOCALld%,md%,nd%,od%,tb% 4370VDU22,7 4380ld%=0:md%=0:nd%=(aa%DIV40)-25 4390od%=FALSE 4400PROCab(zc$,od%) 4410PROCpd(ld%) 4420*FX21 4430REPEAT 4440VDU31,jd%,kd% 4450REPEAT 4460tb%=GET 4470UNTIL(tb%>=32ANDtb%<=127)OR(tb%>=13 6ANDtb%<=139)OR(tb%>=200ANDtb%<=229)ORtb %=13ORtb%=27ORtb%=20 4490IFtb%=ASC"£"THENtb%=35ELSEIFtb%=ASC "#"THENtb%=95ELSEIFtb%=ASC"`"THENtb%=96 4510IFtb%>=32ANDtb%<=126ANDNOTod%THEN?( jd%+kd%*40+&7C00)=tb%:da%?(jd%+(kd%+ld%) *40)=tb%:jd%=jd%+1:IFjd%=40ANDNOT(ld%=nd %ANDkd%=23)ANDtb%<>32THENjd%=FNqd(kd%,ld %):kd%=kd%+1:md%=-1 4520IFtb%=32ANDjd%=40THENjd%=39:tb%=13 4530IFtb%>=200ANDtb%<=229THENrd%=FNsd(t b%,jd%,kd%):jd%=jd%-rd%:IFjd%=40ANDNOT(l d%=nd%ANDkd%=23)THENjd%=0:kd%=kd%+1:md%= -1 4540IFtb%=127ANDjd%>0THEN!&70=da%+(kd%+ ld%)*40:?&72=jd%:CALLgb%:!&70=&7C00+kd%* 40:?&72=jd%:CALLgb%:jd%=jd%-1 4550IFtb%=13THENIFNOT(ld%=nd%ANDkd%=23) THENda%?((kd%+1+ld%)*40)=da%?((kd%+ld%)* 40):jd%=1:kd%=kd%+1:md%=-1 4560IFtb%=209THENod%=NOTod%:PROCab(zc$, od%) 4570IFtb%=219THENzc$=FNtd(zc$):PROCab(z c$,od%) 4580IFINSTR("QWASZXqwaszx",CHR$(tb%))<> 0ANDod%THENPROCod(jd%,kd%,ld%,tb%) 4590IFtb%=226THENPROChb(jd%,kd%,ld%) 4600IFtb%=227THENPROCkb(kd%,ld%):md%=-1 4610IFtb%=228THENPROClb(kd%,ld%):md%=-1 4620IFtb%=20THENPROCud(jd%,kd%,ld%,nd%) :md%=-1 4630IFtb%=136THENjd%=jd%-1 4640IFtb%=137THENjd%=jd%+1 4650IFtb%=138THENkd%=kd%+1 4660IFtb%=139THENkd%=kd%-1 4670IFjd%<0THENjd%=39:kd%=kd%-1 4680IFjd%>39THENjd%=0:kd%=kd%+1 4690IFkd%<0THENkd%=0:ld%=ld%+(ld%>0) 4700IFkd%>23THENkd%=23:ld%=ld%-(ld%<nd% ) 4710IFmd%<>ld%THENPROCpd(ld%):md%=ld%:P ROCab(zc$,od%) 4720UNTILtb%=27ANDNOTod% 4730PROCw 4740PROCy 4750=zc$ 4770DEFPROChb(jd%,kd%,ld%) 4780IFjd%=39THENda%?(39+(kd%+ld%)*40)=3 2:?(&7C00+39+kd%*40)=32:ENDPROC 4790!&70=da%+(kd%+ld%)*40 4800?&72=jd% 4810CALLhb% 4820!&70=&7C00+kd%*40 4830?&72=jd% 4840CALLhb% 4850ENDPROC 4870DEFPROCkb(kd%,ld%) 4880LOCALvd%,wd% 4890vd%=FNib 4900IFvd%>=aa%-80THENPROCd:ENDPROC 4910IF(kd%+ld%)*40>vd%THENENDPROC 4920!&70=da%+(kd%+ld%-1)*40 4930!&72=da%+(vd%DIV40)*40 4940CALLkb% 4950FORwd%=(kd%+ld%)*40TO39+(kd%+ld%)*4 0 4960da%?wd%=32 4970NEXT 4980ENDPROC 5000DEFPROClb(kd%,ld%) 5010LOCALvd%,wd% 5020vd%=FNib 5030IF(kd%+ld%)*40>vd%THENENDPROC 5040IFvd%>=(kd%+ld%)*40ANDvd%<=39+(kd%+ ld%)*40THENFORwd%=(kd%+ld%)*40TO39+(kd%+ ld%)*40:da%?wd%=32:NEXT:ENDPROC 5050!&70=da%+(kd%+ld%)*40 5060!&72=da%+(vd%DIV40)*40 5070CALLlb% 5080FORwd%=(vd%DIV40)*40TO(vd%DIV40)*40 +40 5090da%?wd%=32 5100NEXT 5110ENDPROC 5130DEFPROCab(zc$,od%) 5140PRINTTAB(0,24);SPC(39);TAB(0,24);CH R$(ab%);"Message to ";zc$;TAB(29,24); 5150IFod%THENPRINT"Pixel edit";ELSEPRIN TSPC(10); 5160ENDPROC 5180DEFFNqd(kd%,ld%) 5190LOCALxd%,yd% 5200xd%=40 5210REPEAT 5220xd%=xd%-1 5230UNTILda%?(xd%+(kd%+ld%)*40)=32ORxd% =0 5240IFda%?(xd%+(kd%+ld%)*40)<>32THENda% ?((kd%+1+ld%)*40)=da%?((kd%+ld%)*40):=1 5250FORyd%=xd%+1TO39 5260da%?(yd%-xd%+(kd%+1+ld%)*40)=da%?(y d%+(kd%+ld%)*40) 5270da%?(yd%+(kd%+ld%)*40)=32 5280NEXT 5290da%?((kd%+1+ld%)*40)=da%?((kd%+ld%) *40) 5300=40-xd% 5320DEFPROCpd(ld%) 5330!&70=da%+ld%*40 5340CALLnb% 5350ENDPROC 5370DEFFNsd(tb%,jd%,kd%) 5380LOCALzd% 5390zd%=-1 5400IFtb%>=200ANDtb%<=208THENzd%=tb%-71 5410IFtb%>=210ANDtb%<=216THENzd%=tb%-65 5420IFtb%>=217ANDtb%<=218THENzd%=tb%-61 5430IFtb%>=220ANDtb%<=221THENzd%=tb%-67 5440IFtb%>=222ANDtb%<=223THENzd%=tb%-64 5450IFtb%>=224ANDtb%<=225THENzd%=365-tb % 5460IFzd%<>-1THEN?(jd%+kd%*40+&7C00)=zd %:da%?(jd%+(kd%+ld%)*40)=zd%:=TRUE 5470=FALSE 5490DEFFNtd(zc$) 5500PRINTTAB(0,24);SPC(39);TAB(0,24);CH R$(bb%);"Send this message to:";CHR$(na% ); 5510=FNdc(FNna(3,3,zc$)) 5530DEFPROCod(jd%,kd%,ld%,tb%) 5540LOCALae%,be%,jc% 5550ae%=2^((INSTR("QWASZ X",CHR$(tb%AND &DF)))-1) 5560be%=da%+jd%+(kd%+ld%)*40 5570IF(?be%AND160)<>160THEN?be%=?be%OR1 60 5580IF(?be%ANDae%)=ae%THENjc%=?be%AND(2 55-ae%)ELSEjc%=?be%ORae% 5590?be%=jc% 5600?(&7C00+jd%+kd%*40)=jc% 5610ENDPROC 5630DEFPROCud(jd%,kd%,ld%,nd%) 5640LOCALfd%,ma$ 5650PROCw 5660PROCy 5670PRINTCHR$(ma%);"Are you sure you wa nt to read in"'CHR$(ma%);"a text file?"; CHR$(na%); 5680IFNOTFNceTHENVDU22,7:ENDPROC 5690PRINT' 5700PROCob("Please insert the disc cont aining the text file into drive 0 and pr ess SPACE...") 5710*FX21 5720REPEATUNTILGET=32 5730fd%=10 5740IFFNb=4THENPROCf:fd%=7 5750IFFNb=8THENPROCe 5760PRINT 5770PRINTCHR$(ma%);"Filename:";CHR$(na% ); 5780ma$=FNna(0,fd%,"") 5790IFma$<>""THENPROCde(jd%,kd%,ld%,nd% ,ma$) 5800PROCob("Please insert your submissi on disc in drive 0 and press SPACE...") 5810*FX21 5820REPEATUNTILGET=32 5830IFFNb=4THENPROCf 5840IFFNb=8THENPROCe 5850VDU22,7 5860ENDPROC 5880DEFPROCde(jd%,kd%,ld%,nd%,ma$) 5890LOCALvb%,ee$,id%,fe% 5900vb%=OPENIN(ma$) 5910IFvb%=0THENPRINT':PROCob("Sorry, th e file "+ma$+" is not present on this di sc."):PRINT:ENDPROC 5920IFEOF#vb%THENCLOSE#vb%:ENDPROC 5930PRINT''CHR$(ma%);"Please wait..."' 5940REPEAT 5950ee$="" 5960REPEAT 5970id%=BGET#vb% 5990IFid%=ASC"£"THENid%=35ELSEIFid%=ASC "#"THENid%=95ELSEIFid%=ASC"`"THENid%=96 6000IFid%>=33ANDid%<=126THENee$=ee$+CHR $(id%) 6010UNTILid%<33ORid%>126OREOF#vb% 6020fe%=-1 6030IFjd%+LEN(ee$)<=39THENfe%=jd%:ge%=k d%:he%=ld%:jd%=jd%+LEN(ee$)+1 6040IFfe%=-1THENjd%=1:kd%=kd%+1:eb%=?(d a%+(kd%-1+ld%)*40):IFeb%>=129ANDeb%<=135 THEN?(da%+(kd%+ld%)*40)=eb% 6050IFkd%>23THENkd%=23:ld%=ld%-(ld%<nd% ) 6060IFfe%=-1THENfe%=jd%:ge%=kd%:he%=ld% :jd%=jd%+LEN(ee$)+1 6070$(da%+fe%+(ge%+he%)*40)=ee$:?(da%+f e%+(ge%+he%)*40+LEN(ee$))=32 6080IFid%=13ORid%=10THENjd%=1:kd%=kd%+1 :eb%=?(da%+(kd%-1+ld%)*40):IFeb%>=129AND eb%<=135THEN?(da%+(kd%+ld%)*40)=eb% 6090UNTILEOF#vb% 6100CLOSE#vb% 6110ENDPROC 6130DEFPROCm 6140LOCALvb%,ed%,zc$,ie% 6150vb%=OPENIN("!Mesg") 6160FORed%=0TOba%-1 6170PTR#vb%=256+ed%*4096 6180INPUT#vb%,zc$ 6190ga%(ed%)=BGET#vb% 6200IFga%(ed%)<>1THENie%=FNje(vb%,FALSE ):fa$(ed%)=FNcd(30):ea$(ed%)=zc$ 6210NEXT 6220CLOSE#vb% 6230sc%=FNke 6240ENDPROC 6260DEFFNke 6270LOCALsc%,ed% 6280sc%=0 6290FORed%=0TOba%-1 6300IFga%(ed%)=0THENsc%=sc%+1 6310NEXT 6320=sc% 6340DEFFNcd(le%) 6350LOCALme$ 6360da%?128=13 6370me$="Subject:" 6380IFINSTR($da%,me$)=0THENme$="Article :" 6390IFINSTR($da%,me$)=0THEN="No subject ?" 6400=FNzb(MID$($da%,INSTR($da%,me$)+9,l e%)) 6420DEFPROCr 6430LOCALne%,mc%,oe%,pe%,qe%,re%,se%,tb %,te%,ue% 6440CLS 6450IFsc%=0THENPROCi("Sorry, there are no messages to view."):ENDPROC 6460ne%=1 6470mc%=1 6480oe%=1 6490pe%=-1 6500REPEAT 6510REPEAT 6520PROCve 6530IFoe%=pe%THENmc%=1:oe%=1 6540CLS 6550PRINTTAB(0,16);CHR$(ta%);"Use:";CHR $(ua%);"V";CHR$(ta%);"iew,";CHR$(ua%);"E ";CHR$(ta%);"dit,";CHR$(ua%);"P";CHR$(ta %);"rint,";CHR$(ua%);"D";CHR$(ta%);"elet e"; 6560VDU30 6570IFne%>sc%THENne%=1 6580qe%=ne%+13:IFqe%>sc%THENqe%=sc% 6590FORre%=ne%TOqe% 6600PRINTFNoc(ea$(ca%?re%)+": "+LEFT$(f a$(ca%?re%),22)," "); 6610NEXT 6620se%=qe%-ne%+1:pe%=se%+1 6630IFsc%>14THENPRINTFNoc("More message s..."," ");:se%=se%+1 6640IFoe%>se%THENoe%=se% 6650PRINTTAB(1,oe%-1);CHR$(pa%);CHR$157 ;CHR$(qa%) 6660REPEAT 6670REPEAT 6680*FX21 6690tb%=GETAND&DF 6700UNTILINSTR(CHR$138+CHR$139+CHR$13+C HR$27+"PVED",CHR$(tb%))<>0 6710IFtb%=138ANDoe%<se%THENoe%=oe%+1 6720IFtb%=139ANDoe%>1THENoe%=oe%-1 6730IFoe%<>mc%THENPRINTTAB(1,mc%-1);" ";CHR$(oa%);TAB(1,oe%-1);CHR$(pa%);CHR$1 57;CHR$(qa%):mc%=oe% 6740UNTILINSTR(CHR$13+CHR$27+"PVED",CHR $(tb%))<>0 6750IFoe%=pe%THENne%=ne%+14:IFne%>sc%TH ENne%=1 6760UNTILoe%<pe%ORtb%=27 6770te%=oe%+ne%-1 6780ue%=ca%?te% 6790IFtb%=13ORtb%=ASC("V")THENPRINTTAB( 0,16);SPC(35);TAB(0,16);CHR$(wa%);"Loadi ng message, please wait...";:fd%=FNwe(ue %) 6800IFtb%=13ORtb%=ASC("V")THENVDU22,7,2 3;8202;0;0;0;:PRINTTAB(0,24);FNva(te%,sc %,ea$(ue%));:?&74=da%MOD256:?&75=da%DIV2 56:qe%=da%+FNxe(fd%):?&76=qe%MOD256:?&77 =qe%DIV256:CALLfb%:PROCy 6810IFtb%=ASC("P")THENPROCye(ue%) 6820IFtb%=ASC("D")THENPROCze(ue%) 6830IFtb%=ASC("E")THENPROCaf(ue%) 6840UNTILtb%=27ORsc%=0 6850ENDPROC 6890DEFPROCve 6900LOCALN%,ed% 6910N%=1 6920FORed%=0TOba%-1 6930IFga%(ed%)=0THENca%?N%=ed%:N%=N%+1 6940NEXT 6950ENDPROC 6980DEFFNwe(ad%) 6990LOCALvb%,fd% 7000vb%=OPENIN("!Mesg") 7010PTR#vb%=256+ad%*4096+6 7020fd%=FNje(vb%,TRUE) 7030CLOSE#vb% 7040=fd% 7090DEFFNje(vb%,bf%) 7100LOCALA%,X%,Y% 7110ca%?0=vb% 7120ca%!1=da% 7130IFbf%THENca%!5=aa%+1ELSEca%!5=256 7140A%=4 7150X%=ca%MOD256 7160Y%=ca%DIV256 7170CALL&FFD1 7180IFNOTbf%THEN=0 7190!&70=da%-1 7200!&72=da%+aa%+1 7210CALLjb% 7220!&76=0 7230=(!&74-da%) 7250DEFFNva(ad%,cf%,zc$)=CHR$(va%)+"Thi s is message "+STR$(ad%)+" of "+STR$(cf% )+", to "+zc$ 7270DEFFNxe(fd%) 7280IFfd%<&3C0THENfd%=&3C0 7290IF(fd%MOD40)<>0THENfd%=fd%+(40-(fd% MOD40)) 7300=fd%-&3C0 7320DEFPROCze(ad%) 7330PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(xa%);"Delete this - are you sure?";CH R$(na%); 7340IFNOTFNceTHENENDPROC 7350PROCdf(ad%) 7360ENDPROC 7380DEFPROCdf(ad%) 7390LOCALvb% 7400vb%=OPENUP("!Mesg") 7410PTR#vb%=256+ad%*4096+5 7420BPUT#vb%,255 7430CLOSE#vb% 7440ga%(ad%)=255 7450sc%=sc%-1 7460ENDPROC 7480DEFPROCaf(ad%) 7490LOCALfd%,zc$ 7500PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(za%);"Edit this - are you sure?";CHR$ (na%); 7510IFNOTFNceTHENENDPROC 7520PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(wa%);"Loading message, please wait... "; 7530fd%=FNwe(ad%) 7560zc$=FNwc(1,4,ea$(ad%)) 7570PROCxc(zc$,ad%) 7580ENDPROC 7600DEFFNce 7610LOCALtb% 7620REPEAT 7630*FX21 7640tb%=GETAND&DF 7650UNTILtb%=ASC("Y")ORtb%=ASC("N") 7660IFtb%=ASC("Y")THENPRINT"Yes";:=TRUE 7670PRINT"No"; 7680=FALSE 7700DEFPROCye(ad%) 7710LOCALfd% 7720PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(ya%);"Print this - are you sure?";CHR $(na%); 7730*FX229 7740IFNOTFNceTHENPROCg("FX229,1"):ENDPR OC 7750PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(wa%);"Loading message, please wait... "; 7760fd%=FNwe(ad%) 7770PRINTTAB(0,16);SPC(35);TAB(0,16);CH R$(ya%);"Printing, please wait..."; 7780PROCef(fd%) 7790*FX229,1 7800ENDPROC 7820DEFPROCs 7830LOCALob% 7840CLS 7850IFsc%=0THENPROCi("Sorry, there are no messages to print."):ENDPROC 7860PRINTCHR$(ma%);"Are you sure you wa nt to print the"'CHR$(ma%);"messages?";C HR$(na%); 7870*FX229 7880IFNOTFNceTHENPROCg("FX229,1"):ENDPR OC 7890PRINT' 7900PROCob("Please wait, printing - pre ss ESCAPE to stop...") 7910FORob%=0TOba%-1 7920IFga%(ob%)=0THENPROCef(FNwe(ob%)) 7930NEXT 7940*FX229,1 7950ENDPROC 7970DEFPROCef(fd%) 7980LOCALob%,lc% 7990*FX3,10 8000FORob%=0TOfd%-1 8010lc%=da%?ob% 8020IFlc%>=32ANDlc%<=126THENVDUlc%ELSEV DU32 8030IF(ob%MOD40)=39ORob%=fd%-1THENPRINT 8040NEXT 8050PRINT 8060*FX3 8070ENDPROC 8090DEFPROCt 8100LOCALff$,gf$,vb% 8110ff$=xb$:gf$=yb$ 8120PROCcc 8130IFxb$=ff$ANDyb$=gf$THENENDPROC 8140vb%=OPENUP("!Mesg") 8150PTR#vb%=1 8160PRINT#vb%,xb$ 8170PRINT#vb%,LEFT$(yb$+STRING$(20," ") ,20) 8180CLOSE#vb% 8190ENDPROC 8210DEFPROCu 8220LOCALhf%,if% 8230CLS 8240*FX229 8250hf%=FALSE 8260FORif%=0TOba%-1 8270IFga%(if%)=255THENhf%=TRUE:PROCif(i f%) 8280NEXT 8290*FX229,1 8300IFNOThf%THENPROCi("Sorry, there are no messages to undelete.") 8310ENDPROC 8330DEFPROCif(ad%) 8340LOCALvb% 8350PROCqb("Undelete the message to "+e a$(ad%)+" with subject '"+fa$(ad%)+"'?") 8360IFPOS>31THENPRINT 8370VDUna% 8380IFNOTFNceTHENPRINT':ENDPROC 8390PRINT' 8400*FX229,1 8410vb%=OPENUP("!Mesg") 8420PTR#vb%=256+ad%*4096+5 8430BPUT#vb%,0 8440CLOSE#vb% 8450*FX229 8460ga%(ad%)=0 8470sc%=sc%+1 8480ENDPROC 8500DEFPROCn 8510DIMM%-1 8520IFHIMEM-M%>=256THENENDPROC 8530IFHIMEM-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 8540PROCi("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.") 8550ENDPROC