290MODE7:PROCa:b$=FNc:ONERRORPROCd:b$=
" ":GOTO360
360IFb$=" "ANDFNb=4THENb$="D"
370IFb$=" "ANDFNb=8THENb$="A"
380IFb$="A"THENPROCe
390IFb$="D"THENPROCf
400ONERRORVDU3:PROCg("FX3"):CLOSE#0:IF
ERR=17THENPROCg("FX229,1"):GOTO480ELSEMO
DE7:REPORT:PRINT" at line ";ERL:PROCh:EN
D
420DIMM%-1:IFHIMEM-M%<256THENPROCi("Th
ere are less than 256 bytes of RAM free.
The program will run but you will keep
receiving warnings about the shortage of
RAM.")
450IFFNj("!Mesg")THENPROCkELSEPROCl
460DIMm$(n%-1),o$(n%-1),p%(n%-1):PROCq
480REPEAT:PROCr:s%=FNt:IFs%=1THENPROCu
520IFs%=2THENPROCv
530IFs%=3THENPROCw
540IFs%=4THENPROCx
550IFs%=5THENPROCy
560UNTILs%=6:MODE7:PROCh:END
620DEFPROCz:*FX229,1
640*FX4,1
650*FX225,200
660*FX226,210
670*FX227,220
680*FX202,48
690ENDPROC
710DEFPROCh:*FX202,32
730*FX118
740*FX225,1
750*FX226,128
760*FX227,144
770*FX229
780*FX4
790ENDPROC
810DEFPROCa:ONERRORMODE7:REPORT:PRINT"
at line ";ERL:PROCh:END
830CLOSE#0:PROCz:PROCaa:PROCba:PROCca:
PROCda:ea%=4080::DIMfa%32,ga%ea%:ha%=1:P
ROCia:ENDPROC
950DEFFNS="SendMes"
970DEFPROCe:*ADFS
990*MOUNT 0
1000*DIR $
1010ENDPROC
1030DEFPROCf:*DISC
1050*DRIVE 0
1060*DIR $
1070ENDPROC
1090DEFPROCaa:VDU23,1,0;0;0;0;:ENDPROC
1130DEFPROCja:VDU23,1,1;0;0;0;:ENDPROC
1170DEFPROCg($fa%):LOCALX%,Y%:X%=fa%MOD
256:Y%=fa%DIV256:CALL&FFF7:ENDPROC
1240DEFPROCba:ka%=150:la%=147:ma%=135:n
a%=131:oa%=131:pa%=132:qa%=135:ra%=130:s
a%=131:ta%=135:ua%=131:va%=135:wa%=135:x
a%=135:ya%=135:za%=135:ab%=135:bb%=135:c
b%=135:ENDPROC
1460DEFPROCca:LOCALdb%:VDU26,12:PRINTTA
B(0,23);CHR$(ka%);"¶||||||||||||||||||||
|||||||||||||||||¶";:VDU30,11,30:PRINT"
";CHR$(ka%);"¶///////%¶///////
//////////¶";:PRINTCHR$(ka%);"¶/////////
//*//////// ";CHR$(ka%);"
¶";
1530PRINTCHR$(ka%);"¶";CHR$(la%);"6£4 7
i(h0 6) 0`$t` ` 0 0` ";CHR$(ka%
);"¶";:PRINTCHR$(ka%);"¶";CHR$(la%);"6£4
!7ijj 2ijjj!5jhj`nj =! ";CHR$(k
a%);"¶";:PRINTCHR$(ka%);"£ £!" ! "! !" " !! £" "! ":FORd
b%=1TO19:PRINTCHR$(ka%);"¶";SPC(36);CHR$
(ka%);"¶";:NEXT
1590PRINTTAB(7,5);CHR$(la%-16);"8BS mes
saging system 2.11":VDU28,2,23,37,7:ENDP
ROC
1630DEFPROCda:IFHIMEM=&7C00AND?&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."):VDU26,12:PROCja:PROCh:END
1710DEFPROCia:PRINTCHR$(ma%);"Please wa
it, loading...":DIMeb%452:OSCLI"Load Sen
dMMC "+STR$÷eb%:fb%=eb%+&1F:gb%=eb%+&A4:
hb%=eb%+&B7:ib%=eb%+&C9:jb%=eb%+&EB:kb%=
eb%+&126:lb%=eb%+&158:mb%=eb%+&18A:nb%=e
b%+&1AA:ENDPROC
1860DEFPROCob(T$):PROCpb(T$,ma%,TRUE):E
NDPROC
1900DEFPROCqb(T$):PROCpb(T$,ma%,FALSE):
ENDPROC
1950DEFPROCpb(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)
1980UNTILT$="":ENDPROC
2010DEFPROCi(rb$):CLS:PROCob(rb$):PRINT
'CHR$(ma%);"Press SPACE to continue...":
*FX21
2060REPEATUNTILGET=32:ENDPROC
2090DEFPROCsb(rb$):CLS:PROCob(rb$):PRIN
T'CHR$(ma%);"Press SPACE to return to BA
SIC":*FX21
2140REPEATUNTILGET=32:VDU26,12:PROCja:P
ROCh:END
2200DEFFNc:LOCALtb%,tb$:CLS:PROCob("Ple
ase insert your submission disc in drive
0. This disc should remain in the drive
at all times when you are using this pr
ogram."):PRINT
2250PROCob("When you have done this, pr
ess A if it an ADFS disc, D if it is a D
FS disc or SPACE to use the current fili
ng system."):PRINT:PROCob("If in doubt,
just press SPACE."):REPEAT:*FX21
2300tb%=GET:tb$=CHR$((tb%AND&DF)-32*(tb
%=32)):UNTILINSTR(" AD",tb$)<>0:=tb$
2350DEFFNb:LOCALA%,Y%:A%=0:Y%=0:=(USR(&
FFDA)AND&FF)
2410DEFPROCd:SOUND1,-10,52,5:ENDPROC
2450DEFFNj(ub$):LOCALvb%:vb%=OPENIN(ub$
):IFvb%<>0THENCLOSE#vb%
2490=(vb%<>0)
2510DEFPROCk:LOCALvb%,wb%:CLS:PRINTCHR$
(ma%);"Please wait, scanning messages...
":vb%=OPENIN("!Mesg"):wb%=BGET#vb%:IFwb%
<>1THENPROCsb("The !Mesg file on this di
sc is a version "+STR$(wb%)+" file. This
program can only handle version 1 files
.")
2580INPUT#vb%,xb$:INPUT#vb%,yb$:yb$=FNz
b(yb$):n%=(EXT#vb%-256)/4096:IF((EXT#vb%
-256)MOD4096)<>0ORn%<5ORn%>25THENPROCsb(
"The !Mesg file is an unacceptable size.
")
2630CLOSE#vb%:ENDPROC
2680DEFFNzb(ac$):LOCALeb%:eb%=ASC(RIGHT
$(ac$,1)):REPEAT:IFeb%<33OReb%>126THENac
$=LEFT$(ac$,LEN(ac$)-1)
2730eb%=ASC(RIGHT$(ac$,1)):UNTIL(eb%>=3
3ANDeb%<=126)ORac$="":=ac$
2770DEFPROCl:LOCALvb%,bc%:xb$="":yb$=""
:PROCcc:PROCdc:PRINT''CHR$(ma%);"Please
wait...":vb%=OPENOUT("!Mesg"):BPUT#vb%,1
::PRINT#vb%,xb$:PRINT#vb%,LEFT$(yb$+STRI
NG$(20," "),20):FORbc%=0TOn%-1:PTR#vb%=2
56+bc%*4096:PRINT#vb%,"XXX":BPUT#vb%,1:N
EXT:PTR#vb%=256+n%*4096:CLOSE#vb%:ENDPRO
C
2960DEFPROCcc:CLS:PROCob("Please enter
your three-character ID. If you don't kn
ow it, it is shown in the top left hand
corner of the menu."):PRINT'CHR$(ma%);"I
D:";CHR$(na%);:xb$=FNec(FNna(3,3,xb$)):P
RINT'
3020PROCob("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."):PRINT'CHR$(na%);:yb
$=FNna(0,20,yb$):ENDPROC
3070DEFPROCdc:REPEAT:PRINT':PROCob("How
many messages do you wish to have room
for in the message file?"):PRINT'CHR$(ma
%);"Messages (5-25):";CHR$(na%);:n%=VAL(
FNna(1,2,"")):UNTILn%>=5ANDn%<=25:ENDPRO
C
3160DEFFNna(fc%,gc%,ma$):LOCALhc%,ic%,t
b%:hc%=POS:ic%=VPOS:PRINTLEFT$(ma$+STRIN
G$(gc%,"."),gc%);TAB(hc%+LEN(ma$),ic%);:
REPEAT:REPEAT:*FX21
3240tb%=GET:UNTILtb%=13OR(tb%>=32ANDtb%
<=127):IFtb%=127ANDLEN(ma$)>0THENVDU8,46
,8:ma$=LEFT$(ma$,LEN(ma$)-1)
3270IFtb%<>127ANDtb%<>13ANDLEN(ma$)<gc%
THENVDUtb%:ma$=ma$+CHR$(tb%)
3280UNTIL(tb%=13ANDLEN(ma$)>=fc%):=ma$
3310DEFFNec(jc$):LOCALkc$,lc%,mc%:kc$="
":IFjc$=""THEN=""
3350FORlc%=1TOLEN(jc$):mc%=ASC(MID$(jc$
,lc%,1)):IFmc%>=ASC"a"ANDmc%<=ASC"z"THEN
mc%=mc%-32
3380kc$=kc$+CHR$(mc%):NEXT:=kc$
3420DEFFNt:LOCALnc%,oc$,tb%:CLS:PRINTFN
pc("Start a new message","N");FNpc("View
/edit/print messages","V");FNpc("Print a
ll the messages","P");FNpc("Re-enter you
r user ID/name","R");FNpc("Undelete dele
ted messages","U");:PRINTFNpc("Quit the
program","Q")
3470PROCob("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.")
:PRINT:PROCqb("If you select an option b
y mistake, pressing ESCAPE will usually
return you to this menu.")
3500nc%=ha%:oc$="NVPRUQ":PRINTTAB(1,ha%
-1);CHR$(pa%);CHR$157;CHR$(qa%):REPEAT:R
EPEAT:*FX21
3560tb%=GETAND&DF:IFINKEY-1ANDtb%=27THE
Nnc%=LEN(oc$):tb%=13:
3580UNTILINSTR(CHR$138+CHR$139+CHR$13+o
c$,CHR$(tb%))<>0:ha%=INSTR(oc$,CHR$(tb%)
):IFha%=0THENha%=nc%
3600IFtb%=138ANDha%<LEN(oc$)THENha%=ha%
+1
3610IFtb%=139ANDha%>1THENha%=ha%-1
3620IFha%<>nc%THENPRINTTAB(1,nc%-1);"
";CHR$(oa%);TAB(1,ha%-1);CHR$(pa%);CHR$1
57;CHR$(qa%):nc%=ha%
3630UNTILtb%=13:=ha%
3660DEFFNpc(qc$,oc$)=" "+CHR$(oa%)+qc
$+STRING$(28-LEN(qc$)," ")+oc$+" "+CHR$
156
3680DEFPROCu:LOCALrc$,sc%:CLS:IFtc%>=n%
THENPROCi("Sorry, there is a limit of "+
STR$(n%)+" messages for this file."):END
PROC
3720PROCob("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.")
3730PRINT'CHR$(ma%);"ID:";CHR$(na%);:*F
X229
3750rc$=FNec(FNna(3,3,"")):*FX229,1
3770PROCmb:sc%=(rc$<>"CCC"):IFrc$="999"
THENuc$="(all members)"ELSEuc$=""
3800IFsc%THENPROCvc(CHR$(ra%)+"To:
"+CHR$(sa%)+rc$+" "+uc$,ga%)
3810IFyb$=""THENwc$=""ELSEwc$="("+yb$+"
)"
3820PROCvc(CHR$(ra%)+"From: "+CHR$(sa
%)+xb$+" "+wc$,ga%-40*sc%):PROCvc(CHR$(r
a%)+"Subject:"+CHR$(sa%),ga%+40-40*sc%):
rc$=FNxc(10,1-sc%,rc$):PROCyc(rc$,FNzc):
tc%=tc%+1:ENDPROC
3900DEFPROCyc(ad$,bd%):LOCALvb%:PRINTTA
B(0,0);CHR$(cb%);"Please wait, saving me
ssage...";:vb%=OPENUP("!Mesg"):PTR#vb%=2
56+bd%*4096:PRINT#vb%,ad$:BPUT#vb%,0:PRO
Ccd(FNib+1,vb%):CLOSE#vb%:m$(bd%)=ad$:o$
(bd%)=FNdd(30):p%(bd%)=0:ENDPROC
4050DEFFNzc:LOCALed%,fd%:ed%=-1:FORfd%=
0TOn%-1:IFp%(fd%)=255THENed%=fd%
4100IFp%(fd%)=1THENed%=fd%:fd%=n%
4110NEXT:IFed%=-1THENPROCi("An attempt
was made to add a new message when no sp
ace was free"):PROCg("FX125"):
4130=ed%
4150DEFFNib:!&70=ga%+ea%+1:!&72=ga%:CAL
Lib%:!&72=0:=(!&70)-ga%
4220DEFPROCcd(gd%,vb%):LOCALA%,X%,Y%:fa
%?0=vb%:fa%!1=ga%:fa%!5=gd%:A%=2:X%=fa%M
OD256:Y%=fa%DIV256:CALL&FFD1:BPUT#vb%,15
2:ENDPROC
4340DEFPROCvc(hd$,id%):LOCALjd%:jd%=id%
?LEN(hd$):$id%=hd$:id%?LEN(hd$)=jd%:ENDP
ROC
4410DEFPROCmb:!&70=ga%:!&72=ga%+ea%+1:C
ALLmb%:ENDPROC
4470DEFFNxc(kd%,ld%,ad$):LOCALmd%,nd%,o
d%,pd%,tb%:VDU22,7::md%=0:nd%=0:od%=(ea%
DIV40)-25:pd%=FALSE:PROCab(ad$,pd%):PROC
qd(md%):*FX21
4550REPEAT:VDU31,kd%,ld%:REPEAT:tb%=GET
:UNTIL(tb%>=32ANDtb%<=127)OR(tb%>=136AND
tb%<=139)OR(tb%>=200ANDtb%<=229)ORtb%=13
ORtb%=27ORtb%=20:IFtb%=ASC"£"THENtb%=35E
LSEIFtb%=ASC"#"THENtb%=95ELSEIFtb%=ASC"`
"THENtb%=96
4630IFtb%>=32ANDtb%<=126ANDNOTpd%THEN?(
kd%+ld%*40+&7C00)=tb%:ga%?(kd%+(ld%+md%)
*40)=tb%:kd%=kd%+1:IFkd%=40ANDNOT(md%=od
%ANDld%=23)ANDtb%<>32THENkd%=FNrd(ld%,md
%):ld%=ld%+1:nd%=-1
4640IFtb%=32ANDkd%=40THENkd%=39:tb%=13
4650IFtb%>=200ANDtb%<=229THENsd%=FNtd(t
b%,kd%,ld%):kd%=kd%-sd%:IFkd%=40ANDNOT(m
d%=od%ANDld%=23)THENkd%=0:ld%=ld%+1:nd%=
-1
4660IFtb%=127ANDkd%>0THEN!&70=ga%+(ld%+
md%)*40:?&72=kd%:CALLgb%:!&70=&7C00+ld%*
40:?&72=kd%:CALLgb%:kd%=kd%-1
4670IFtb%=13THENIFNOT(md%=od%ANDld%=23)
THENga%?((ld%+1+md%)*40)=ga%?((ld%+md%)*
40):kd%=1:ld%=ld%+1:nd%=-1
4680IFtb%=209THENpd%=NOTpd%:PROCab(ad$,
pd%)
4690IFtb%=219THENad$=FNud(ad$):PROCab(a
d$,pd%)
4700IFINSTR("QWASZXqwaszx",CHR$(tb%))<>
0ANDpd%THENPROCpd(kd%,ld%,md%,tb%)
4710IFtb%=226THENPROChb(kd%,ld%,md%)
4720IFtb%=227THENPROCkb(ld%,md%):nd%=-1
4730IFtb%=228THENPROClb(ld%,md%):nd%=-1
4740IFtb%=20THENPROCvd(kd%,ld%,md%,od%)
:nd%=-1
4750IFtb%=136THENkd%=kd%-1
4760IFtb%=137THENkd%=kd%+1
4770IFtb%=138THENld%=ld%+1
4780IFtb%=139THENld%=ld%-1
4790IFkd%<0THENkd%=39:ld%=ld%-1
4800IFkd%>39THENkd%=0:ld%=ld%+1
4810IFld%<0THENld%=0:md%=md%+(md%>0)
4820IFld%>23THENld%=23:md%=md%-(md%<od%
)
4830IFnd%<>md%THENPROCqd(md%):nd%=md%:P
ROCab(ad$,pd%)
4840UNTILtb%=27ANDNOTpd%:PROCaa:PROCca:
=ad$
4890DEFPROChb(kd%,ld%,md%):IFkd%=39THEN
ga%?(39+(ld%+md%)*40)=32:?(&7C00+39+ld%*
40)=32:ENDPROC
4910!&70=ga%+(ld%+md%)*40:?&72=kd%:CALL
hb%:!&70=&7C00+ld%*40:?&72=kd%:CALLhb%:E
NDPROC
4990DEFPROCkb(ld%,md%):LOCALwd%,xd%:wd%
=FNib:IFwd%>=ea%-80THENPROCd:ENDPROC
5030IF(ld%+md%)*40>wd%THENENDPROC
5040!&70=ga%+(ld%+md%-1)*40:!&72=ga%+(w
d%DIV40)*40:CALLkb%:FORxd%=(ld%+md%)*40T
O39+(ld%+md%)*40:ga%?xd%=32:NEXT:ENDPROC
5120DEFPROClb(ld%,md%):LOCALwd%,xd%:wd%
=FNib:IF(ld%+md%)*40>wd%THENENDPROC
5160IFwd%>=(ld%+md%)*40ANDwd%<=39+(ld%+
md%)*40THENFORxd%=(ld%+md%)*40TO39+(ld%+
md%)*40:ga%?xd%=32:NEXT:ENDPROC
5170!&70=ga%+(ld%+md%)*40:!&72=ga%+(wd%
DIV40)*40:CALLlb%:FORxd%=(wd%DIV40)*40TO
(wd%DIV40)*40+40:ga%?xd%=32:NEXT:ENDPROC
5250DEFPROCab(ad$,pd%):PRINTTAB(0,24);S
PC(39);TAB(0,24);CHR$(ab%);"Message to "
;ad$;TAB(29,24);:IFpd%THENPRINT"Pixel ed
it";ELSEPRINTSPC(10);
5280ENDPROC
5300DEFFNrd(ld%,md%):LOCALyd%,zd%:yd%=4
0:REPEAT:yd%=yd%-1:UNTILga%?(yd%+(ld%+md
%)*40)=32ORyd%=0:IFga%?(yd%+(ld%+md%)*40
)<>32THENga%?((ld%+1+md%)*40)=ga%?((ld%+
md%)*40):=1:
5370FORzd%=yd%+1TO39:ga%?(zd%-yd%+(ld%+
1+md%)*40)=ga%?(zd%+(ld%+md%)*40):ga%?(z
d%+(ld%+md%)*40)=32:NEXT:ga%?((ld%+1+md%
)*40)=ga%?((ld%+md%)*40):=40-yd%
5440DEFPROCqd(md%):!&70=ga%+md%*40:CALL
nb%:ENDPROC
5490DEFFNtd(tb%,kd%,ld%):LOCALae%:ae%=-
1:IFtb%>=200ANDtb%<=208THENae%=tb%-71
5530IFtb%>=210ANDtb%<=216THENae%=tb%-65
5540IFtb%>=217ANDtb%<=218THENae%=tb%-61
5550IFtb%>=220ANDtb%<=221THENae%=tb%-67
5560IFtb%>=222ANDtb%<=223THENae%=tb%-64
5570IFtb%>=224ANDtb%<=225THENae%=365-tb
%
5580IFae%<>-1THEN?(kd%+ld%*40+&7C00)=ae
%:ga%?(kd%+(ld%+md%)*40)=ae%:=TRUE
5590=FALSE
5610DEFFNud(ad$):PRINTTAB(0,24);SPC(39)
;TAB(0,24);CHR$(bb%);"Send this message
to:";CHR$(na%);:=FNec(FNna(3,3,ad$))
5650DEFPROCpd(kd%,ld%,md%,tb%):LOCALbe%
,ce%,kc%:be%=2^((INSTR("QWASZ X",CHR$(tb
%AND&DF)))-1):ce%=ga%+kd%+(ld%+md%)*40:I
F(?ce%AND160)<>160THEN?ce%=?ce%OR160
5700IF(?ce%ANDbe%)=be%THENkc%=?ce%AND(2
55-be%)ELSEkc%=?ce%ORbe%
5710?ce%=kc%:?(&7C00+kd%+ld%*40)=kc%:EN
DPROC
5750DEFPROCvd(kd%,ld%,md%,od%):LOCALgd%
,ma$:PROCaa:PROCca:PRINTCHR$(ma%);"Are y
ou sure you want to read in"'CHR$(ma%);"
a text file?";CHR$(na%);:IFNOTFNdeTHENVD
U22,7:ENDPROC
5810PRINT':PROCob("Please insert the di
sc containing the text file into drive 0
and press SPACE..."):*FX21
5840REPEATUNTILGET=32:gd%=10:IFFNb=4THE
NPROCf:gd%=7
5870IFFNb=8THENPROCe
5880PRINT:PRINTCHR$(ma%);"Filename:";CH
R$(na%);:ma$=FNna(0,gd%,""):IFma$<>""THE
NPROCee(kd%,ld%,md%,od%,ma$)
5920PROCob("Please insert your submissi
on disc in drive 0 and press SPACE..."):
*FX21
5940REPEATUNTILGET=32:IFFNb=4THENPROCf
5960IFFNb=8THENPROCe
5970VDU22,7:ENDPROC
6000DEFPROCee(kd%,ld%,md%,od%,ma$):LOCA
Lvb%,fe$,jd%,ge%:vb%=OPENIN(ma$):IFvb%=0
THENPRINT':PROCob("Sorry, the file "+ma$
+" is not present on this disc."):PRINT:
ENDPROC
6040IFEOF#vb%THENCLOSE#vb%:ENDPROC
6050PRINT''CHR$(ma%);"Please wait..."':
REPEAT:fe$="":REPEAT:jd%=BGET#vb%:IFjd%=
ASC"£"THENjd%=35ELSEIFjd%=ASC"#"THENjd%=
95ELSEIFjd%=ASC"`"THENjd%=96
6120IFjd%>=33ANDjd%<=126THENfe$=fe$+CHR
$(jd%)
6130UNTILjd%<33ORjd%>126OREOF#vb%:ge%=-
1:IFkd%+LEN(fe$)<=39THENge%=kd%:he%=ld%:
ie%=md%:kd%=kd%+LEN(fe$)+1
6160IFge%=-1THENkd%=1:ld%=ld%+1:eb%=?(g
a%+(ld%-1+md%)*40):IFeb%>=129ANDeb%<=135
THEN?(ga%+(ld%+md%)*40)=eb%
6170IFld%>23THENld%=23:md%=md%-(md%<od%
)
6180IFge%=-1THENge%=kd%:he%=ld%:ie%=md%
:kd%=kd%+LEN(fe$)+1
6190$(ga%+ge%+(he%+ie%)*40)=fe$:?(ga%+g
e%+(he%+ie%)*40+LEN(fe$))=32:IFjd%=13ORj
d%=10THENkd%=1:ld%=ld%+1:eb%=?(ga%+(ld%-
1+md%)*40):IFeb%>=129ANDeb%<=135THEN?(ga
%+(ld%+md%)*40)=eb%
6210UNTILEOF#vb%:CLOSE#vb%:ENDPROC
6250DEFPROCq:LOCALvb%,fd%,ad$,je%:vb%=O
PENIN("!Mesg"):FORfd%=0TOn%-1:PTR#vb%=25
6+fd%*4096:INPUT#vb%,ad$:p%(fd%)=BGET#vb
%:IFp%(fd%)<>1THENje%=FNke(vb%,FALSE):o$
(fd%)=FNdd(30):m$(fd%)=ad$
6330NEXT:CLOSE#vb%:tc%=FNle:ENDPROC
6380DEFFNle:LOCALtc%,fd%:tc%=0:FORfd%=0
TOn%-1:IFp%(fd%)=0THENtc%=tc%+1
6430NEXT:=tc%
6460DEFFNdd(me%):LOCALne$:ga%?128=13:ne
$="Subject:":IFINSTR($ga%,ne$)=0THENne$=
"Article:"
6510IFINSTR($ga%,ne$)=0THEN="No subject
?"
6520=FNzb(MID$($ga%,INSTR($ga%,ne$)+9,m
e%))
6540DEFPROCv:LOCALoe%,nc%,pe%,qe%,re%,s
e%,te%,tb%,ue%,ve%:CLS:IFtc%=0THENPROCi(
"Sorry, there are no messages to view.")
:ENDPROC
6580oe%=1:nc%=1:pe%=1:qe%=-1:REPEAT:REP
EAT:PROCwe:IFpe%=qe%THENnc%=1:pe%=1
6660CLS:PRINTTAB(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%);"
elete";:VDU30:IFoe%>tc%THENoe%=1
6700re%=oe%+13:IFre%>tc%THENre%=tc%
6710FORse%=oe%TOre%:PRINTFNpc(m$(fa%?se
%)+": "+LEFT$(o$(fa%?se%),22)," ");:NEXT
:te%=re%-oe%+1:qe%=te%+1:IFtc%>14THENPRI
NTFNpc("More messages..."," ");:te%=te%+
1
6760IFpe%>te%THENpe%=te%
6770PRINTTAB(1,pe%-1);CHR$(pa%);CHR$157
;CHR$(qa%):REPEAT:REPEAT:*FX21
6810tb%=GETAND&DF:UNTILINSTR(CHR$138+CH
R$139+CHR$13+CHR$27+"PVED",CHR$(tb%))<>0
:IFtb%=138ANDpe%<te%THENpe%=pe%+1
6840IFtb%=139ANDpe%>1THENpe%=pe%-1
6850IFpe%<>nc%THENPRINTTAB(1,nc%-1);"
";CHR$(oa%);TAB(1,pe%-1);CHR$(pa%);CHR$1
57;CHR$(qa%):nc%=pe%
6860UNTILINSTR(CHR$13+CHR$27+"PVED",CHR
$(tb%))<>0:IFpe%=qe%THENoe%=oe%+14:IFoe%
>tc%THENoe%=1
6880UNTILpe%<qe%ORtb%=27:ue%=pe%+oe%-1:
ve%=fa%?ue%::IFtb%=13ORtb%=ASC("V")THENP
RINTTAB(0,16);SPC(35);TAB(0,16);CHR$(wa%
);"Loading message, please wait...";:gd%
=FNxe(ve%)
6920IFtb%=13ORtb%=ASC("V")THENVDU22,7,2
3;8202;0;0;0;:PRINTTAB(0,24);FNva(ue%,tc
%,m$(ve%));:?&74=ga%MOD256:?&75=ga%DIV25
6:re%=ga%+FNye(gd%):?&76=re%MOD256:?&77=
re%DIV256:CALLfb%:PROCca
6930IFtb%=ASC("P")THENPROCze(ve%)
6940IFtb%=ASC("D")THENPROCaf(ve%)
6950IFtb%=ASC("E")THENPROCbf(ve%)
6960UNTILtb%=27ORtc%=0:ENDPROC
7010DEFPROCwe:LOCALN%,fd%:N%=1:FORfd%=0
TOn%-1:IFp%(fd%)=0THENfa%?N%=fd%:N%=N%+1
7060NEXT:ENDPROC
7100DEFFNxe(bd%):LOCALvb%,gd%:vb%=OPENI
N("!Mesg"):PTR#vb%=256+bd%*4096+6:gd%=FN
ke(vb%,TRUE):CLOSE#vb%:=gd%
7210DEFFNke(vb%,cf%):LOCALA%,X%,Y%:fa%?
0=vb%:fa%!1=ga%:IFcf%THENfa%!5=ea%+1ELSE
fa%!5=256
7260A%=4:X%=fa%MOD256:Y%=fa%DIV256:CALL
&FFD1:IFNOTcf%THEN=0
7310!&70=ga%-1:!&72=ga%+ea%+1:CALLjb%:!
&76=0:=(!&74-ga%)
7370DEFFNva(bd%,df%,ad$)=CHR$(va%)+"Thi
s is message "+STR$(bd%)+" of "+STR$(df%
)+", to "+ad$
7390DEFFNye(gd%):IFgd%<&3C0THENgd%=&3C0
7410IF(gd%MOD40)<>0THENgd%=gd%+(40-(gd%
MOD40))
7420=gd%-&3C0
7440DEFPROCaf(bd%):PRINTTAB(0,16);SPC(3
5);TAB(0,16);CHR$(xa%);"Delete this - ar
e you sure?";CHR$(na%);:IFNOTFNdeTHENEND
PROC
7470PROCef(bd%):ENDPROC
7500DEFPROCef(bd%):LOCALvb%:vb%=OPENUP(
"!Mesg"):PTR#vb%=256+bd%*4096+5:BPUT#vb%
,255:CLOSE#vb%:p%(bd%)=255:tc%=tc%-1:END
PROC
7600DEFPROCbf(bd%):LOCALgd%,ad$:PRINTTA
B(0,16);SPC(35);TAB(0,16);CHR$(za%);"Edi
t this - are you sure?";CHR$(na%);:IFNOT
FNdeTHENENDPROC
7640PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(wa%);"Loading message, please wait...
";:gd%=FNxe(bd%):ad$=FNxc(1,4,m$(bd%)):P
ROCyc(ad$,bd%):ENDPROC
7720DEFFNde:LOCALtb%:REPEAT:*FX21
7760tb%=GETAND&DF:UNTILtb%=ASC("Y")ORtb
%=ASC("N"):IFtb%=ASC("Y")THENPRINT"Yes";
:=TRUE
7790PRINT"No";:=FALSE
7820DEFPROCze(bd%):LOCALgd%:PRINTTAB(0,
16);SPC(35);TAB(0,16);CHR$(ya%);"Print t
his - are you sure?";CHR$(na%);:*FX229
7860IFNOTFNdeTHENPROCg("FX229,1"):ENDPR
OC
7870PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(wa%);"Loading message, please wait...
";:gd%=FNxe(bd%):PRINTTAB(0,16);SPC(35);
TAB(0,16);CHR$(ya%);"Printing, please wa
it...";:PROCff(gd%):*FX229,1
7920ENDPROC
7940DEFPROCw:LOCALob%:CLS:IFtc%=0THENPR
OCi("Sorry, there are no messages to pri
nt."):ENDPROC
7980PRINTCHR$(ma%);"Are you sure you wa
nt to print the"'CHR$(ma%);"messages?";C
HR$(na%);:*FX229
8000IFNOTFNdeTHENPROCg("FX229,1"):ENDPR
OC
8010PRINT':PROCob("Please wait, printin
g - press ESCAPE to stop..."):FORob%=0TO
n%-1:IFp%(ob%)=0THENPROCff(FNxe(ob%))
8050NEXT:*FX229,1
8070ENDPROC
8090DEFPROCff(gd%):LOCALob%,mc%:*FX3,10
8120FORob%=0TOgd%-1:mc%=ga%?ob%:IFmc%>=
32ANDmc%<=126THENVDUmc%ELSEVDU32
8150IF(ob%MOD40)=39ORob%=gd%-1THENPRINT
8160NEXT:PRINT:*FX3
8190ENDPROC
8210DEFPROCx:LOCALgf$,hf$,vb%:gf$=xb$:h
f$=yb$:PROCcc:IFxb$=gf$ANDyb$=hf$THENEND
PROC
8260vb%=OPENUP("!Mesg"):PTR#vb%=1:PRINT
#vb%,xb$:PRINT#vb%,LEFT$(yb$+STRING$(20,
" "),20):CLOSE#vb%:ENDPROC
8330DEFPROCy:LOCALif%,jf%:CLS:*FX229
8370if%=FALSE:FORjf%=0TOn%-1:IFp%(jf%)=
255THENif%=TRUE:PROCjf(jf%)
8400NEXT:*FX229,1
8420IFNOTif%THENPROCi("Sorry, there are
no messages to undelete.")
8430ENDPROC
8450DEFPROCjf(bd%):LOCALvb%:PROCqb("Und
elete the message to "+m$(bd%)+" with su
bject '"+o$(bd%)+"'?"):IFPOS>31THENPRINT
8490VDUna%:IFNOTFNdeTHENPRINT':ENDPROC
8510PRINT':*FX229,1
8530vb%=OPENUP("!Mesg"):PTR#vb%=256+bd%
*4096+5:BPUT#vb%,0:CLOSE#vb%:*FX229
8580p%(bd%)=0:tc%=tc%+1:ENDPROC
8620DEFPROCr:DIMM%-1:IFHIMEM-M%>=256THE
NENDPROC
8650IFHIMEM-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
8660PROCi("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