10REM¶*Basic
20REM¶CHAIN"$.!Boot"
25*Exec
30*Fx119
40MODE7:LOMEM=TOP+452:PROCa:b$=FNc:ON
ERRORPROCd:b$=" "
340IFb$=" "ANDFNb=4THENb$="D"
350IFb$=" "ANDFNb=8THENb$="A"
360IFb$=" "ANDFNb=16THENb$="H"
365IFb$="A"THENPROCe
370IFb$="D"THENPROCf
380IFb$="H"THENPROCj
385ONERRORVDU3:PROCg("FX3"):CLOSE#0:IF
ERR=17THENPROCg("FX229,1"):PROCXELSEMODE
7:REPORT:PRINT" at line ";ERL:PROCh:END
390DIMM% -1:IFHIMEM-M%<256THENPROCi("T
here are less than 256 bytes of RAM free
. The program will run but you will keep
receiving warnings about the shortage o
f RAM.")
420IFFNj("!Mesg")THENPROCkELSEPROCl
440PROCm
460REPEAT:PROCn:o%=FNp:IFo%=1THENPROCq
490IFo%=2THENPROCr
500IFo%=3THENPROCs
510IFo%=4THENPROCt
520IFo%=5THENPROCu
530UNTILo%=6:MODE7:PROCh:END
580DEFPROCv
610*FX4,1
620*FX225,200
630*FX226,210
640*FX227,220
650*FX202,48
660ENDPROC
670DEFPROCh
700*FX118
710*FX225,1
720*FX226,128
730*FX227,144
740*FX229
750*FX4
760ENDPROC
770DEFPROCa:ONERRORMODE7:REPORT:PRINT"
at line ";ERL:PROCh:END
800CLOSE#0:PROCv:PROCw:PROCx:PROCy:PRO
Cz:J%=4080:l%=25:DIMn% 32,f% J%,a$(l%-1)
,b$(l%-1),a%(l%-1):r%=1:PROCH:ENDPROC
930DEFFNS="SendMes"
970DEFPROCe
980OSCLI"MOUNT "+STR$K%
1000ENDPROC
1010DEFPROCf
1040OSCLI"DRIVE "+STR$K%
1060ENDPROC
1070DEFPROCj
1074OSCLI"DIR :"+STR$K%+".$":ENDPROC
1078DEFPROCw:VDU23,1,0;0;0;0;
1100ENDPROC
1110DEFPROCp:VDU23,1,1;0;0;0;
1140ENDPROC
1150DEFPROCg($n%):LOCALX%,Y%:X%=n%MOD25
6:Y%=n%DIV256:CALL65527:ENDPROC
1220DEFPROCx:t%=150:W%=147:s%=135:u%=13
1:aa%=131:Z%=132:`%=135:ba%=130:ca%=131:
R%=135:£%=131:da%=135:ea%=135:fa%=135:ga
%=135:ha%=135:ia%=135:ja%=135:ka%=135:EN
DPROC
1440DEFPROCy:LOCALla%:VDU26,12
1480PRINTTAB(0,23);CHR$(t%);"¶|||||||||
||||||||||||||||||||||||||||¶";:VDU30,11
,30
1500PRINT" ";CHR$(t%);"¶/////
//%¶/////////////////¶";:PRINTCHR$(t%);"
¶///////////*//////// ";C
HR$(t%);"¶";:PRINTCHR$(t%);"¶";CHR$(W%);
"6£4 7i(h0 6) 0`$t` ` 0 0` ";CH
R$(t%);"¶";
1530PRINTCHR$(t%);"¶";CHR$(W%);"6£4!7ij
j 2ijjj!5jhj`nj =! ";CHR$(t%);"
¶";:PRINTCHR$(t%);"! "! !" " !! £" "! ":FORla%=1TO1
9:PRINTCHR$(t%);"¶";SPC(36);CHR$(t%);"¶"
;:NEXT:PRINTTAB(7,5);CHR$(W%-16);"8BS me
ssaging system 2.16":VDU28,2,23,37,7
1600ENDPROC
1610DEFPROCz:IF?31784=t%THENENDPROC
1640PROCi("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
1660PROCp:PROCh:END
1690DEFPROCH:i%=TOP:ma%=i%+31:na%=i%+16
4:oa%=i%+183:pa%=i%+201:qa%=i%+235:ra%=i
%+294:sa%=i%+344:ta%=i%+394:ua%=i%+426:E
NDPROC
1840DEFPROCb(T$):PROCA(T$,s%,TRUE):ENDP
ROC
1880DEFPROCB(T$):PROCA(T$,s%,FALSE):END
PROC
1920DEFPROCA(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)
1970UNTILT$="":ENDPROC
1990DEFPROCi(m$):CLS:PROCb(m$):PRINT'CH
R$(s%);"Press SPACE to continue..."
2050REPEATUNTILGET=32:ENDPROC
2070DEFPROCC(m$):CLS:PROCb(m$):PRINT'CH
R$(s%);"Press SPACE to return to BASIC"
2130REPEATUNTILGET=32:VDU26,12
2150PROCp:PROCh:END
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
2200PROCb("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.")
2220PRINT:PROCb("To select another driv
e enter that drive number."):K%=0:REPEAT
*FX21
2230b%=GET:IFb%>=48ANDb%<=53K%=b%-48:PR
INTTAB(10,1);K%
2250n$=CHR$((b%AND223)-32*(b%=32)):UNTI
LINSTR(" ADH",n$)<>0:=n$
2350DEFFNb:LOCALA%,Y%:A%=0:Y%=0:=(USR(6
5498)AND255)
2410DEFPROCd:SOUND1,-10,52,5:ENDPROC
2430DEFFNj(v$):LOCALd%:d%=OPENIN(v$):IF
d%<>0THENCLOSE#d%
2480=(d%<>0)
2510DEFPROCk:LOCALd%,va%:CLS:PRINTCHR$(
s%);"Please wait, scanning messages...":
d%=OPENIN("!Mesg"):va%=BGET#d%:IFva%<>1T
HENPROCC("The !Mesg file on this disc is
a version "+STR$(va%)+" file. This prog
ram can only handle version 1 files.")
2570INPUT#d%,e$:INPUT#d%,d$:d$=FNi(d$):
l%=(EXT#d%-256)/4096:IF((EXT#d%-256)MOD4
096)<>0ORl%<5ORl%>25THENPROCC("The !Mesg
file is an unacceptable size.")
2605CLOSE#d%:ENDPROC
2620DEFFNi(g$):LOCALi%:i%=ASC(RIGHT$(g$
,1)):REPEAT:IFi%<33ORi%>126THENg$=LEFT$(
g$,LEN(g$)-1)
2700i%=ASC(RIGHT$(g$,1)):UNTIL(i%>=33AN
Di%<=126)ORg$="":=g$
2740DEFPROCl:LOCALd%,wa%:e$="":d$="":PR
OCD:PROCI:PRINT''CHR$(s%);"Please wait..
.":d%=OPENOUT("!Mesg"):BPUT#d%,1:PRINT#d
%,e$:PRINT#d%,LEFT$(d$+STRING$(20," "),2
0):FORwa%=0TOl%-1:PTR#d%=256+wa%*4096:PR
INT#d%,"XXX":BPUT#d%,1:NEXT:PTR#d%=256+l
%*4096:CLOSE#d%:ENDPROC
2910DEFPROCD:LOCALk$:CLS:PROCb("Please
enter your three-character ID. If you do
n't know it, it is shown in the top left
hand corner of the menu."):PRINT:PRINT'
CHR$(s%);"ID:";CHR$(u%);:e$=FNg(FNd(3,3,
e$)):PRINT'
2940PROCb("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$(u%);:d$=F
Nd(0,20,d$)
2950CLS:PROCb("Would you like the messa
ging system to be installed on your subm
issions disc so that it can be loaded by
pressing Shift+Break."):PRINT:PROCb("Wo
uld you like this (Y/N) : "):REPEATk$=GE
T$:UNTILINSTR("YyNn",k$)
2965IFINSTR("Yy",k$)PROCg("Save !Boot "
+STR$÷PAGE+" "+STR$÷(TOP+451)):PROCg("Op
t 4,3")
2970CLS:ENDPROC
2980DEFFNd(xa%,ya%,c$):LOCALza%,Aa%,a%:
za%=POS:Aa%=VPOS:PRINTLEFT$(c$+STRING$(y
a%,"."),ya%);TAB(za%+LEN(c$),Aa%);:REPEA
T:REPEAT
3110a%=GET:UNTILa%=13OR(a%>=32ANDa%<=12
7):IFa%=127ANDLEN(c$)>0THENVDU8,46,8:c$=
LEFT$(c$,LEN(c$)-1)
3140IFa%<>127ANDa%<>13ANDLEN(c$)<ya%THE
NVDUa%:c$=c$+CHR$(a%)
3150UNTIL(a%=13ANDLEN(c$)>=xa%):=c$
3190DEFFNg(o$):LOCALl$,Ba%,y%:l$="":IFo
$=""THEN=""
3220FORBa%=1TOLEN(o$):y%=ASC(MID$(o$,Ba
%,1)):IFy%>=ASC"a"ANDy%<=ASC"z"THENy%=y%
-32
3250l$=l$+CHR$(y%):NEXT:=l$
3300DEFFNp:LOCALv%,h$,a%:CLS:PRINTFNa("
Start a new message","N");FNa("View/edit
/print messages","V");FNa("Print all the
messages","P");FNa("Re-enter your user
ID/name","R");FNa("Undelete deleted mess
ages","U");:PRINTFNa("Quit the program",
"Q")
3340PROCb("Use the up and down cursor k
eys to move the bar, or press the key sh
own after the option you want. Press RET
URN to select the highlighted option."):
PRINT
3360PROCB("If you select an option by m
istake, pressing ESCAPE will usually ret
urn you to this menu."):v%=r%:h$="NVPRUQ
":PRINTTAB(1,r%-1);CHR$(Z%);CHR$157;CHR$
(`%):REPEAT:REPEAT
3430a%=GETAND223:IFINKEY-1ANDa%=27THENv
%=LEN(h$):a%=13
3450UNTILINSTR(CHR$138+CHR$139+CHR$13+h
$,CHR$(a%))<>0:r%=INSTR(h$,CHR$(a%)):IFr
%=0THENr%=v%
3470IFa%=138ANDr%<LEN(h$)THENr%=r%+1
3480IFa%=139ANDr%>1THENr%=r%-1
3490IFr%<>v%THENPRINTTAB(1,v%-1);" ";C
HR$(aa%);TAB(1,r%-1);CHR$(Z%);CHR$157;CH
R$(`%):v%=r%
3500UNTILa%=13:=r%
3540DEFFNa(q$,h$)=" "+CHR$(aa%)+q$+ST
RING$(28-LEN(q$)," ")+h$+" "+CHR$156
3560DEFPROCq:LOCALi$,S%:CLS:IFk%>=l%THE
NPROCi("Sorry, there is a limit of "+STR
$(l%)+" messages."):ENDPROC
3590PROCb("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.")
3600PRINT'CHR$(s%);"ID:";CHR$(u%);
3620i$=FNg(FNd(3,3,""))
3640PROCJ:S%=(i$<>"CCC"):IFi$="999"THEN
r$="(all members)"ELSEr$=""
3670IFS%THENPROCo(CHR$(ba%)+"To: "+
CHR$(ca%)+i$+" "+r$,f%)
3680IFd$=""THENs$=""ELSEs$="("+d$+")"
3690PROCo(CHR$(ba%)+"From: "+CHR$(ca%
)+e$+" "+s$,f%-40*S%):PROCo(CHR$(ba%)+"S
ubject:"+CHR$(ca%),f%+40-40*S%):i$=FNk(1
0,1-S%,i$):PROCE(i$,FNn):k%=k%+1:ENDPROC
3750DEFPROCE(a$,j%):LOCALd%:PRINTTAB(0,
0);CHR$(ka%);"Please wait, saving messag
e...";:d%=OPENUP("!Mesg"):PTR#d%=256+j%*
4096:PRINT#d%,a$:BPUT#d%,0:PROCK(FNh+1,d
%):CLOSE#d%:a$(j%)=a$:b$(j%)=FNl(30):a%(
j%)=0:ENDPROC
3900DEFFNn:LOCALT%,m%:T%=-1:FORm%=0TOl%
-1:IFa%(m%)=255THENT%=m%
3970IFa%(m%)=1THENT%=m%:m%=l%
3980NEXT:IFT%=-1THENPROCi("An attempt w
as made to add a new message when no spa
ce was free"):PROCg("FX125")
4000=T%
4030DEFFNh:!112=f%+J%+1:!114=f%:CALLpa%
:!114=0:=(!112)-f%
4100DEFPROCK(h%,d%):LOCALA%,X%,Y%:n%?0=
d%:n%!1=f%:n%!5=h%:A%=2:X%=n%MOD256:Y%=n
%DIV256:CALL65489:BPUT#d%,152:ENDPROC
4200DEFPROCo(p$,Ca%):LOCALq%:q%=Ca%?LEN
(p$):$Ca%=p$:Ca%?LEN(p$)=q%:ENDPROC
4270DEFPROCJ:!112=f%:!114=f%+J%+1:CALLt
a%:ENDPROC
4330DEFFNk(g%,c%,a$):LOCALe%,E%,B%,w%,a
%:VDU22,7
4370e%=0:E%=0:B%=(J%DIV40)-25:w%=FALSE:
PROCc(a$,w%):PROCF(e%)
4420REPEAT:VDU31,g%,c%
4440REPEAT:a%=GET:UNTIL(a%>=32ANDa%<=12
7)OR(a%>=136ANDa%<=139)OR(a%>=200ANDa%<=
229)ORa%=13ORa%=27ORa%=20:IFa%=ASC"£"THE
Na%=35ELSEIFa%=ASC"#"THENa%=95ELSEIFa%=A
SC"`"THENa%=96
4490IFa%>=32ANDa%<=126ANDNOTw%THEN?(g%+
c%*40+31744)=a%:f%?(g%+(c%+e%)*40)=a%:g%
=g%+1:IFg%=40ANDNOT(e%=B%ANDc%=23)ANDa%<
>32THENg%=FNo(c%,e%):c%=c%+1:E%=-1
4510IFa%=32ANDg%=40THENg%=39:a%=13
4520IFa%>=200ANDa%<=229THENDa%=FNq(a%,g
%,c%):g%=g%-Da%:IFg%=40ANDNOT(e%=B%ANDc%
=23)THENg%=0:c%=c%+1:E%=-1
4530IFa%=127ANDg%>0THEN!112=f%+(c%+e%)*
40:?114=g%:CALLna%:!112=31744+c%*40:?114
=g%:CALLna%:g%=g%-1
4540IFa%=13THENIFNOT(e%=B%ANDc%=23)THEN
f%?((c%+1+e%)*40)=f%?((c%+e%)*40):g%=1:c
%=c%+1:E%=-1
4550IFa%=209THENw%=NOTw%:PROCc(a$,w%)
4560IFa%=219THENa$=FNr(a$):PROCc(a$,w%)
4570IFINSTR("QWASZXqwaszx",CHR$(a%))<>0
ANDw%THENPROCL(g%,c%,e%,a%)
4580IFa%=226THENPROCM(g%,c%,e%)
4590IFa%=227THENPROCN(c%,e%):E%=-1
4600IFa%=228THENPROCO(c%,e%):E%=-1
4610IFa%=20THENPROCP(g%,c%,e%,B%):E%=-1
4620IFa%=136THENg%=g%-1
4630IFa%=137THENg%=g%+1
4640IFa%=138THENc%=c%+1
4650IFa%=139THENc%=c%-1
4660IFg%<0THENg%=39:c%=c%-1
4670IFg%>39THENg%=0:c%=c%+1
4680IFc%<0THENc%=0:e%=e%+(e%>0)
4690IFc%>23THENc%=23:e%=e%-(e%<B%)
4700IFE%<>e%THENPROCF(e%):E%=e%:PROCc(a
$,w%)
4710UNTILa%=27ANDNOTw%:PROCw:PROCy:=a$
4770DEFPROCM(g%,c%,e%):IFg%=39THENf%?(3
9+(c%+e%)*40)=32:?(31744+39+c%*40)=32:EN
DPROC
4780!112=f%+(c%+e%)*40:?114=g%:CALLoa%:
!112=31744+c%*40:?114=g%:CALLoa%:ENDPROC
4850DEFPROCN(c%,e%):LOCALx%,L%:x%=FNh:I
Fx%>=J%-80THENPROCd:ENDPROC
4900IF(c%+e%)*40>x%THENENDPROC
4910!112=f%+(c%+e%-1)*40:!114=f%+(x%DIV
40)*40:CALLra%:FORL%=(c%+e%)*40TO39+(c%+
e%)*40:f%?L%=32:NEXT:ENDPROC
4980DEFPROCO(c%,e%):LOCALx%,L%:x%=FNh:I
F(c%+e%)*40>x%THENENDPROC
5030IFx%>=(c%+e%)*40ANDx%<=39+(c%+e%)*4
0THENFORL%=(c%+e%)*40TO39+(c%+e%)*40:f%?
L%=32:NEXT:ENDPROC
5040!112=f%+(c%+e%)*40:!114=f%+(x%DIV40
)*40:CALLsa%:FORL%=(x%DIV40)*40TO(x%DIV4
0)*40+40:f%?L%=32:NEXT:ENDPROC
5110DEFPROCc(a$,w%):PRINTTAB(0,24);SPC(
39);TAB(0,24);CHR$(ia%);"Message to ";a$
;TAB(29,24);:IFw%THENPRINT"Pixel edit";E
LSEPRINTSPC(10);
5150ENDPROC
5160DEFFNo(c%,e%):LOCALF%,Ea%:F%=40:REP
EAT:F%=F%-1:UNTILf%?(F%+(c%+e%)*40)=32OR
F%=0:IFf%?(F%+(c%+e%)*40)<>32THENf%?((c%
+1+e%)*40)=f%?((c%+e%)*40):=1
5240FOREa%=F%+1TO39:f%?(Ea%-F%+(c%+1+e%
)*40)=f%?(Ea%+(c%+e%)*40):f%?(Ea%+(c%+e%
)*40)=32:NEXT:f%?((c%+1+e%)*40)=f%?((c%+
e%)*40):=40-F%
5320DEFPROCF(e%):!112=f%+e%*40:CALLua%:
ENDPROC
5350DEFFNq(a%,g%,c%):LOCALD%:D%=-1:IFa%
>=200ANDa%<=208THEND%=a%-71
5400IFa%>=210ANDa%<=216THEND%=a%-65
5410IFa%>=217ANDa%<=218THEND%=a%-61
5420IFa%>=220ANDa%<=221THEND%=a%-67
5430IFa%>=222ANDa%<=223THEND%=a%-64
5440IFa%>=224ANDa%<=225THEND%=365-a%
5450IFD%<>-1THEN?(g%+c%*40+31744)=D%:f%
?(g%+(c%+e%)*40)=D%:=TRUE
5460=FALSE
5490DEFFNr(a$):PRINTTAB(0,24);SPC(39);T
AB(0,24);CHR$(ja%);"Send this message to
:";CHR$(u%);:=FNg(FNd(3,3,a$))
5530DEFPROCL(g%,c%,e%,a%):LOCALU%,G%,Fa
%:U%=2^((INSTR("QWASZ X",CHR$(a%AND223))
)-1):G%=f%+g%+(c%+e%)*40:IF(?G%AND160)<>
160THEN?G%=?G%OR160
5570IF(?G%ANDU%)=U%THENFa%=?G%AND(255-U
%)ELSEFa%=?G%ORU%
5580?G%=Fa%:?(31744+g%+c%*40)=Fa%:ENDPR
OC
5610DEFPROCP(g%,c%,e%,B%):LOCALh%,c$:PR
OCw:PROCy:PRINTCHR$(s%);"Are you sure yo
u want to read in"'CHR$(s%);"a text file
?";CHR$(u%);:IFNOTFNeTHENVDU22,7:ENDPROC
5680PRINT':PROCb("Please insert the dis
c containing the text file into drive "+
STR$K%+" and press SPACE...")
5710REPEATUNTILGET=32:h%=10:IFFNb=4THEN
PROCf:h%=7
5740IFFNb=8THENPROCe
5750IFFNb=16THENPROCj
5755PRINT:PRINTCHR$(s%);"Filename:";CHR
$(u%);:c$=FNd(0,h%,""):IFc$<>""THENPROCQ
(g%,c%,e%,B%,c$)
5790PROCb("Please insert your submissio
n disc in drive "+STR$K%+" and press SPA
CE...")
5810REPEATUNTILGET=32:IFFNb=4THENPROCf
5830IFFNb=8THENPROCe
5840IFFNb=16THENPROCj
5845VDU22,7
5850ENDPROC
5860DEFPROCQ(g%,c%,e%,B%,c$):LOCALd%,f$
,q%,O%:d%=OPENIN(c$):IFd%=0THENPRINT':PR
OCb("Sorry, the file "+c$+" is not prese
nt on this disc."):PRINT:ENDPROC
5910IFEOF#d%THENCLOSE#d%:ENDPROC
5920PRINT''CHR$(s%);"Please wait..."':R
EPEAT:f$="":REPEAT:q%=BGET#d%:IFq%=ASC"£
"THENq%=35ELSEIFq%=ASC"#"THENq%=95ELSEIF
q%=ASC"`"THENq%=96
5990IFq%>=33ANDq%<=126THENf$=f$+CHR$(q%
)
6000UNTILq%<33ORq%>126OREOF#d%:O%=-1:IF
g%+LEN(f$)<=39THENO%=g%:Ga%=c%:Ha%=e%:g%
=g%+LEN(f$)+1
6030IFO%=-1THENg%=1:c%=c%+1:i%=?(f%+(c%
-1+e%)*40):IFi%>=129ANDi%<=135THEN?(f%+(
c%+e%)*40)=i%
6040IFc%>23THENc%=23:e%=e%-(e%<B%)
6050IFO%=-1THENO%=g%:Ga%=c%:Ha%=e%:g%=g
%+LEN(f$)+1
6060$(f%+O%+(Ga%+Ha%)*40)=f$:?(f%+O%+(G
a%+Ha%)*40+LEN(f$))=32:IFq%=13ORq%=10THE
Ng%=1:c%=c%+1:i%=?(f%+(c%-1+e%)*40):IFi%
>=129ANDi%<=135THEN?(f%+(c%+e%)*40)=i%
6080UNTILEOF#d%:CLOSE#d%:ENDPROC
6110DEFPROCm:LOCALd%,m%,a$,Ia%:d%=OPENI
N("!Mesg"):FORm%=0TOl%-1:PTR#d%=256+m%*4
096:INPUT#d%,a$:a%(m%)=BGET#d%:IFa%(m%)<
>1THENIa%=FNm(d%,FALSE):b$(m%)=FNl(30):a
$(m%)=a$
6200NEXT:CLOSE#d%:k%=FNs:ENDPROC
6240DEFFNs:LOCALk%,m%:k%=0:FORm%=0TOl%-
1:IFa%(m%)=0THENk%=k%+1
6300NEXT:=k%
6340DEFFNl(Ja%):LOCALj$:f%?128=13:j$="S
ubject:":IFINSTR($f%,j$)=0THENj$="Articl
e:"
6380IFINSTR($f%,j$)=0THEN="No subject?"
6390=FNi(MID$($f%,INSTR($f%,j$)+9,Ja%))
6420DEFPROCr:LOCALz%,v%,p%,V%,H%,Ka%,P%
,a%,La%,Q%:CLS:IFk%=0THENPROCi("Sorry, t
here are no messages to view."):ENDPROC
6450z%=1:v%=1:p%=1:V%=-1:REPEAT:REPEAT:
PROCR:IFp%=V%THENv%=1:p%=1
6530CLS:PRINTTAB(0,16);CHR$(R%);"Use:";
CHR$(£%);"V";CHR$(R%);"iew,";CHR$(£%);"E
";CHR$(R%);"dit,";CHR$(£%);"P";CHR$(R%);
"rint,";CHR$(£%);"D";CHR$(R%);"elete";:V
DU30
6560IFz%>k%THENz%=1
6570H%=z%+13:IFH%>k%THENH%=k%
6580FORKa%=z%TOH%:PRINTFNa(a$(n%?Ka%)+"
: "+LEFT$(b$(n%?Ka%),22)," ");:NEXT:P%=H
%-z%+1:V%=P%+1:IFk%>14THENPRINTFNa("More
messages..."," ");:P%=P%+1
6630IFp%>P%THENp%=P%
6640PRINTTAB(1,p%-1);CHR$(Z%);CHR$157;C
HR$(`%):REPEAT:REPEAT
6680a%=GETAND223:UNTILINSTR(CHR$138+CHR
$139+CHR$13+CHR$27+"PVED",CHR$(a%))<>0:I
Fa%=138ANDp%<P%THENp%=p%+1
6710IFa%=139ANDp%>1THENp%=p%-1
6720IFp%<>v%THENPRINTTAB(1,v%-1);" ";C
HR$(aa%);TAB(1,p%-1);CHR$(Z%);CHR$157;CH
R$(`%):v%=p%
6730UNTILINSTR(CHR$13+CHR$27+"PVED",CHR
$(a%))<>0:IFp%=V%THENz%=z%+14:IFz%>k%THE
Nz%=1
6750UNTILp%<V%ORa%=27:La%=p%+z%-1:Q%=n%
?La%:IFa%=13ORa%=ASC("V")THENPRINTTAB(0,
16);SPC(35);TAB(0,16);CHR$(ea%);"Loading
message, please wait...";:h%=FNf(Q%)
6790IFa%=13ORa%=ASC("V")THENVDU22,7,23;
8202;0;0;0;:PRINTTAB(0,24);FNt(La%,k%,a$
(Q%));:?116=f%MOD256:?117=f%DIV256:H%=f%
+FNu(h%):?118=H%MOD256:?119=H%DIV256:CAL
Lma%:PROCy
6800IFa%=ASC("P")THENPROCS(Q%)
6810IFa%=ASC("D")THENPROCT(Q%)
6820IFa%=ASC("E")THENPROCU(Q%)
6830UNTILa%=27ORk%=0:ENDPROC
6850DEFPROCR:LOCALN%,m%:N%=1:FORm%=0TOl
%-1:IFa%(m%)=0THENn%?N%=m%:N%=N%+1
6930NEXT:ENDPROC
6950DEFFNf(j%):LOCALd%,h%:d%=OPENIN("!M
esg"):PTR#d%=256+j%*4096+6:h%=FNm(d%,TRU
E):CLOSE#d%:=h%
7090DEFFNm(d%,Ma%):LOCALA%,X%,Y%:n%?0=d
%:n%!1=f%:IFMa%THENn%!5=J%+1ELSEn%!5=256
7130A%=4:X%=n%MOD256:Y%=n%DIV256:CALL65
489:IFNOTMa%THEN=0
7180!112=f%-1:!114=f%+J%+1:CALLqa%:!118
=0:=(!116-f%)
7250DEFFNt(j%,Na%,a$)=CHR$(da%)+"This i
s message "+STR$(j%)+" of "+STR$(Na%)+",
to "+a$
7270DEFFNu(h%):IFh%<960THENh%=960
7280IF(h%MOD40)<>0THENh%=h%+(40-(h%MOD4
0))
7290=h%-960
7320DEFPROCT(j%):PRINTTAB(0,16);SPC(35)
;TAB(0,16);CHR$(fa%);"Delete this - are
you sure?";CHR$(u%);:IFNOTFNeTHENENDPROC
7340PROCV(j%):ENDPROC
7360DEFPROCV(j%):LOCALd%:d%=OPENUP("!Me
sg"):PTR#d%=256+j%*4096+5:BPUT#d%,255:CL
OSE#d%:a%(j%)=255:k%=k%-1:ENDPROC
7460DEFPROCU(j%):LOCALh%,a$:PRINTTAB(0,
16);SPC(35);TAB(0,16);CHR$(ha%);"Edit th
is - are you sure?";CHR$(u%);:IFNOTFNeTH
ENENDPROC
7510PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ea%);"Loading message, please wait...
";:h%=FNf(j%):a$=FNk(1,4,a$(j%)):PROCE(a
$,j%):ENDPROC
7580DEFFNe:LOCALa%:REPEAT
7630a%=GETAND223:UNTILa%=ASC("Y")ORa%=A
SC("N"):IFa%=ASC("Y")THENPRINT"Yes";:=TR
UE
7660PRINT"No";:=FALSE
7700DEFPROCS(j%):LOCALh%:PRINTTAB(0,16)
;SPC(35);TAB(0,16);CHR$(ga%);"Print this
- are you sure?";CHR$(u%);
7730IFNOTFNeTHENPROCg("FX229,1"):ENDPRO
C
7740PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ea%);"Loading message, please wait...
";:h%=FNf(j%):PRINTTAB(0,16);SPC(35);TAB
(0,16);CHR$(ga%);"Printing, please wait.
..";:PROCG(h%)
7790ENDPROC
7800DEFPROCs:LOCALI%:CLS:IFk%=0THENPROC
i("Sorry, there are no messages to print
."):ENDPROC
7850PRINTCHR$(s%);"Are you sure you wan
t to print the"'CHR$(s%);"messages?";CHR
$(u%);
7870IFNOTFNeTHENPROCg("FX229,1"):ENDPRO
C
7880PRINT':PROCb("Please wait, printing
- press ESCAPE to stop..."):FORI%=0TOl%
-1:IFa%(I%)=0THENPROCG(FNf(I%))
7920NEXT
7940ENDPROC
7950DEFPROCG(h%):LOCALI%,y%
7990FORI%=0TOh%-1:y%=f%?I%:IFy%>=32ANDy
%<=126THENVDUy%ELSEVDU32
8020IF(I%MOD40)=39ORI%=h%-1THENPRINT
8030NEXT:PRINT
8060ENDPROC
8070DEFPROCt:LOCALt$,u$,d%:t$=e$:u$=d$:
PROCD:IFe$=t$ANDd$=u$THENENDPROC
8130d%=OPENUP("!Mesg"):PTR#d%=1:PRINT#d
%,e$:PRINT#d%,LEFT$(d$+STRING$(20," "),2
0):CLOSE#d%:ENDPROC
8190DEFPROCu:LOCALOa%,Pa%:CLS
8240Oa%=FALSE:FORPa%=0TOl%-1:IFa%(Pa%)=
255THENOa%=TRUE:PROCW(Pa%)
8270NEXT
8290IFNOTOa%THENPROCi("Sorry, there are
no messages to undelete.")
8300ENDPROC
8310DEFPROCW(j%):LOCALd%:PROCB("Undelet
e the message to "+a$(j%)+" with subject
'"+b$(j%)+"'?"):IFPOS>31THENPRINT
8360VDUu%
8370IFNOTFNeTHENPRINT':ENDPROC
8380PRINT'
8400d%=OPENUP("!Mesg"):PTR#d%=256+j%*40
96+5:BPUT#d%,0:CLOSE#d%
8450a%(j%)=0:k%=k%+1:ENDPROC
8480DEFPROCn:DIMM% -1:IFHIMEM-M%>=256TH
ENENDPROC
8520IFHIMEM-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
8530PROCi("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