8-Bit Software Online Conversion
8BS Messaging System. V 1.04 - Listing
300:
310*FX119
320MODE7
330PROCa
340PROCb
350PROCc
360PROCd
370ONERRORIFERR=17THENPROCe("FX229,1")
:GOTO380ELSEVDU6:CLOSE#0:MODE7:REPORT:PR
INT" at line ";ERL:PROCe("KEY0 LIST "+ST
R$(ERL)+"|M"):PROCe("FX21"):PROCe("FX138
,0,128"):PROCf:END
380REPEAT
390g%=FNh
400IFg%=1THENPROCi
410IFg%=2THENPROCj
420IFg%=3THENPROCk
430IFg%=4THENPROCl
440IFg%=5THENPROCm
450UNTILg%=6
460MODE7
470PROCf
480END
490:
500DEFPROCb
510*FX225,3
520*FX226,3
530*FX227,3
540*FX229,1
550*FX4,1
560ENDPROC
570:
580DEFPROCf
590*FX225,1
600*FX226,128
610*FX227,144
620*FX229,0
630*FX4,0
640ENDPROC
650:
660DEFPROCc
670n%=4096
680o%=25
690DIMp%(o%),q%(6),r%256,s%n%
700PROCt
710PROCu
720PROCv
730ENDPROC
740:
750:
760DEFPROCa
770VDU23,1,0;0;0;0;
780ENDPROC
790:
800DEFPROCw
810VDU23,1,1;0;0;0;
820ENDPROC
830:
840DEFFNS
850="SendMes"
860:
870DEFPROCt
880x%=6
890y%=3
900z%=3
910aa%=7
920ba%=7
930ca%=3
940da%=7
950ea%=4
960fa%=3
970ga%=7
980ha%=7
990ia%=2
1000ja%=3
1010ka%=3
1020la%=7
1030ma%=3
1040na%=7
1050oa%=7
1060pa%=3
1070qa%=3
1080m%=7
1090ra%=3
1100sa%=3
1110ta%=7
1120ENDPROC
1130:
1140DEFPROCu
1150LOCALua%
1160VDU26,12
1170PRINT" ";CHR$(144+x%);"¶/
//////%¶/////////////////¶";
1180PRINTCHR$(144+x%);"¶///////////*///
///// ";CHR$(144+x%);"¶";
1190PRINTCHR$(144+x%);"¶";CHR$(144+y%);
"jk 74$5 j£`p`pj 0 0p0p`p ";CH
R$(144+x%);"¶";
1200PRINTCHR$(144+x%);"¶";CHR$(144+y%);
"jk"!7457 "kjjj$j!545=55j. ";CH
R$(144+x%);"¶";
1210PRINTCHR$(144+x%);"
""£ £ !£! "£"£" "!££!!!!"£ ";CH
R$(145);" ";
1220FORua%=1TO18
1230PRINTCHR$(144+x%);"¶";SPC(36);CHR$(
144+x%);"¶";
1240NEXT
1250PRINTCHR$(144+x%);"¶|||||||||||||||
||||||||||||||||||||||¶";
1260VDU28,2,22,37,5
1270ENDPROC
1280:
1290DEFPROCe($r%)
1300LOCALX%,Y%
1310X%=r%MOD256
1320Y%=r%DIV256
1330CALL&FFF7
1340ENDPROC
1350:
1360DEFPROCd
1370REPEAT
1380CLS
1390PROCz
1400PRINTTAB(0,2);CHR$(128+aa%);"Please
insert your 8BS submissions"'CHR$(128+a
a%);"disc into drive 0 and press SPACE"'
CHR$(128+aa%);"when you are ready..."
1410PRINT'CHR$(128+aa%);"The disc must
be in the drive at"'CHR$(128+aa%);"all t
imes when using this program."
1420*FX21
1430REPEATUNTILGET=32
1440IFFNva=8THENPROCe("MOUNT 0")ELSEPRO
Ce("DRIVE 0")
1450IFFNwa("!Mess")THENPRINT'CHR$(128+a
a%);"This disc has a !Mess file. You may
";CHR$(128+aa%);"wish to read the accomp
anying"'CHR$(128+aa%);"article before co
ntinuing."
1460IFFNwa("!Mess")THENPRINT'CHR$(128+a
a%);"Press SPACE to continue...":PROCe("
FX21"):REPEATUNTILGET=32
1470IFNOTFNwa("!Mesg")THENPROCbaELSEPRO
Cxa
1480UNTILya%=0
1490ENDPROC
1500:
1510DEFPROCxa
1520PROCza
1530IFya%=0THENENDPROC
1540PRINT'CHR$(128+aa%);"This program c
an only handle"'CHR$(128+aa%);"version 0
files."
1550PRINT'CHR$(128+aa%);"Press SPACE to
continue..."
1560*FX21
1570REPEATUNTILGET=32
1580ENDPROC
1590:
1600DEFPROCz
1610PRINTTAB(5,0);CHR$(128+z%);"8BS mes
saging system 1.04"
1620ENDPROC
1630:
1640DEFFNva
1650LOCALA%,Y%
1660A%=0
1670Y%=0
1680=(USR(&FFDA)AND&FF)
1690:
1700DEFFNwa(ab$)
1710LOCALbb%
1720bb%=OPENIN(ab$)
1730IFbb%=0THEN=FALSE
1740CLOSE#bb%
1750=TRUE
1760:
1770DEFPROCba
1780LOCALbb%,cb%
1790CLS
1800PROCz
1810PRINTTAB(0,2);CHR$(128+ba%);"Please
enter your three-digit user"'CHR$(128+b
a%);"ID:";CHR$(128+ca%);
1820db$=FNeb(FNca(3,3))
1830PRINT''CHR$(128+ba%);"Please enter
your name as you wish"'CHR$(128+ba%);"it
to appear in message headings:"'';:cb%=
VPOS
1840PRINT''CHR$(128+ba%);"(just press R
ETURN if you wish to"'CHR$(128+ba%);"rem
ain anonymous)"
1850PRINTTAB(0,cb%);CHR$(128+ca%);
1860fb$=FNca(0,20)
1870bb%=OPENOUT("!Mesg")
1880BPUT#bb%,0:ya%=0
1890PRINT#bb%,db$
1900PRINT#bb%,LEFT$(fb$+STRING$(20," ")
,20)
1910gb%=PTR#bb%
1920PRINT#bb%,0
1930CLOSE#bb%
1940ENDPROC
1950:
1960DEFPROCza
1970LOCALbb%
1980bb%=OPENIN("!Mesg")
1990ya%=BGET#bb%
2000IFya%<>0THENCLOSE#bb%:ENDPROC
2010INPUT#bb%,db$
2020INPUT#bb%,fb$
2030REPEAT
2040IFRIGHT$(fb$,1)=" "THENfb$=LEFT$(fb
$,LEN(fb$)-1)
2050UNTILRIGHT$(fb$,1)<>" "
2060gb%=PTR#bb%
2070CLOSE#bb%
2080ENDPROC
2090:
2100DEFFNeb(hb$)
2110LOCALib$,jb%,kb%
2120ib$=""
2130FORjb%=1TOLEN(hb$)
2140kb%=ASC(MID$(hb$,jb%,1))
2150IFkb%>=ASC("a")ANDkb%<=ASC("z")THEN
kb%=kb%-32
2160ib$=ib$+CHR$(kb%)
2170NEXT
2180=ib$
2190:
2200DEFFNca(lb%,mb%)
2210LOCALjb%,nb%,hb$,ob%
2220jb%=POS
2230nb%=VPOS
2240hb$=""
2250REPEAT
2260REPEAT
2270*FX21
2280ob%=GET
2290UNTILob%=13OR(ob%>=32ANDob%<=127)
2300IFob%=127ANDLEN(hb$)>0THENVDU127:hb
$=LEFT$(hb$,LEN(hb$)-1)
2310IFob%<>127ANDob%<>13ANDLEN(hb$)<mb%
THENVDUob%:hb$=hb$+CHR$(ob%)
2320UNTIL(ob%=13ANDLEN(hb$)>=lb%)
2330=hb$
2340:
2350DEFFNh
2360LOCALpb%,ob%
2370CLS
2380PROCz
2390PRINTTAB(3,2);CHR$(128+da%);"Start
a new message";TAB(32,2);"N"
2400PRINTTAB(3,3);CHR$(128+da%);"View/e
dit the messages";TAB(32,3);"V"
2410PRINTTAB(3,4);CHR$(128+da%);"Tidy t
he messages";TAB(32,4);"T"
2420PRINTTAB(3,5);CHR$(128+da%);"Re-ent
er your user ID/name";TAB(32,5);"R"
2430PRINTTAB(3,6);CHR$(128+da%);"Undele
te deleted messages";TAB(32,6);"U"
2440PRINTTAB(3,7);CHR$(128+da%);"Quit t
o BASIC";TAB(32,7);"Q"
2450PRINTTAB(0,9);CHR$(128+ga%);"Use th
e cursor keys to move the bar";CHR$(128+
ga%);"and press RETURN to select, or use
"'CHR$(128+ga%);"the appropriate key sho
rtcut."
2460pb%=1
2470PRINTTAB(1,pb%+1);CHR$(128+ea%);CHR
$(157);CHR$(128+fa%);TAB(35,pb%+1);CHR$1
56;
2480REPEAT
2490REPEAT
2500*FX21
2510ob%=GET
2520UNTILINSTR("NVTRUQnvtruq"+CHR$(138)
+CHR$(139)+CHR$(13),CHR$(ob%))>0
2530PRINTTAB(1,pb%+1);CHR$(128+da%);"
"
2540IFob%=138THENIFpb%<6THENpb%=pb%+1
2550IFob%=139THENIFpb%>1THENpb%=pb%-1
2560IFob%>=ASC("a")ANDob%<=ASC("z")THEN
ob%=ob%-32
2570IFob%=ASC("N")THENpb%=1
2580IFob%=ASC("V")THENpb%=2
2590IFob%=ASC("T")THENpb%=3
2600IFob%=ASC("R")THENpb%=4
2610IFob%=ASC("U")THENpb%=5
2620IFob%=ASC("Q")THENpb%=6
2630PRINTTAB(1,pb%+1);CHR$(128+ea%);CHR
$(157);CHR$(128+fa%);TAB(35,pb%+1);CHR$1
56;
2640UNTILob%=13
2650=pb%
2660:
2670DEFPROCi
2680LOCALjb%,nb%,qb$,rb%,sb$
2690CLS
2700PROCz
2710bb%=OPENIN("!Mesg")
2720PTR#bb%=gb%
2730INPUT#bb%,rb%
2740CLOSE#bb%
2750IFrb%=o%THENPRINTCHR$(128+ha%);"Sor
ry - you already have ";o%'CHR$(128+ha%)
;"messages!"''CHR$(128+ha%);"Press SPACE
to return to the menu..";:PROCe("FX21")
:REPEATUNTILGET=32:ENDPROC
2760PROCtb
2770PRINTTAB(0,2);CHR$(128+ha%);"Please
enter the user ID of the"'CHR$(128+ha%)
;"recipient:";CHR$(128+ca%);
2780jb%=POS
2790nb%=VPOS
2800PRINT''CHR$(128+ha%);"(Use 999 for
all users and CCC for"'CHR$(128+ha%);"pr
ogram comments)"
2810PRINTTAB(jb%,nb%);
2820*FX229,0
2830qb$=FNeb(FNca(3,3))
2840*FX229,1
2850IFqb$="999"THENsb$=" (all members)"
ELSEsb$=""
2860IFqb$<>"CCC"THENPROCub(CHR$(128+ia%
)+"To: "+CHR$(128+ja%)+qb$+sb$,s%):P
ROCub(CHR$(128+ia%)+"Subject:"+CHR$(128+
ja%),s%+80)
2870IFqb$="CCC"THENPROCub(CHR$(128+ia%)
+"Program:"+CHR$(128+ja%),s%+40)
2880PROCub(CHR$(128+ia%)+"From: "+CHR
$(128+ja%)+db$,s%+(40*ABS(qb$<>"CCC")))
2890IFfb$<>""THENPROCub("("+fb$+")",s%+
(40*ABS(qb$<>"CCC"))+14)
2900qb$=FNvb(qb$,10,2+(qb$="CCC"))
2910PROCwb(qb$)
2920PROCu
2930ENDPROC
2940:
2950DEFPROCub(xb$,yb%)
2960LOCALzb%
2970FORzb%=yb%TOyb%+LEN(xb$)-1
2980?zb%=ASC(MID$(xb$,zb%-yb%+1,1))
2990NEXT
3000ENDPROC
3010:
3020DEFPROCtb
3030!&70=s%
3040!&72=s%+n%+1
3050CALLtb
3060ENDPROC
3070:
3080DEFFNvb(qb$,ac%,bc%)
3090LOCALob%,cc%,dc%
3100VDU26,12
3110ec%=0
3120fc%=FALSE
3130gc%=0
3140hc%=FALSE
3150PROCic(ec%)
3160PROCjc(fc%)
3170PROCw
3180REPEAT
3190PRINTTAB(ac%,bc%);
3200REPEAT
3210*FX21
3220IFgc%=0THENob%=GETELSEob%=BGET#gc%:
hc%=INKEY(-113)
3230IFhc%ANDgc%>0THENCLOSE#gc%:gc%=0:hc
%=FALSE
3250UNTIL(ob%>=3ANDob%<=13)ORob%=20ORob
%=27ORob%>=32
3260cc%=INKEY(-1)
3270dc%=INKEY(-2)
3280IFgc%<>0THENIFEOF#gc%THENCLOSE#gc%:
gc%=0
3290IFgc%<>0ANDob%=10THENob%=13
3300IFNOTfc%ANDob%>=3ANDob%<=12THENac%=
FNkc(ac%,bc%,ec%,ob%,cc%,dc%)
3310IFob%=20THENgc%=FNlc(qb$):PROCjc(fc
%)
3320IFob%=12ANDNOTcc%ANDNOTdc%THENfc%=N
OTfc%:PROCa:PROCjc(fc%):PROCw
3330IFNOTfc%ANDob%=10ANDNOTcc%ANDdc%THE
NPROCa:PROCmc(bc%,ec%):VDU26,12:PROCic(e
c%):PROCjc(fc%):PROCw
3340IFNOTfc%ANDob%=11ANDNOTcc%ANDdc%THE
NPROCa:PROCnc(bc%,ec%):VDU26,12:PROCic(e
c%):PROCjc(fc%):PROCw
3350IFNOTfc%ANDob%=12ANDcc%ANDNOTdc%THE
NPROCa:qb$=FNoc(qb$):VDU26,12:PROCic(ec%
):PROCjc(fc%):PROCw
3360IFNOTfc%AND(ob%>=32ANDob%<=126)THEN
VDUob%:s%?FNpc(ac%,bc%,ec%)=ob%:ac%=ac%+
1
3370IFfc%ANDINSTR("QWASZX",CHR$(ob%AND&
DF))<>0THENs%?FNpc(ac%,bc%,ec%)=FNqc(s%?
FNpc(ac%,bc%,ec%),ob%AND&DF)
3380IFob%=127ANDac%>0THENac%=ac%-1:PROC
rc(ac%,bc%,ec%):PROCa:VDU31,0,bc%:PROCsc
(ec%+bc%):PROCw
3390IFob%=13THENac%=0:bc%=bc%+1
3400IFob%=136THENac%=ac%-1:IFcc%THENac%
=0
3410IFob%=137THENac%=ac%+1:IFcc%THENac%
=39
3420IFob%=138THENbc%=bc%+1:IFcc%THENbc%
=bc%-1:PROCa:ec%=FNtc(ec%+12):PROCic(ec%
):PROCjc(fc%):PROCw
3430IFob%=139THENbc%=bc%-1:IFcc%THENbc%
=bc%+1:PROCa:ec%=FNtc(ec%-12):PROCic(ec%
):PROCjc(fc%):PROCw
3440IFac%<0THENac%=39:bc%=bc%-1
3450IFbc%<0THENbc%=0:IFec%>0THENPROCa:e
c%=ec%-1:VDU28,0,23,39,0,30,11,26,30:PRO
Csc(ec%):PROCjc(fc%):PROCw
3460IFac%>39ANDFNuc(s%?FNpc(39,bc%,ec%)
)THENPROCvc
3470IFac%>39THENac%=0:bc%=bc%+1
3480IFbc%>23THENbc%=23:IFec%<(((n%-40)D
IV40)-23)THENPROCa:ec%=ec%+1:VDU28,0,23,
39,0,31,0,23,10,26,31,0,23:PROCsc(ec%+23
):PROCjc(fc%):PROCw
3490IF(ob%=13OR(ob%=32ANDac%=0))ANDFNwc
(s%?FNpc(0,bc%-1,ec%))THENxc%=s%?FNpc(0,
bc%-1,ec%):PRINTTAB(ac%,bc%);CHR$(xc%);:
s%?FNpc(0,bc%,ec%)=xc%:ac%=ac%+1
3500UNTILob%=27
3510IFgc%>0THENCLOSE#gc%
3520PROCa
3530=qb$
3540:
3550DEFPROCvc
3560LOCAL
3570IFFNpc(0,bc%+1,ec%)>=(n%-40)THENEND
PROC
3580yc$=""
3590ac%=ac%-1
3600pc%=FNpc(ac%,bc%,ec%)
3610REPEAT
3620yc$=CHR$(s%?pc%)+yc$
3630ac%=ac%-1
3640pc%=pc%-1
3650UNTILNOTFNuc(s%?pc%)
3660PRINTTAB(ac%+1,bc%);
3670FORzc%=pc%+1TOFNpc(39,bc%,ec%)
3680s%?zc%=32:VDU32
3690NEXT
3700bc%=bc%+1
3710ac%=0
3720IFFNwc(s%?FNpc(0,bc%-1,ec%))THENxc%
=s%?FNpc(0,bc%-1,ec%):PRINTTAB(ac%,bc%);
CHR$(xc%);:s%?FNpc(0,bc%,ec%)=xc%:ac%=ac
%+1
3730PRINTTAB(ac%,bc%);yc$;
3740ad%=FNpc(ac%,bc%,ec%)
3750FORbd%=0TOLEN(yc$)-1
3760s%?(bd%+ad%)=ASC(MID$(yc$,bd%+1,1))
3770NEXT
3780ac%=ac%+LEN(yc$)
3790ENDPROC
3800:
3810DEFFNwc(xc%)
3820=(xc%>=129ANDxc%<=135)
3830:
3840DEFFNuc(xc%)
3850=(xc%>=33ANDxc%<=126)
3860:
3870DEFPROCmc(bc%,ec%)
3880LOCALcd%,dd%
3890cd%=FNed
3900IFcd%>=(((n%-40)DIV40)*40)THENPROCf
d:ENDPROC
3910IFFNpc(0,bc%,ec%)>cd%THENENDPROC
3920!&70=s%+FNpc(0,bc%,ec%)-40
3930!&72=s%+(cd%DIV40)*40
3940CALLmc
3950FORdd%=FNpc(0,bc%,ec%)TOFNpc(39,bc%
,ec%)
3960s%?dd%=32
3970NEXT
3980ENDPROC
3990:
4000DEFPROCnc(bc%,ec%)
4010LOCALcd%,dd%
4020cd%=FNed
4030IFFNpc(0,bc%,ec%)>cd%THENENDPROC
4040IFcd%>=FNpc(0,bc%,ec%)ANDcd%<=FNpc(
39,bc%,ec%)THENFORdd%=FNpc(0,bc%,ec%)TOF
Npc(39,bc%,ec%):s%?dd%=32:NEXT:ENDPROC
4050!&70=s%+FNpc(0,bc%,ec%)
4060!&72=s%+(cd%DIV40)*40
4070CALLnc
4080FORdd%=(cd%DIV40)*40TO(cd%DIV40)*40
+40
4090s%?dd%=32
4100NEXT
4110ENDPROC
4120:
4130DEFPROCfd
4140SOUND1,-10,101,5
4150ENDPROC
4160:
4170DEFPROCrc(ac%,bc%,ec%)
4180!&70=s%+FNpc(0,bc%,ec%)
4190?&72=ac%+1
4200CALLrc
4210ENDPROC
4220:
4230DEFPROCgd(ac%,bc%,ec%)
4240IFac%=39THENs%?FNpc(39,bc%,ec%)=32:
ENDPROC
4250!&70=s%+FNpc(0,bc%,ec%)
4260?&72=ac%
4270CALLgd
4280ENDPROC
4290:
4300DEFFNtc(ec%)
4310IFec%<0THENec%=0
4320IFec%>(((n%-40)DIV40)-23)THENec%=((
(n%-40)DIV40)-23)
4330=ec%
4340:
4350DEFFNkc(ac%,bc%,ec%,ob%,cc%,dc%)
4360LOCALxc%
4370IFob%>=3ANDob%<=9ANDNOTcc%ANDNOTdc%
THENVDU126+ob%:s%?FNpc(ac%,bc%,ec%)=126+
ob%:ac%=ac%+1
4380IFob%>=3ANDob%<=9ANDcc%ANDNOTdc%THE
NVDU142+ob%:s%?FNpc(ac%,bc%,ec%)=142+ob%
:ac%=ac%+1
4390IFNOTcc%ANDdc%ANDob%=12THENPROCa:PR
OChd:VDU26,12:PROCic(ec%):PROCjc(fc%):PR
OCw
4400IFob%>=10ANDob%<=11ANDNOTcc%ANDNOTd
c%THENVDU126+ob%:s%?FNpc(ac%,bc%,ec%)=12
6+ob%:ac%=ac%+1
4410IFob%>=10ANDob%<=11ANDcc%ANDNOTdc%T
HENVDU167-ob%:s%?FNpc(ac%,bc%,ec%)=167-o
b%:ac%=ac%+1
4420IFob%>=3ANDob%<=4ANDNOTcc%ANDdc%THE
NVDU150+ob%:s%?FNpc(ac%,bc%,ec%)=150+ob%
:ac%=ac%+1
4430IFob%>=5ANDob%<=6ANDNOTcc%ANDdc%THE
NVDU153+ob%:s%?FNpc(ac%,bc%,ec%)=153+ob%
:ac%=ac%+1
4440IFob%>=7ANDob%<=8ANDNOTcc%ANDdc%THE
NVDU148-ob%:s%?FNpc(ac%,bc%,ec%)=148-ob%
:ac%=ac%+1
4450IFob%=9ANDNOTcc%ANDdc%THENPROCgd(ac
%,bc%,ec%):PROCa:VDU31,0,bc%:PROCsc(ec%+
bc%):PROCw
4460=ac%
4470:
4480DEFPROCjc(fc%)
4490IFNOTfc%THENPRINTTAB(0,24);CHR$(128
+ka%);"Press CTRL";CHR$(129);"f9";CHR$(1
28+ka%);"for help... ";ELSEPRINTT
AB(0,24);CHR$(128+ka%);"Press";CHR$(129)
;"f9";CHR$(128+ka%);"to exit pixel editi
ng...";
4500ENDPROC
4510:
4520DEFFNlc(qb$)
4530LOCALid$,bb%
4540PRINTTAB(0,24);CHR$(128+ka%);"Load
text file - are you sure?";CHR$(128+ca%)
;
4550IFNOTFNjdTHEN=0
4560PRINTTAB(0,24);SPC(35);TAB(0,24);CH
R$(128+ka%);"Filename:";CHR$(128+ca%);
4570id$=FNca(0,20)
4580IFid$=""THEN=0
4610ONERRORPROCa:PROCfd:PROCwb(qb$):PRO
Cu:GOTO370
4620bb%=OPENIN(id$)
4630IFbb%=0THENPROCfd
4640=bb%
4650:
4660DEFPROCic(ec%)
4670PRINTTAB(0,0);
4680!&70=s%+FNpc(0,0,ec%)
4690!&72=s%+FNpc(0,0,ec%)+960
4700CALLic
4710ENDPROC
4720:
4730DEFPROCsc(ec%)
4740!&70=s%+FNpc(0,0,ec%)
4750CALLsc
4760ENDPROC
4770:
4780DEFFNpc(ac%,bc%,ec%)
4790=ac%+(bc%+ec%)*40
4800:
4810DEFFNqc(xc%,ob%)
4820IFxc%>128THENxc%=xc%-128
4830xc%=xc%-32
4840q%(1)=(xc%AND1)=1
4850q%(2)=(xc%AND2)=2
4860q%(3)=(xc%AND4)=4
4870q%(4)=(xc%AND8)=8
4880q%(5)=(xc%AND16)=16
4890q%(6)=(xc%AND64)=64
4900IFob%=ASC("Q")THENq%(1)=NOTq%(1)
4910IFob%=ASC("W")THENq%(2)=NOTq%(2)
4920IFob%=ASC("A")THENq%(3)=NOTq%(3)
4930IFob%=ASC("S")THENq%(4)=NOTq%(4)
4940IFob%=ASC("Z")THENq%(5)=NOTq%(5)
4950IFob%=ASC("X")THENq%(6)=NOTq%(6)
4960xc%=160+ABS(q%(1))+ABS(q%(2))*2+ABS
(q%(3))*4+ABS(q%(4))*8+ABS(q%(5))*16+ABS
(q%(6))*64
4970VDUxc%,8
4980=xc%
4990:
5000DEFPROCwb(qb$)
5010LOCALbb%,rb%,A%,X%,Y%
5020VDU26
5030PRINTTAB(0,24);CHR$(128+ra%);"Pleas
e wait, saving message... ";
5040bb%=OPENUP("!Mesg")
5050PTR#bb%=gb%
5060INPUT#bb%,rb%
5070PTR#bb%=gb%
5080PRINT#bb%,rb%+1
5090PTR#bb%=EXT#bb%
5100PRINT#bb%,qb$
5110BPUT#bb%,0
5120r%?0=bb%
5130r%!1=s%
5140r%!5=FNed+1
5150A%=2
5160X%=r%MOD256
5170Y%=r%DIV256
5180CALL&FFD1
5190BPUT#bb%,152
5200CLOSE#bb%
5210ENDPROC
5220:
5230DEFFNed
5240!&70=s%+n%+1
5250!&72=s%
5260CALLed
5270!&72=0
5280=(!&70)-s%
5290:
5300DEFPROCj
5310LOCALbb%,rb%,kd%,ld%,md%,ec%,ob%,ha
%,qb$,jd%,nd%
5320bb%=OPENUP("!Mesg")
5330PTR#bb%=gb%
5340INPUT#bb%,rb%
5350IFrb%=0THENCLOSE#bb%:ENDPROC
5360CLS
5370PROCz
5380PRINTTAB(0,2);CHR$(128+ta%);"Please
wait, loading message..."
5390kd%=1
5400nd%=TRUE
5410REPEAT
5420IFNOTnd%THENVDU26:PRINTTAB(0,24);CH
R$(128+sa%);"Please wait, loading messag
e... ";
5430nd%=FALSE
5440REPEAT
5450ld%=PTR#bb%
5460INPUT#bb%,qb$
5470md%=BGET#bb%
5480PROCod(bb%)
5490UNTILmd%=0
5500p%(kd%)=ld%
5510VDU26,12
5520ec%=0
5530PROCic(ec%)
5540PROCpd(qb$,kd%,rb%)
5550REPEAT
5560REPEAT
5570*FX21
5580ob%=GET
5590IFob%>=ASC("a")ANDob%<=ASC("z")THEN
ob%=ob%-32
5600UNTIL(ob%>=136ANDob%<=139)ORob%=27O
Rob%=ASC("E")ORob%=ASC("D")ORob%=3
5610cc%=INKEY(-1)
5620IFob%=3THENPROCqd:VDU26,12:PROCic(e
c%):PROCpd(qb$,kd%,rb%)
5630ha%=FALSE
5640IFob%=136ANDkd%>1THENkd%=kd%-1:PTR#
bb%=p%(kd%):ha%=TRUE
5650IFob%=137ANDkd%<rb%THENkd%=kd%+1:ha
%=TRUE
5660IFob%=139ANDNOTcc%ANDec%>0THENec%=e
c%-1:VDU28,0,23,39,0,30,11,26,30:PROCsc(
ec%)
5670IFob%=139ANDcc%THENec%=FNtc(ec%-12)
:VDU26,12:PROCic(ec%):PROCpd(qb$,kd%,rb%
)
5680IFob%=138ANDNOTcc%ANDec%<(((n%-40)D
IV40)-23)THENec%=ec%+1:VDU28,0,23,39,0,3
1,0,23,10,26,31,0,23:PROCsc(ec%+23)
5690IFob%=138ANDcc%THENec%=FNtc(ec%+12)
:VDU26,12:PROCic(ec%):PROCpd(qb$,kd%,rb%
)
5700IFob%=ASC("D")THENPRINTTAB(0,24);CH
R$(128+pa%);"Are you sure you want to de
lete this? ";:jd%=FNjd:PROCpd(qb$,kd%,rb
%):IFNOTjd%THENob%=-1
5710IFob%=ASC("E")THENPRINTTAB(0,24);CH
R$(128+qa%);"Are you sure you want to ed
it this? ";:jd%=FNjd:PROCpd(qb$,kd%,rb%
):IFNOTjd%THENob%=-1
5720UNTILob%=27ORha%ORob%=ASC("E")ORob%
=ASC("D")
5730UNTILob%=27ORob%=ASC("E")ORob%=ASC(
"D")
5740IFob%=ASC("D")THENPTR#bb%=p%(kd%):P
ROCrd(bb%)
5750IFob%=ASC("E")THENPTR#bb%=p%(kd%):P
ROCrd(bb%):CLOSE#bb%:qb$=FNvb(qb$,0,4):P
ROCwb(qb$)
5760IFob%<>ASC("E")THENCLOSE#bb%
5770PROCu
5780ENDPROC
5790:
5800DEFFNjd
5810LOCALob$
5820REPEAT
5830ob$=CHR$(GETAND&DF)
5840UNTILob$="Y"ORob$="N"
5850=(ob$="Y")
5860:
5870DEFPROCod(bb%)
5880LOCALA%,X%,Y%
5890r%?0=bb%
5900r%!1=s%
5910r%!5=n%+1
5920A%=4
5930X%=r%MOD256
5940Y%=r%DIV256
5950CALL&FFD1
5960!&70=s%-1
5970!&72=s%+n%+1
5980CALLsd
5990!&76=0
6000PTR#bb%=PTR#bb%-((n%-r%!5)-(!&74-s%
))
6010ENDPROC
6020:
6030DEFPROCpd(td$,ud%,vd%)
6040LOCALwd$
6050IFud%>9ANDvd%>9THENwd$=""ELSEwd$="
"
6060PRINTTAB(0,24);CHR$(128+ka%);"Messa
ge ";ud%;" of ";vd%;",";wd$;"to ";td$;"
-";CHR$(129);"f0";CHR$(128+ka%);"for hel
p ";
6070ENDPROC
6080:
6090DEFPROCrd(bb%)
6100LOCALrb%,xd$
6110INPUT#bb%,xd$
6120BPUT#bb%,255
6130PTR#bb%=gb%
6140INPUT#bb%,rb%
6150PTR#bb%=gb%
6160PRINT#bb%,rb%-1
6170ENDPROC
6180:
6190DEFPROCk
6200LOCALyd%,zd%,ae$,rb%,td$,md%,be%,ya
%
6210CLS
6220PROCz
6230PRINTTAB(0,2);CHR$(128+na%);"Are yo
u sure you want to tidy the"'CHR$(128+na
%);"messages?":IFNOTFNjdTHENENDPROC
6240PRINT'CHR$(128+na%);"Please wait, t
idying messages..."
6250VDU21
6260IFFNwa("!MesgB")THEN*ce!de
6270*RENAME !Mesg !MesgB
6280yd%=OPENIN("!MesgB")
6290zd%=OPENOUT("!Mesg")
6300ya%=BGET#yd%
6310BPUT#zd%,ya%
6320INPUT#yd%,ae$
6330PRINT#zd%,ae$
6340INPUT#yd%,ae$
6350PRINT#zd%,ae$
6360INPUT#yd%,rb%
6370PRINT#zd%,rb%
6380IFEOF#yd%THENVDU6:CLOSE#yd%:CLOSE#z
d%:PROCe("DELETE !MesgB"):ENDPROC
6390REPEAT
6400INPUT#yd%,td$
6410md%=BGET#yd%
6420IFmd%=0THENPRINT#zd%,td$:BPUT#zd%,m
d%:REPEAT:be%=BGET#yd%:BPUT#zd%,be%:UNTI
Lbe%=152ELSEREPEATUNTILBGET#yd%=152
6430UNTILEOF#yd%
6440CLOSE#yd%
6450CLOSE#zd%
6460*DELETE !MesgB
6470VDU6
6480ENDPROC
6490:
6500DEFPROCqd
6510PROCu
6520PROCz
6530PRINTTAB(0,2);CHR$(128+la%);"Use th
e cursor up and down keys to"'CHR$(128+l
a%);"scroll through the displayed"'CHR$(
128+la%);"message. Use SHIFT to scroll"'
CHR$(128+la%);"quickly."
6540PRINT'CHR$(128+la%);"Use the cursor
left and right keys"'CHR$(128+la%);"to
move between messages."
6550PRINT'CHR$(128+la%);"Press D to del
ete the current"'CHR$(128+la%);"message
and E to edit it."
6560PRINT'CHR$(128+la%);"Press ESCAPE t
o return to the menu."
6570PRINTTAB(0,16);CHR$(128+ma%);"Press
ESCAPE to return to"'CHR$(128+ma%);"vie
wing...";
6580*FX21
6590REPEATUNTILGET=27
6600ENDPROC
6610:
6620DEFPROChd
6630LOCALob%
6640PROCu
6650PROCz
6660PRINTTAB(0,2);CHR$(128+la%);"Use th
e cursor keys to move around"'CHR$(128+l
a%);"the message. Use SHIFT to move more
";CHR$(128+la%);"quickly. Use the keyboa
rd to enter"'CHR$(128+la%);"text and DEL
ETE to delete"'CHR$(128+la%);"characters
."
6670PRINT'CHR$(128+la%);"Use";CHR$(129)
;"f0-f6";CHR$(128+la%);"to set the text
colour"
6680PRINTCHR$(128+la%);"Use SHIFT";CHR$
(129);"f0-f6";CHR$(128+la%);"to set the
graphic"'CHR$(128+la%);"colour"
6690PRINTCHR$(128+la%);"Use";CHR$(129);
"f7/f8";CHR$(128+la%);"for steady/flashi
ng"
6700PRINTCHR$(128+la%);"Use SHIFT";CHR$
(129);"f7/f8";CHR$(128+la%);"for coloure
d/black"'CHR$(128+la%);"background"
6710PRINTTAB(0,16);CHR$(128+ma%);"Press
CTRL";CHR$(129);"f9";CHR$(128+ma%);"for
more help or"'CHR$(128+ma%);"press ESCA
PE to continue editing..";
6720REPEAT
6730*FX21
6740ob%=GET
6750UNTIL(ob%=12ANDINKEY(-2))ORob%=27
6760IFob%=27THENENDPROC
6770CLS
6780PROCz
6790PRINTTAB(0,2);CHR$(128+la%);"Use";C
HR$(129);"f9";CHR$(128+la%);"to design a
graphic block"
6800PRINTCHR$(128+la%);"Use CTRL";CHR$(
129);"f0/f1";CHR$(128+la%);"to set conti
guous/"'CHR$(128+la%);"separated graphic
s"
6810PRINTCHR$(128+la%);"Use CTRL";CHR$(
129);"f2/f3";CHR$(128+la%);"to hold/rele
ase"'CHR$(128+la%);"graphics"
6820PRINTCHR$(128+la%);"Use CTRL";CHR$(
129);"f4/f5";CHR$(128+la%);"for double/s
ingle"'CHR$(128+la%);"height"
6830PRINTCHR$(128+la%);"Use SHIFT";CHR$
(129);"f9";CHR$(128+la%);"to change the"
'CHR$(128+la%);"recipient of the message
"
6840PRINTCHR$(128+la%);"Use CTRL";CHR$(
129);"f6";CHR$(128+la%);"to insert a spa
ce"
6850PRINTCHR$(128+la%);"Use CTRL";CHR$(
129);"f7/f8";CHR$(128+la%);"to insert/de
lete a"'CHR$(128+la%);"line"
6870PRINT'CHR$(128+la%);"Press ESCAPE t
o finish editing"
6880PRINTTAB(0,17);CHR$(128+ma%);"Press
ESCAPE to continue editing..";
6890*FX21
6900REPEATUNTILGET=27
6910ENDPROC
6920:
6930DEFPROCv
6940DIMxc%308
6950PROCe("LOAD SendMC "+STR$÷xc%)
6960tb=xc%
6970ic=xc%+&20
6980ed=xc%+&41
6990sc=xc%+&63
7000sd=xc%+&70
7010rc=xc%+&AB
7020gd=xc%+&BE
7030mc=xc%+&D0
7040nc=xc%+&102
7050ENDPROC
7060:
7070DEFPROCl
7080LOCALbb%,ee$,fe$
7090CLS
7100PROCz
7110PRINTTAB(0,2);CHR$(128+ba%);"Your u
ser ID is currently entered"'CHR$(128+ba
%);"as ";db$
7120PRINT'CHR$(128+ba%);"Please enter y
our three-digit user"'CHR$(128+ba%);"ID:
";CHR$(128+ca%);
7130*FX229,0
7140ee$=FNeb(FNca(3,3))
7150*FX229,1
7160PRINT''CHR$(128+ba%);"Your name is
currently entered as"'CHR$(128+ba%);fb$
7170PRINT'CHR$(128+ba%);"Please enter y
our name:"'CHR$(128+ca%);
7180*FX229,0
7190fe$=FNca(0,20)
7200*FX229,1
7210db$=ee$
7220fb$=fe$
7230bb%=OPENUP("!Mesg")
7240PTR#bb%=0
7250BPUT#bb%,0
7260PRINT#bb%,db$
7270PRINT#bb%,LEFT$(fb$+STRING$(20," ")
,20)
7280CLOSE#bb%
7290ENDPROC
7300:
7310DEFFNoc(qb$)
7320LOCALjb%,nb%
7330PROCu
7340PROCz
7350PRINTTAB(0,2);CHR$(128+oa%);"This m
essage is currently going"'CHR$(128+oa%)
;"to ";qb$
7360PRINT'CHR$(128+oa%);"Please enter t
he user ID of the"'CHR$(128+oa%);"recipi
ent:";CHR$(128+ca%);
7370jb%=POS
7380nb%=VPOS
7390PRINT''CHR$(128+oa%);"(Use 999 for
all users and CCC for"'CHR$(128+oa%);"pr
ogram comments)"
7400PRINTTAB(jb%,nb%);
7410=FNeb(FNca(3,3))
7420:
7430DEFPROCm
7440LOCALbb%,rb%,td$,md%,mb%
7450CLS
7460PROCz
7470PRINTTAB(0,2);CHR$(128+m%);"Are you
sure you want to undelete?"
7480IFNOTFNjdTHENENDPROC
7490PRINT'CHR$(128+m%);"Please wait, un
deleting messages..."
7500mb%=FALSE
7510bb%=OPENUP("!Mesg")
7520PTR#bb%=gb%
7530INPUT#bb%,rb%
7540IFEOF#bb%THENCLOSE#bb%:ENDPROC
7550REPEAT
7560INPUT#bb%,td$
7570md%=BGET#bb%
7580IFNOTmb%ANDmd%=255THENPTR#bb%=PTR#b
b%-1:BPUT#bb%,0:rb%=rb%+1
7590REPEATUNTILBGET#bb%=152
7600IFrb%=o%ANDNOTEOF#bb%THENmb%=TRUE
7610UNTILEOF#bb%
7620PTR#bb%=gb%
7630PRINT#bb%,rb%
7640CLOSE#bb%
7650IFmb%THENPRINT'CHR$(128+m%);"Warnin
g - not all of the messages"'CHR$(128+m%
);"have been recovered."''CHR$(128+m%);"
Press SPACE to return to the menu..";:PR
OCe("FX21"):REPEATUNTILGET=32
7660ENDPROC