8-Bit Software Online Conversion
8BS Messaging System. V 2.0 - Listing
240:
250MODE7
260PROCa
270:
300b$=FNc
310ONERRORPROCd:b$=" ":GOTO320
320IFb$=" "ANDFNb=4THENb$="D"
330IFb$=" "ANDFNb=8THENb$="A"
335IFb$=" "ANDFNb=16THENb$="H"
340IFb$="A"THENPROCe
350IFb$="D"THENPROCf
355IFb$="H"THENPROCha
360ONERRORVDU3:PROCg("FX3"):CLOSE#0:IF
ERR=17THENPROCg("FX229,1"):GOTO420ELSEMO
DE7:REPORT:PRINT" at line ";ERL:PROCh:EN
D
370:
380DIMM%-1
390IFHIMEM-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.")
400:
410IFFNj("!Mesg")THENPROCkELSEPROCl
420REPEAT
430PROCm
440n%=FNo
450IFn%=1THENPROCp
460IFn%=2THENPROCq
470IFn%=3THENPROCr
480IFn%=4THENPROCs
490IFn%=5THENPROCt
500IFn%=6THENPROCu
510UNTILn%=7
520:
530MODE7
540PROCh
550END
560:
570DEFPROCv
580*FX229,1
590*FX4,1
600*FX225,200
610*FX226,210
620*FX227,220
630*FX202,48
640ENDPROC
650:
660DEFPROCh
670*FX202,32
680*FX118
690*FX225,1
700*FX226,128
710*FX227,144
720*FX229
730*FX4
740ENDPROC
750:
760DEFPROCa
770ONERRORMODE7:REPORT:PRINT" at line
";ERL:PROCh:END
780CLOSE#0
790PROCv
800PROCw
810PROCx
820PROCy
830PROCz
840aa%=4096
850ba%=25
860ca%=TRUE
870da%=TRUE
880DIMea%32,fa%aa%,ga$(ba%),ha%(ba%),i
a$(ba%)
890ja%=1
900PROCka
910ENDPROC
920:
930DEFFNS="SendMes"
940:
950DEFPROCe
960*ADFS
970*MOUNT 0
980*DIR $
990ENDPROC
1000:
1010DEFPROCf
1020*DISC
1030*DRIVE 0
1040*DIR $
1050ENDPROC
1051:
1052DEFPROCha
1053*HADFS
1054*DIR :0.$
1055ENDPROC
1060:
1070DEFPROCw
1080VDU23,1,0;0;0;0;
1090ENDPROC
1100:
1110DEFPROCla
1120VDU23,1,1;0;0;0;
1130ENDPROC
1140:
1150DEFPROCg($ea%)
1160LOCALX%,Y%
1170X%=ea%MOD256
1180Y%=ea%DIV256
1190CALL&FFF7
1200ENDPROC
1210:
1220DEFPROCx
1230ma%=150
1240na%=147
1250oa%=135
1260pa%=131
1270qa%=131
1280ra%=132
1290sa%=135
1300ta%=130
1310ua%=131
1320va%=135
1330wa%=131
1340xa%=135
1350ya%=135
1360za%=135
1370ab%=135
1380bb%=135
1390cb%=135
1400db%=135
1410eb%=135
1420ENDPROC
1430:
1440DEFPROCy
1450LOCALfb%
1460VDU26,12
1470PRINTTAB(0,23);CHR$(ma%);"¶||||||||
|||||||||||||||||||||||||||||¶";
1480VDU30,11,30
1490PRINT" ";CHR$(ma%);"¶////
///%¶/////////////////¶";
1500PRINTCHR$(ma%);"¶///////////*//////
// ";CHR$(ma%);"¶";
1510PRINTCHR$(ma%);"¶";CHR$(na%);"jk 7
4$5 j£`p`pj 0 0p0p`p ";CHR$(ma%
);"¶";
1520PRINTCHR$(ma%);"¶";CHR$(na%);"jk"!7
457 "kjjj$j!545=55j. ";CHR$(ma%
);"¶";
1530PRINTCHR$(ma%);"
!£! "£"£" "!££!!!!"£ ";
1540FORfb%=1TO19
1550PRINTCHR$(ma%);"¶";SPC(36);CHR$(ma%
);"¶";
1560NEXT
1570PRINTTAB(7,5);CHR$(na%-16);"8BS mes
saging system 2.00"
1580VDU28,2,23,37,7
1590ENDPROC
1600:
1610DEFPROCz
1620IF?&7C28=ma%THENENDPROC
1630PROCi("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.")
1640VDU26,12
1650PROCla
1660PROCh
1670END
1680:
1690DEFPROCka
1700PRINTCHR$(oa%);"Please wait, loadin
g..."
1710DIMgb%452
1720OSCLI"Load SendMMC "+STR$÷gb%
1730hb%=gb%+&1F
1740ib%=gb%+&A4
1750jb%=gb%+&B7
1760kb%=gb%+&C9
1770lb%=gb%+&EB
1780mb%=gb%+&126
1790nb%=gb%+&158
1800ob%=gb%+&18A
1810pb%=gb%+&1AA
1820ENDPROC
1830:
1840DEFPROCqb(T$)
1850PROCrb(T$,oa%,TRUE)
1860ENDPROC
1870:
1880DEFPROCsb(T$)
1890PROCrb(T$,oa%,FALSE)
1900ENDPROC
1910:
1930DEFPROCrb(T$,C%,N%)
1940REPEAT
1950IFLEN(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)
1960UNTILT$=""
1970ENDPROC
1980:
1990DEFPROCi(tb$)
2000CLS
2010PROCqb(tb$)
2020PRINT'CHR$(oa%);"Press SPACE to con
tinue..."
2030*FX21
2040REPEATUNTILGET=32
2050ENDPROC
2060:
2070DEFPROCub(tb$)
2080CLS
2090PROCqb(tb$)
2100PRINT'CHR$(oa%);"Press SPACE to ret
urn to BASIC"
2110*FX21
2120REPEATUNTILGET=32
2130VDU26,12
2140PROCla
2150PROCh
2160END
2170:
2180DEFFNc
2190LOCALvb%,vb$
2200CLS
2210PROCqb("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.")
2220PRINT
2230PROCqb("When you have done this, pr
ess"+STRING$(7," ")+"A if it an ADFS dis
c,"+STRING$(15," ")+"D if it is a DFS di
sc,"+STRING$(14," ")+"H if it is an HADF
S disk or"+STRING$(8," ")+"SPACE to use
the current filing system.")
2240PRINT
2250PROCqb("If in doubt, just press SPA
CE.")
2260REPEAT
2270*FX21
2280vb%=GET
2290vb$=CHR$((vb%AND&DF)-32*(vb%=32))
2300UNTILINSTR(" ADH",vb$)<>0
2310=vb$
2320:
2330DEFFNb
2340LOCALA%,Y%
2370=(USR(&FFDA)AND&FF)
2380:
2390DEFPROCd
2400SOUND1,-10,52,5
2410ENDPROC
2420:
2430DEFFNj(wb$)
2440LOCALxb%
2450xb%=OPENIN(wb$)
2460IFxb%<>0THENCLOSE#xb%
2470=(xb%<>0)
2480:
2490DEFPROCk
2500LOCALxb%,yb%,zb%
2510CLS
2520PRINTCHR$(oa%);"Please wait..."
2530xb%=OPENIN("!Mesg")
2540yb%=BGET#xb%
2550IFyb%<>0THENPROCub("The !Mesg file
on this disc is a version "+STR$(yb%)+"
file. This program can only handle versi
on 0 files.")
2560INPUT#xb%,ac$
2570INPUT#xb%,bc$
2580bc$=FNcc(bc$)
2590dc%=PTR#xb%
2600INPUT#xb%,zb%
2610ec%=PTR#xb%
2620CLOSE#xb%
2630ENDPROC
2640:
2650DEFFNcc(fc$)
2660REPEAT
2670IFRIGHT$(fc$,1)=" "THENfc$=LEFT$(fc
$,LEN(fc$)-1)
2680UNTILRIGHT$(fc$,1)<>" "
2690=fc$
2700:
2710DEFPROCl
2720LOCALxb%
2730ac$="":bc$=""
2740PROCgc
2750xb%=OPENOUT("!Mesg")
2760BPUT#xb%,0
2770PRINT#xb%,ac$
2780PRINT#xb%,LEFT$(bc$+STRING$(20," ")
,20)
2790dc%=PTR#xb%
2800PRINT#xb%,0
2810ec%=PTR#xb%
2820CLOSE#xb%
2830ENDPROC
2840:
2850DEFPROCgc
2860CLS
2870PROCqb("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.")
2880PRINT'CHR$(oa%);"ID:";CHR$(pa%);
2890ac$=FNhc(FNpa(3,3,ac$))
2900PRINT'
2910PROCqb("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.")
2920PRINT'CHR$(pa%);
2930bc$=FNpa(0,20,bc$)
2940ENDPROC
2950:
2960DEFFNpa(ic%,jc%,oa$)
2970LOCALkc%,lc%,vb%
2980kc%=POS
2990lc%=VPOS
3000PRINTLEFT$(oa$+STRING$(jc%,"."),jc%
);TAB(kc%+LEN(oa$),lc%);
3010REPEAT
3020REPEAT
3030*FX21
3040vb%=GET
3050UNTILvb%=13OR(vb%>=32ANDvb%<=127)
3060IFvb%=127ANDLEN(oa$)>0THENVDU8,46,8
:oa$=LEFT$(oa$,LEN(oa$)-1)
3070IFvb%<>127ANDvb%<>13ANDLEN(oa$)<jc%
THENVDUvb%:oa$=oa$+CHR$(vb%)
3080UNTIL(vb%=13ANDLEN(oa$)>=ic%)
3090=oa$
3100:
3110DEFFNhc(mc$)
3120LOCALnc$,oc%,pc%
3130nc$=""
3140IFmc$=""THEN=""
3150FORoc%=1TOLEN(mc$)
3160pc%=ASC(MID$(mc$,oc%,1))
3170IFpc%>=ASC"a"ANDpc%<=ASC"z"THENpc%=
pc%-32
3180nc$=nc$+CHR$(pc%)
3190NEXT
3200=nc$
3210:
3220DEFFNo
3230LOCALqc%,rc$,vb%
3240CLS
3250PRINTFNsc("Start a new message","N"
);FNsc("View/edit/print messages","V");F
Nsc("Print all the messages","P");FNsc("
Tidy the messages","T");FNsc("Re-enter y
our user ID/name","R");FNsc("Undelete de
leted messages","U");
3260PRINTFNsc("Quit the program","Q")
3270PROCqb("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.")
3280PRINT
3290PROCsb("If you select an option by
mistake, pressing ESCAPE will usually re
turn you to this menu.")
3300qc%=ja%
3310rc$="NVPTRUQ"
3320PRINTTAB(1,ja%-1);CHR$(ra%);CHR$157
;CHR$(sa%)
3330REPEAT
3340REPEAT
3350*FX21
3360vb%=GETAND&DF
3370UNTILINSTR(CHR$138+CHR$139+CHR$13+r
c$,CHR$(vb%))<>0
3380ja%=INSTR(rc$,CHR$(vb%)):IFja%=0THE
Nja%=qc%
3390IFvb%=138ANDja%<LEN(rc$)THENja%=ja%
+1
3400IFvb%=139ANDja%>1THENja%=ja%-1
3410IFja%<>qc%THENPRINTTAB(1,qc%-1);"
";CHR$(qa%);TAB(1,ja%-1);CHR$(ra%);CHR$1
57;CHR$(sa%):qc%=ja%
3420UNTILvb%=13
3430=ja%
3440:
3450DEFFNsc(tc$,rc$)=" "+CHR$(qa%)+tc
$+STRING$(28-LEN(tc$)," ")+rc$+" "+CHR$
156
3460:
3470DEFPROCp
3480LOCALuc$,vc%
3490CLS
3500IFFNwc>=ba%THENPROCi("Sorry, there
is a limit of "+STR$(ba%)+" messages."):
ENDPROC
3510PROCqb("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.")
3520PRINT'CHR$(oa%);"ID:";CHR$(pa%);
3530*FX229
3540uc$=FNhc(FNpa(3,3,""))
3550*FX229,1
3560PROCob
3570vc%=(uc$<>"CCC")
3580IFuc$="999"THENxc$="(all members)"E
LSExc$=""
3590IFvc%THENPROCyc(CHR$(ta%)+"To:
"+CHR$(ua%)+uc$+" "+xc$,fa%)
3600IFbc$=""THENzc$=""ELSEzc$="("+bc$+"
)"
3610PROCyc(CHR$(ta%)+"From: "+CHR$(ua
%)+ac$+" "+zc$,fa%-40*vc%)
3620PROCyc(CHR$(ta%)+"Subject:"+CHR$(ua
%),fa%+40-40*vc%)
3630uc$=FNad(10,1-vc%,uc$)
3640PROCbd(uc$)
3650ENDPROC
3660:
3670DEFPROCbd(cd$)
3680LOCALxb%,zb%
3690PRINTTAB(0,0);CHR$(eb%);"Please wai
t, saving message...";
3700xb%=OPENUP("!Mesg")
3730PTR#xb%=EXT#xb%
3740PRINT#xb%,cd$
3750BPUT#xb%,0
3760PROCdd(FNkb+1,xb%)
3770PTR#xb%=dc%
3780INPUT#xb%,zb%
3790PTR#xb%=dc%
3800PRINT#xb%,zb%+1
3810CLOSE#xb%
3820ca%=TRUE
3830ENDPROC
3840:
3850DEFFNkb
3860!&70=fa%+aa%+1
3870!&72=fa%
3880CALLkb%
3890!&72=0
3900=(!&70)-fa%
3910:
3920DEFPROCdd(ed%,xb%)
3930LOCALA%,X%,Y%
3940ea%?0=xb%
3950ea%!1=fa%
3960ea%!5=ed%
3970A%=2
3980X%=ea%MOD256
3990Y%=ea%DIV256
4000CALL&FFD1
4010BPUT#xb%,152
4020ENDPROC
4030:
4040DEFFNwc
4050LOCALxb%
4060IFNOTca%ANDNOTda%THEN=fd%
4070xb%=OPENIN("!Mesg")
4080PTR#xb%=dc%
4090INPUT#xb%,fd%
4100CLOSE#xb%
4110da%=FALSE
4120=fd%
4130:
4140DEFPROCyc(gd$,hd%)
4150LOCALid%
4160id%=hd%?LEN(gd$)
4170$hd%=gd$
4180hd%?LEN(gd$)=id%
4190ENDPROC
4200:
4210DEFPROCob
4220!&70=fa%
4230!&72=fa%+aa%+1
4240CALLob%
4250ENDPROC
4260:
4270DEFFNad(jd%,kd%,cd$)
4280LOCALld%,md%,nd%,od%,vb%
4290VDU22,7
4300ld%=0:md%=0:nd%=(aa%DIV40)-25
4310od%=FALSE
4320PROCcb(cd$,od%)
4330PROCpd(ld%)
4340*FX21
4350REPEAT
4360VDU31,jd%,kd%
4370REPEAT
4380vb%=GET
4390UNTIL(vb%>=32ANDvb%<=127)OR(vb%>=13
6ANDvb%<=139)OR(vb%>=200ANDvb%<=229)ORvb
%=13ORvb%=27ORvb%=20
4410IFvb%=ASC"£"THENvb%=35ELSEIFvb%=ASC
"#"THENvb%=95ELSEIFvb%=ASC"`"THENvb%=96
4430IFvb%>=32ANDvb%<=126ANDNOTod%THEN?(
jd%+kd%*40+&7C00)=vb%:fa%?(jd%+(kd%+ld%)
*40)=vb%:jd%=jd%+1:IFjd%=40ANDNOT(ld%=nd
%ANDkd%=23)ANDvb%<>32THENjd%=FNqd(kd%,ld
%):kd%=kd%+1:md%=-1
4440IFvb%=32ANDjd%=40THENjd%=39:vb%=13
4450IFvb%>=200ANDvb%<=229THENrd%=FNsd(v
b%,jd%,kd%):jd%=jd%-rd%:IFjd%=40ANDNOT(l
d%=nd%ANDkd%=23)THENjd%=0:kd%=kd%+1:md%=
-1
4460IFvb%=127ANDjd%>0THEN!&70=fa%+(kd%+
ld%)*40:?&72=jd%:CALLib%:!&70=&7C00+kd%*
40:?&72=jd%:CALLib%:jd%=jd%-1
4470IFvb%=13THENIFNOT(ld%=nd%ANDkd%=23)
THENfa%?((kd%+1+ld%)*40)=fa%?((kd%+ld%)*
40):jd%=1:kd%=kd%+1:md%=-1
4480IFvb%=209THENod%=NOTod%:PROCcb(cd$,
od%)
4490IFvb%=219THENcd$=FNtd(cd$):PROCcb(c
d$,od%)
4500IFINSTR("QWASZXqwaszx",CHR$(vb%))<>
0ANDod%THENPROCod(jd%,kd%,ld%,vb%)
4510IFvb%=226THENPROCjb(jd%,kd%,ld%)
4520IFvb%=227THENPROCmb(kd%,ld%):md%=-1
4530IFvb%=228THENPROCnb(kd%,ld%):md%=-1
4540IFvb%=20THENPROCud(jd%,kd%,ld%,nd%)
:md%=-1
4550IFvb%=136THENjd%=jd%-1
4560IFvb%=137THENjd%=jd%+1
4570IFvb%=138THENkd%=kd%+1
4580IFvb%=139THENkd%=kd%-1
4590IFjd%<0THENjd%=39:kd%=kd%-1
4600IFjd%>39THENjd%=0:kd%=kd%+1
4610IFkd%<0THENkd%=0:ld%=ld%+(ld%>0)
4620IFkd%>23THENkd%=23:ld%=ld%-(ld%<nd%
)
4630IFmd%<>ld%THENPROCpd(ld%):md%=ld%:P
ROCcb(cd$,od%)
4640UNTILvb%=27ANDNOTod%
4650PROCw
4660PROCy
4670=cd$
4680:
4690DEFPROCjb(jd%,kd%,ld%)
4700IFjd%=39THENfa%?(39+(kd%+ld%)*40)=3
2:?(&7C00+39+kd%*40)=32:ENDPROC
4710!&70=fa%+(kd%+ld%)*40
4720?&72=jd%
4730CALLjb%
4740!&70=&7C00+kd%*40
4750?&72=jd%
4760CALLjb%
4770ENDPROC
4780:
4790DEFPROCmb(kd%,ld%)
4800LOCALvd%,wd%
4810vd%=FNkb
4820IFvd%>=aa%-80THENPROCd:ENDPROC
4830IF(kd%+ld%)*40>vd%THENENDPROC
4840!&70=fa%+(kd%+ld%-1)*40
4850!&72=fa%+(vd%DIV40)*40
4860CALLmb%
4870FORwd%=(kd%+ld%)*40TO39+(kd%+ld%)*4
0
4880fa%?wd%=32
4890NEXT
4900ENDPROC
4910:
4920DEFPROCnb(kd%,ld%)
4930LOCALvd%,wd%
4940vd%=FNkb
4950IF(kd%+ld%)*40>vd%THENENDPROC
4960IFvd%>=(kd%+ld%)*40ANDvd%<=39+(kd%+
ld%)*40THENFORwd%=(kd%+ld%)*40TO39+(kd%+
ld%)*40:fa%?wd%=32:NEXT:ENDPROC
4970!&70=fa%+(kd%+ld%)*40
4980!&72=fa%+(vd%DIV40)*40
4990CALLnb%
5000FORwd%=(vd%DIV40)*40TO(vd%DIV40)*40
+40
5010fa%?wd%=32
5020NEXT
5030ENDPROC
5040:
5050DEFPROCcb(cd$,od%)
5060PRINTTAB(0,24);SPC(39);TAB(0,24);CH
R$(cb%);"Message to ";cd$;TAB(29,24);
5070IFod%THENPRINT"Pixel edit";ELSEPRIN
TSPC(10);
5080ENDPROC
5090:
5100DEFFNqd(kd%,ld%)
5110LOCALxd%,yd%
5120xd%=40
5130REPEAT
5140xd%=xd%-1
5150UNTILfa%?(xd%+(kd%+ld%)*40)=32ORxd%
=0
5160IFfa%?(xd%+(kd%+ld%)*40)<>32THENfa%
?((kd%+1+ld%)*40)=fa%?((kd%+ld%)*40):=1
5170FORyd%=xd%+1TO39
5180fa%?(yd%-xd%+(kd%+1+ld%)*40)=fa%?(y
d%+(kd%+ld%)*40)
5190fa%?(yd%+(kd%+ld%)*40)=32
5200NEXT
5210fa%?((kd%+1+ld%)*40)=fa%?((kd%+ld%)
*40)
5220=40-xd%
5230:
5240DEFPROCpd(ld%)
5250!&70=fa%+ld%*40
5260CALLpb%
5270ENDPROC
5280:
5290DEFFNsd(vb%,jd%,kd%)
5300LOCALzd%
5310zd%=-1
5320IFvb%>=200ANDvb%<=208THENzd%=vb%-71
5330IFvb%>=210ANDvb%<=216THENzd%=vb%-65
5340IFvb%>=217ANDvb%<=218THENzd%=vb%-61
5350IFvb%>=220ANDvb%<=221THENzd%=vb%-67
5360IFvb%>=222ANDvb%<=223THENzd%=vb%-64
5370IFvb%>=224ANDvb%<=225THENzd%=365-vb
%
5380IFzd%<>-1THEN?(jd%+kd%*40+&7C00)=zd
%:fa%?(jd%+(kd%+ld%)*40)=zd%:=TRUE
5390=FALSE
5400:
5410DEFFNtd(cd$)
5420PRINTTAB(0,24);SPC(39);TAB(0,24);CH
R$(db%);"Send this message to:";CHR$(pa%
);
5430=FNhc(FNpa(3,3,cd$))
5440:
5450DEFPROCod(jd%,kd%,ld%,vb%)
5460LOCALae%,be%,nc%
5470ae%=2^((INSTR("QWASZ X",CHR$(vb%AND
&DF)))-1)
5480be%=fa%+jd%+(kd%+ld%)*40
5490IF(?be%AND160)<>160THEN?be%=?be%OR1
60
5500IF(?be%ANDae%)=ae%THENnc%=?be%AND(2
55-ae%)ELSEnc%=?be%ORae%
5510?be%=nc%
5520?(&7C00+jd%+kd%*40)=nc%
5530ENDPROC
5540:
5550DEFPROCud(jd%,kd%,ld%,nd%)
5560LOCALed%,oa$
5570PROCw
5580PROCy
5590PRINTCHR$(oa%);"Are you sure you wa
nt to read in"'CHR$(oa%);"a text file?";
CHR$(pa%);
5600IFNOTFNceTHENVDU22,7:ENDPROC
5610PRINT'
5620PROCqb("Please insert the disc cont
aining the text file into drive 0 and pr
ess SPACE...")
5630*FX21
5640REPEATUNTILGET=32
5650ed%=10
5660IFFNb=4THENPROCf:ed%=7
5670IFFNb=8THENPROCe
5675IFFNb=16THENPROCha
5680PRINT
5690PRINTCHR$(oa%);"Filename:";CHR$(pa%
);
5700oa$=FNpa(0,ed%,"")
5710IFoa$<>""THENPROCde(jd%,kd%,ld%,nd%
,oa$)
5720PROCqb("Please insert your submissi
on disc in drive 0 and press SPACE...")
5730*FX21
5740REPEATUNTILGET=32
5750IFFNb=4THENPROCf
5760IFFNb=8THENPROCe
5765IFFNb=16THENPROCha
5770VDU22,7
5780ENDPROC
5790:
5800DEFPROCde(jd%,kd%,ld%,nd%,oa$)
5810LOCALxb%,ee$,id%,fe%
5820xb%=OPENIN(oa$)
5830IFxb%=0THENPRINT':PROCqb("The file
"+oa$+" is not present on this disc."):P
RINT:ENDPROC
5840IFEOF#xb%THENCLOSE#xb%:ENDPROC
5850PRINT''CHR$(oa%);"Please wait..."'
5860REPEAT
5870ee$=""
5880REPEAT
5890id%=BGET#xb%
5910IFid%=ASC"£"THENid%=35ELSEIFid%=ASC
"#"THENid%=95ELSEIFid%=ASC"`"THENid%=96
5920IFid%>=33ANDid%<=126THENee$=ee$+CHR
$(id%)
5930UNTILid%<33ORid%>126OREOF#xb%
5940fe%=-1
5950IFjd%+LEN(ee$)<=39THENfe%=jd%:ge%=k
d%:he%=ld%:jd%=jd%+LEN(ee$)+1
5960IFfe%=-1THENjd%=1:kd%=kd%+1:gb%=?(f
a%+(kd%-1+ld%)*40):IFgb%>=129ANDgb%<=135
THEN?(fa%+(kd%+ld%)*40)=gb%
5970IFkd%>23THENkd%=23:ld%=ld%-(ld%<nd%
)
5980IFfe%=-1THENfe%=jd%:ge%=kd%:he%=ld%
:jd%=jd%+LEN(ee$)+1
5990$(fa%+fe%+(ge%+he%)*40)=ee$:?(fa%+f
e%+(ge%+he%)*40+LEN(ee$))=32
6000IFid%=13ORid%=10THENjd%=1:kd%=kd%+1
:gb%=?(fa%+(kd%-1+ld%)*40):IFgb%>=129AND
gb%<=135THEN?(fa%+(kd%+ld%)*40)=gb%
6010UNTILEOF#xb%
6020CLOSE#xb%
6030ENDPROC
6040:
6050DEFPROCie
6060LOCALxb%,zb%,je%,ke%,le%,me$,ne%,cd
$
6070xb%=OPENIN("!Mesg")
6080PTR#xb%=dc%
6090INPUT#xb%,zb%
6100PTR#xb%=ec%
6110FORje%=1TOzb%
6120REPEAT
6130ke%=PTR#xb%
6140INPUT#xb%,cd$
6150le%=BGET#xb%:le%=(le%<>0)
6160ne%=FNoe(xb%)
6170me$=FNpe(22)
6180UNTILNOTle%
6190ga$(je%)=cd$
6200ha%(je%)=ke%
6210ia$(je%)=me$
6220NEXT
6230CLOSE#xb%
6240ENDPROC
6250:
6260DEFFNpe(qe%)
6270LOCALre$
6280fa%?128=13
6290re$="Subject:"
6300IFINSTR($fa%,re$)=0THENre$="Article
:"
6310IFINSTR($fa%,re$)=0THEN="No subject
?"
6320=MID$($fa%,INSTR($fa%,re$)+9,qe%)
6330:
6340DEFPROCq
6350LOCALzb%,se%,qc%,te%,ue%,ve%,we%,xe
%,vb%,ye%
6360CLS
6370zb%=FNwc
6380IFzb%=0THENPROCi("There are no mess
ages on this disc."):ENDPROC
6390REPEAT
6400CLS
6410IFca%THENPROCqb("Please wait, scann
ing messages..."):PROCie:ca%=FALSE
6420se%=1
6430qc%=1
6440te%=1
6450ue%=-1
6460REPEAT
6470REPEAT
6480IFte%=ue%THENqc%=1:te%=1
6490CLS
6500PRINTTAB(0,16);CHR$(va%);"Use:";CHR
$(wa%);"V";CHR$(va%);"iew,";CHR$(wa%);"E
";CHR$(va%);"dit,";CHR$(wa%);"P";CHR$(va
%);"rint,";CHR$(wa%);"D";CHR$(va%);"elet
e";
6510VDU30
6520ve%=se%+13:IFve%>zb%THENve%=zb%
6530FORwe%=se%TOve%
6540PRINTFNsc(ga$(we%)+": "+LEFT$(ia$(w
e%),22)," ");
6550NEXT
6560xe%=ve%-se%+1:ue%=xe%+1
6570IFzb%>14THENPRINTFNsc("More message
s..."," ");:xe%=xe%+1
6580PRINTTAB(1,te%-1);CHR$(ra%);CHR$157
;CHR$(sa%)
6590REPEAT
6600REPEAT
6610*FX21
6620vb%=GETAND&DF
6630UNTILINSTR(CHR$138+CHR$139+CHR$13+C
HR$27+"PVED",CHR$(vb%))<>0
6640IFvb%=138ANDte%<xe%THENte%=te%+1
6650IFvb%=139ANDte%>1THENte%=te%-1
6660IFte%<>qc%THENPRINTTAB(1,qc%-1);"
";CHR$(qa%);TAB(1,te%-1);CHR$(ra%);CHR$1
57;CHR$(sa%):qc%=te%
6670UNTILINSTR(CHR$13+CHR$27+"PVED",CHR
$(vb%))<>0
6680IFte%=ue%THENse%=se%+14:IFse%>zb%TH
ENse%=1
6690UNTILte%<ue%ORvb%=27
6700ye%=te%+se%-1
6710IFvb%=13ORvb%=ASC("V")THENPRINTTAB(
0,16);SPC(35);TAB(0,16);CHR$(ya%);"Loadi
ng message, please wait...";:ed%=FNze(ye
%)
6720IFvb%=13ORvb%=ASC("V")THENVDU22,7,2
3;8202;0;0;0;:PRINTTAB(0,24);FNxa(ye%,zb
%,cd$);:?&74=fa%MOD256:?&75=fa%DIV256:ve
%=fa%+FNaf(ed%):?&76=ve%MOD256:?&77=ve%D
IV256:CALLhb%:PROCy
6730IFvb%=ASC("P")THENPROCbf(ye%)
6740IFvb%=ASC("D")THENca%=FNcf(ye%)
6750IFvb%=ASC("E")THENca%=FNdf(ye%)
6760zb%=FNwc
6770UNTILca%ORvb%=27ORzb%=0
6780UNTILvb%=27ORzb%=0
6790ENDPROC
6800:
6810DEFFNze(ef%)
6820LOCALxb%,le%,ed%
6830xb%=OPENIN("!Mesg")
6840PTR#xb%=ha%(ef%)
6850INPUT#xb%,cd$
6860le%=BGET#xb%
6870ed%=FNoe(xb%)
6880CLOSE#xb%
6890=ed%
6900:
6910DEFFNoe(xb%)
6920LOCALA%,X%,Y%
6930ea%?0=xb%
6940ea%!1=fa%
6950ea%!5=aa%+1
6960A%=4
6970X%=ea%MOD256
6980Y%=ea%DIV256
6990CALL&FFD1
7000!&70=fa%-1
7010!&72=fa%+aa%+1
7020CALLlb%
7030!&76=0
7040PTR#xb%=PTR#xb%-(aa%-ea%!5)+(!&74-f
a%)
7050=(!&74-fa%)
7060:
7070DEFFNxa(ef%,ff%,cd$)=CHR$(xa%)+"Thi
s is message "+STR$(ef%)+" of "+STR$(ff%
)+", to "+cd$
7080:
7090DEFFNaf(ed%)
7100IFed%<&3C0THENed%=&3C0
7110IF(ed%MOD40)<>0THENed%=ed%+(40-(ed%
MOD40))
7120=ed%-&3C0
7130:
7160DEFFNcf(ef%)
7170PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(za%);"Delete this - are you sure?";CH
R$(pa%);
7180IFNOTFNceTHEN=FALSE
7190PROCgf(ef%,FALSE)
7200=TRUE
7210:
7220DEFPROCgf(ef%,hf%)
7230LOCALxb%,cd$
7240xb%=OPENUP("!Mesg")
7250PTR#xb%=ha%(ef%)
7260INPUT#xb%,cd$
7270IFhf%THENBPUT#xb%,128ELSEBPUT#xb%,2
55
7280PTR#xb%=dc%
7290INPUT#xb%,zb%
7300PTR#xb%=dc%
7310PRINT#xb%,zb%-1
7320CLOSE#xb%
7330ENDPROC
7340:
7370DEFFNdf(ef%)
7380LOCALed%,cd$
7390PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(bb%);"Edit this - are you sure?";CHR$
(pa%);
7400IFNOTFNceTHEN=FALSE
7410PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ya%);"Loading message, please wait...
";
7420ed%=FNze(ef%)
7450cd$=FNad(1,4,ga$(ef%))
7460PROCbd(cd$)
7470PROCgf(ef%,TRUE)
7480=TRUE
7490:
7500DEFFNce
7510LOCALvb%
7520REPEAT
7530*FX21
7540vb%=GETAND&DF
7550UNTILvb%=ASC("Y")ORvb%=ASC("N")
7560IFvb%=ASC("Y")THENPRINT"Yes";:=TRUE
7570PRINT"No";
7580=FALSE
7590:
7600DEFPROCbf(ef%)
7610LOCALed%
7620PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ab%);"Print this - are you sure?";CHR
$(pa%);
7630*FX229
7640IFNOTFNceTHENPROCg("FX229,1"):ENDPR
OC
7650PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ya%);"Loading message, please wait...
";
7660ed%=FNze(ef%)
7670PRINTTAB(0,16);SPC(35);TAB(0,16);CH
R$(ab%);"Printing, please wait...";
7680PROCif(ed%)
7690*FX229,1
7700ENDPROC
7710:
7720DEFPROCr
7730LOCALzb%,qb%
7740CLS
7750zb%=FNwc
7760IFzb%=0THENPROCi("There are no mess
ages on this disc."):ENDPROC
7770PRINTCHR$(oa%);"Are you sure you wa
nt to print the"'CHR$(oa%);"messages?";C
HR$(pa%);
7780*FX229
7790IFNOTFNceTHENPROCg("FX229,1"):ENDPR
OC
7800PRINT'
7810IFca%THENPRINTCHR$(oa%);"Please wai
t, scanning messages..."':PROCie:ca%=FAL
SE
7820PROCqb("Please wait, printing - pre
ss ESCAPE to stop...")
7830FORqb%=1TOzb%
7840PROCif(FNze(qb%))
7850NEXT
7860*FX229,1
7870ENDPROC
7880:
7890DEFPROCif(ed%)
7900LOCALqb%,pc%
7910*FX3,10
7920FORqb%=0TOed%-1
7930pc%=fa%?qb%
7940IFpc%>=32ANDpc%<=126THENVDUpc%ELSEV
DU32
7950IF(qb%MOD40)=39ORqb%=ed%-1THENPRINT
7960NEXT
7970PRINT
7980*FX3
7990ENDPROC
8000:
8010DEFPROCt
8020LOCALjf$,kf$,xb%
8030jf$=ac$:kf$=bc$
8040PROCgc
8050IFac$=jf$ANDbc$=kf$THENENDPROC
8060xb%=OPENUP("!Mesg")
8070PTR#xb%=1
8080PRINT#xb%,ac$
8090PRINT#xb%,LEFT$(bc$+STRING$(20," ")
,20)
8100CLOSE#xb%
8110ENDPROC
8120:
8130DEFPROCs
8140LOCALzb%,lf%,mf%,nf$,of$,yd%,cd$,le
%,ed%
8150CLS
8160PRINTCHR$(oa%);"Are you sure you wa
nt to tidy the"'CHR$(oa%);"messages?";CH
R$(pa%);
8170*FX229
8180IFNOTFNceTHENPROCg("FX229,1"):ENDPR
OC
8190*FX229,1
8200PRINT''CHR$(oa%);"Please wait...";
8210ca%=TRUE
8220IFFNj("!MesgB")THENPROCg("Delete !M
esgB")
8230*Rename !Mesg !MesgB
8240lf%=OPENIN("!MesgB")
8250mf%=OPENOUT("!Mesg")
8260BPUT#mf%,BGET#lf%
8270INPUT#lf%,nf$:PRINT#mf%,nf$
8280INPUT#lf%,of$:PRINT#mf%,of$
8290INPUT#lf%,zb%:PRINT#mf%,zb%
8300IFzb%=0THENCLOSE#lf%:CLOSE#mf%:PROC
g("Delete !MesgB"):ENDPROC
8310FORyd%=1TOzb%
8320REPEAT
8330INPUT#lf%,cd$
8340le%=BGET#lf%:le%=(le%<>0)
8350ed%=FNoe(lf%)
8360IFNOTle%THENPRINT#mf%,cd$:BPUT#mf%,
0:PROCdd(ed%+1,mf%)
8370UNTILNOTle%
8380NEXT
8390CLOSE#lf%
8400CLOSE#mf%
8410*Delete !MesgB
8420ENDPROC
8430:
8440DEFPROCu
8450LOCALzb%,ue$,xb%,ke%,le%,ne%,me$,pf
%
8460CLS
8470zb%=FNwc
8480IFzb%=ba%THENPROCi("Sorry, there is
a limit of "+STR$(ba%)+" messages."):EN
DPROC
8490*FX229
8500PRINTCHR$(oa%);"Please wait..."'
8510ue$=""
8520xb%=OPENUP("!Mesg")
8530PTR#xb%=ec%
8540IFEOF#xb%THENPROCi("There are no me
ssages on this disc."):CLOSE#xb%:ENDPROC
8550REPEAT
8560REPEAT
8570INPUT#xb%,cd$
8580ke%=PTR#xb%
8590le%=BGET#xb%
8600le%=(le%=255)
8610ne%=FNoe(xb%)
8620me$=FNcc(FNpe(30))
8630pf%=(PTR#xb%=EXT#xb%)
8660UNTILle%ORpf%
8670IFle%THENue$="more ":zb%=FNqf(xb%,k
e%,cd$,me$,zb%)
8680UNTILpf%ORzb%=ba%
8690CLOSE#xb%
8700*FX229,1
8710IFzb%=ba%THENPROCqb("There are now
the maximum "+STR$(ba%)+" messages. Pres
s SPACE to continue...")ELSEPROCqb("Ther
e are no "+ue$+"deleted messages. Press
SPACE to continue...")
8720*FX21
8730REPEATUNTILGET=32
8740ENDPROC
8750:
8760DEFFNqf(xb%,ke%,cd$,me$,zb%)
8770LOCALrf%
8780PROCsb("Undelete the message to "+c
d$+" with subject '"+me$+"'?")
8790IFPOS>31THENPRINT
8800VDUpa%
8810IFNOTFNceTHENPRINT':=zb%
8820PRINT'
8830*FX229,1
8840rf%=PTR#xb%
8850PTR#xb%=ke%
8860BPUT#xb%,0
8870PTR#xb%=dc%
8880PRINT#xb%,zb%+1
8890PTR#xb%=rf%
8900*FX229
8910ca%=TRUE
8920=zb%+1
8930:
8940DEFPROCm
8950DIMM%-1
8960IFHIMEM-M%>=256THENENDPROC
8970IFHIMEM-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
8980PROCi("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.")
8990ENDPROC