8-Bit Software Online Conversion
8BS Messaging System. V 1.07 - Listing
350:
360*FX119
370MODE7
380PROCa
390PROCb
400PROCc
410:
440ONERRORPROCd:e$=" ":GOTO460
450e$=FNf
460IFe$=" "ANDFNg=8THENe$="A"
470IFe$=" "ANDFNg<>8THENe$="D"
480IFe$="A"ORe$="a"THENPROCh("ADFS"):P
ROCh("MOUNT 0")
490IFe$="D"ORe$="d"THENPROCh("DISC"):P
ROCh("DRIVE 0")
500ONERRORIFERR=17THENPROCh("FX3,0"):P
ROCh("FX229,1"):GOTO560ELSEPROCh("FX3,0"
):VDU6:CLOSE#0:MODE7:REPORT:PRINT" at li
ne ";ERL:PROCh("KEY0 LIST "+STR$(ERL)+"|
M"):PROCh("FX21"):PROCh("FX138,0,128"):P
ROCi:END
510IFFNj("!Mess")THENPRINT'CHR$(128+k%
);"This disc has a !Mess file. You may";
CHR$(128+k%);"wish to read the accompany
ing"'CHR$(128+k%);"article before contin
uing."
520IFFNj("!Mess")THENPRINT'CHR$(128+k%
);"Press SPACE to continue...":PROCh("FX
21"):REPEATUNTILGET=32
530IFNOTFNj("!Mesg")THENPROClELSEPROCm
540IFn%<>0THENGOTO440
550:
560REPEAT
570o%=FNp
580IFo%=1THENPROCq
590IFo%=2THENPROCr
600IFo%=3THENPROCs
610IFo%=4THENPROCt
620IFo%=5THENPROCu
630IFo%=6THENPROCv
640UNTILo%=7
650MODE7
660PROCi
670END
680:
690DEFPROCb
700*FX225,3
710*FX226,3
720*FX227,3
730*FX229,1
740*FX4,1
750ENDPROC
760:
770DEFPROCi
780*FX225,1
790*FX226,128
800*FX227,144
810*FX229,0
820*FX4,0
830ENDPROC
840:
850DEFPROCc
860ONERRORMODE7:CLOSE#0:REPORT:PRINT"
at line ";ERL:PROCi:END
870w%=4096
880x%=25
890DIMy%(x%),z%(6),aa%256,ba%w%
900PROCca
910PROCda
920PROCea
930ENDPROC
940:
950DEFPROCa
960VDU23,1,0;0;0;0;
970ENDPROC
980:
990DEFPROCfa
1000VDU23,1,1;0;0;0;
1010ENDPROC
1020:
1030DEFFNS
1040="SendMes"
1050:
1060DEFPROCca
1070ga%=6
1080ha%=3
1090ia%=3
1100k%=7
1110l%=7
1120ja%=3
1130ka%=7
1140la%=4
1150ma%=3
1160na%=7
1170oa%=7
1180pa%=2
1190qa%=3
1200ra%=3
1210sa%=7
1220ta%=3
1230ua%=7
1240va%=7
1250wa%=7
1260xa%=3
1270xa%=3
1280xa%=3
1290v%=7
1300ya%=3
1310za%=3
1320ab%=7
1330ENDPROC
1340:
1350DEFPROCda
1360LOCALbb%
1370VDU26,12
1380PRINT" ";CHR$(144+ga%);"¶
///////%¶/////////////////¶";
1390PRINTCHR$(144+ga%);"¶///////////*//
////// ";CHR$(144+ga%);"¶
";
1400PRINTCHR$(144+ga%);"¶";CHR$(144+ha%
);"jk 74$5 j£`p`pj 0 0p0p`p ";
CHR$(144+ga%);"¶";
1410PRINTCHR$(144+ga%);"¶";CHR$(144+ha%
);"jk"!7457 "kjjj$j!545=55j. ";
CHR$(144+ga%);"¶";
1420PRINTCHR$(144+ga%);"
);""£ £ !£! "£"£" "!££!!!!"£ ";
CHR$(145);" ";
1430FORbb%=1TO18
1440PRINTCHR$(144+ga%);"¶";SPC(36);CHR$
(144+ga%);"¶";
1450NEXT
1460PRINTCHR$(144+ga%);"¶||||||||||||||
|||||||||||||||||||||||¶";
1470VDU28,2,22,37,5
1480ENDPROC
1490:
1500DEFPROCh($aa%)
1510LOCALX%,Y%
1520X%=aa%MOD256
1530Y%=aa%DIV256
1540CALL&FFF7
1550ENDPROC
1560:
1570DEFFNf
1600PROCia
1610PRINT'CHR$(128+k%);"Please insert y
our submission disc"'CHR$(128+k%);"into
drive 0. This disc must be in"'CHR$(128+
k%);"the drive at all times when using"'
CHR$(128+k%);"this program."
1620PRINT'CHR$(128+k%);"Press A if this
disc is in ADFS"'CHR$(128+k%);"format,
D if it is in DFS format or";CHR$(128+k%
);"SPACE to use the current format. If";
CHR$(128+k%);"in doubt, press SPACE."
1630=FNcb("AaDd ",FALSE)
1640:
1650DEFPROCm
1660PROCdb
1670IFn%=0THENENDPROC
1680PRINT'CHR$(128+k%);"This program ca
n only handle"'CHR$(128+k%);"version 0 f
iles."
1690PRINT'CHR$(128+k%);"Press SPACE to
continue..."
1700*FX21
1710REPEATUNTILGET=32
1720ENDPROC
1730:
1740DEFPROCia
1750CLS
1760PRINTTAB(7,0);CHR$(128+ia%);"Messag
ing system 1.07"
1770ENDPROC
1780:
1790DEFFNg
1800LOCALA%,Y%
1810A%=0
1820Y%=0
1830=(USR(&FFDA)AND&FF)
1840:
1850DEFFNj(eb$)
1860LOCALfb%
1870fb%=OPENIN(eb$)
1880IFfb%=0THEN=FALSE
1890CLOSE#fb%
1900=TRUE
1910:
1920DEFPROCl
1930LOCALfb%,gb%
1940PROCia
1950PRINTTAB(0,2);CHR$(128+l%);"Please
enter your three-digit user"'CHR$(128+l%
);"ID:";CHR$(128+ja%);
1960hb$=FNib(FNja(3,3))
1970PRINT''CHR$(128+l%);"Please enter y
our name as you wish"'CHR$(128+l%);"it t
o appear in message headings:"'';:gb%=VP
OS
1980PRINT''CHR$(128+l%);"(just press RE
TURN if you wish to"'CHR$(128+l%);"remai
n anonymous)"
1990PRINTTAB(0,gb%);CHR$(128+ja%);
2000jb$=FNja(0,20)
2010fb%=OPENOUT("!Mesg")
2020BPUT#fb%,0:n%=0
2030PRINT#fb%,hb$
2040PRINT#fb%,LEFT$(jb$+STRING$(20," ")
,20)
2050kb%=PTR#fb%
2060PRINT#fb%,0
2070CLOSE#fb%
2080ENDPROC
2090:
2100DEFPROCdb
2110LOCALfb%
2120fb%=OPENIN("!Mesg")
2130n%=BGET#fb%
2140IFn%<>0THENCLOSE#fb%:ENDPROC
2150INPUT#fb%,hb$
2160INPUT#fb%,jb$
2170REPEAT
2180IFRIGHT$(jb$,1)=" "THENjb$=LEFT$(jb
$,LEN(jb$)-1)
2190UNTILRIGHT$(jb$,1)<>" "
2200kb%=PTR#fb%
2210CLOSE#fb%
2220ENDPROC
2230:
2240DEFFNib(lb$)
2250LOCALmb$,nb%,ob%
2260mb$=""
2270FORnb%=1TOLEN(lb$)
2280ob%=ASC(MID$(lb$,nb%,1))
2290IFob%>=ASC"a"ANDob%<=ASC"z"THENob%=
ob%-32
2300mb$=mb$+CHR$(ob%)
2310NEXT
2320=mb$
2330:
2340DEFFNja(pb%,qb%)
2350LOCALnb%,rb%,lb$,e%
2360nb%=POS
2370rb%=VPOS
2380lb$=""
2390REPEAT
2400REPEAT
2410*FX21
2420e%=GET
2430UNTILe%=13OR(e%>=32ANDe%<=127)
2440IFe%=127ANDLEN(lb$)>0THENVDU127:lb$
=LEFT$(lb$,LEN(lb$)-1)
2450IFe%<>127ANDe%<>13ANDLEN(lb$)<qb%TH
ENVDUe%:lb$=lb$+CHR$(e%)
2460UNTIL(e%=13ANDLEN(lb$)>=pb%)
2470=lb$
2480:
2490DEFFNp
2500LOCALsb%,e%
2510PROCia
2520PRINTTAB(3,2);CHR$(128+ka%);"Start
a new message";TAB(32,2);"N"
2530PRINTTAB(3,3);CHR$(128+ka%);"View/e
dit/print messages";TAB(32,3);"V"
2540PRINTTAB(3,4);CHR$(128+ka%);"Print
all the messages";TAB(32,4);"P"
2550PRINTTAB(3,5);CHR$(128+ka%);"Tidy t
he messages";TAB(32,5);"T"
2560PRINTTAB(3,6);CHR$(128+ka%);"Re-ent
er your user ID/name";TAB(32,6);"R"
2570PRINTTAB(3,7);CHR$(128+ka%);"Undele
te deleted messages";TAB(32,7);"U"
2580PRINTTAB(3,8);CHR$(128+ka%);"Quit t
o BASIC";TAB(32,8);"Q"
2590PRINTTAB(0,10);CHR$(128+na%);"Use t
he cursor keys to move the bar";CHR$(128
+na%);"and press RETURN to select, or us
e"'CHR$(128+na%);"the appropriate key sh
ortcut."
2600sb%=1
2610PRINTTAB(1,sb%+1);CHR$(128+la%);CHR
$(157);CHR$(128+ma%);TAB(35,sb%+1);CHR$1
56;
2620REPEAT
2630REPEAT
2640*FX21
2650e%=GET
2660UNTILINSTR("NVPTRUQnvtruq"+CHR$(138
)+CHR$(139)+CHR$(13),CHR$(e%))>0
2670PRINTTAB(1,sb%+1);CHR$(128+ka%);"
"
2680IFe%=138THENIFsb%<7THENsb%=sb%+1
2690IFe%=139THENIFsb%>1THENsb%=sb%-1
2700IFe%>=ASC"a"ANDe%<=ASC"z"THENe%=e%-
32
2710IFe%=ASC"N"THENsb%=1
2720IFe%=ASC"V"THENsb%=2
2730IFe%=ASC"P"THENsb%=3
2740IFe%=ASC"T"THENsb%=4
2750IFe%=ASC"R"THENsb%=5
2760IFe%=ASC"U"THENsb%=6
2770IFe%=ASC"Q"THENsb%=7
2780PRINTTAB(1,sb%+1);CHR$(128+la%);CHR
$(157);CHR$(128+ma%);TAB(35,sb%+1);CHR$1
56;
2790UNTILe%=13
2800=sb%
2810:
2820DEFPROCq
2830LOCALnb%,rb%,tb$,ub%,vb$
2840PROCia
2850fb%=OPENIN("!Mesg")
2860PTR#fb%=kb%
2870INPUT#fb%,ub%
2880CLOSE#fb%
2890IFub%=x%THENPRINTCHR$(128+oa%);"Sor
ry - you already have ";x%'CHR$(128+oa%)
;"messages!"''CHR$(128+oa%);"Press SPACE
to return to the menu..";:PROCh("FX21")
:REPEATUNTILGET=32:ENDPROC
2900PROCwb
2910PRINTTAB(0,2);CHR$(128+oa%);"Please
enter the user ID of the"'CHR$(128+oa%)
;"recipient:";CHR$(128+ja%);
2920nb%=POS
2930rb%=VPOS
2940PRINT''CHR$(128+oa%);"(Use 999 for
all users and CCC for"'CHR$(128+oa%);"pr
ogram/article comments)"
2950PRINTTAB(nb%,rb%);
2960*FX229,0
2970tb$=FNib(FNja(3,3))
2980*FX229,1
2990IFtb$="999"THENvb$=" (all members)"
ELSEvb$=""
3000IFtb$<>"CCC"THENPROCxb(CHR$(128+pa%
)+"To: "+CHR$(128+qa%)+tb$+vb$,ba%):
PROCxb(CHR$(128+pa%)+"Subject:"+CHR$(128
+qa%),ba%+80)
3010IFtb$="CCC"THENPROCxb(CHR$(128+pa%)
+"Subject:"+CHR$(128+qa%),ba%+40)
3020PROCxb(CHR$(128+pa%)+"From: "+CHR
$(128+qa%)+hb$,ba%+(40*ABS(tb$<>"CCC")))
3030IFjb$<>""THENPROCxb("("+jb$+")",ba%
+(40*ABS(tb$<>"CCC"))+14)
3040tb$=FNyb(tb$,10,2+(tb$="CCC"))
3050PROCzb(tb$)
3060PROCda
3070ENDPROC
3080:
3090DEFPROCxb(ac$,bc%)
3100LOCALcc%
3110FORcc%=bc%TObc%+LEN(ac$)-1
3120?cc%=ASC(MID$(ac$,cc%-bc%+1,1))
3130NEXT
3140ENDPROC
3150:
3160DEFPROCwb
3170!&70=ba%
3180!&72=ba%+w%+1
3190CALLwb
3200ENDPROC
3210:
3220DEFFNyb(tb$,dc%,ec%)
3230LOCALe%,fc%,gc%
3240VDU26,12
3250hc%=0
3260ic%=FALSE
3270jc%=0
3280kc%=FALSE
3290PROClc(hc%)
3300PROCmc(ic%)
3310PROCfa
3320REPEAT
3330PRINTTAB(dc%,ec%);
3340REPEAT
3350*FX21
3360IFjc%=0THENe%=GETELSEe%=BGET#jc%:kc
%=INKEY(-113)
3370IFkc%ANDjc%>0THENCLOSE#jc%:jc%=0:kc
%=FALSE
3390UNTIL(e%>=3ANDe%<=13)ORe%=20ORe%=27
ORe%>=32
3400fc%=INKEY(-1)
3410gc%=INKEY(-2)
3420IFjc%<>0THENIFEOF#jc%THENCLOSE#jc%:
jc%=0
3430IFjc%<>0ANDe%=10THENe%=13
3440IFNOTic%ANDe%>=3ANDe%<=12THENdc%=FN
nc(dc%,ec%,hc%,e%,fc%,gc%)
3450IFe%=20THENjc%=FNoc(tb$):PROCmc(ic%
)
3460IFe%=12ANDNOTfc%ANDNOTgc%THENic%=NO
Tic%:PROCa:PROCmc(ic%):PROCfa
3470IFNOTic%ANDe%=10ANDNOTfc%ANDgc%THEN
PROCa:PROCpc(ec%,hc%):VDU26,12:PROClc(hc
%):PROCmc(ic%):PROCfa
3480IFNOTic%ANDe%=11ANDNOTfc%ANDgc%THEN
PROCa:PROCqc(ec%,hc%):VDU26,12:PROClc(hc
%):PROCmc(ic%):PROCfa
3490IFNOTic%ANDe%=12ANDfc%ANDNOTgc%THEN
PROCa:tb$=FNrc(tb$):VDU26,12:PROClc(hc%)
:PROCmc(ic%):PROCfa
3500IFNOTic%AND(e%>=32ANDe%<=126)THENVD
Ue%:ba%?FNsc(dc%,ec%,hc%)=e%:dc%=dc%+1
3510IFic%ANDINSTR("QWASZX",CHR$(e%AND&D
F))<>0THENba%?FNsc(dc%,ec%,hc%)=FNtc(ba%
?FNsc(dc%,ec%,hc%),e%AND&DF)
3520IFe%=127ANDdc%>0THENdc%=dc%-1:PROCu
c(dc%,ec%,hc%):PROCa:VDU31,0,ec%:PROCvc(
hc%+ec%):PROCfa
3530IFe%=13THENdc%=0:ec%=ec%+1
3540IFe%=136THENdc%=dc%-1:IFfc%THENdc%=
0
3550IFe%=137THENdc%=dc%+1:IFfc%THENdc%=
39
3560IFe%=138THENec%=ec%+1:IFfc%THENec%=
ec%-1:PROCa:hc%=FNwc(hc%+12):PROClc(hc%)
:PROCmc(ic%):PROCfa
3570IFe%=139THENec%=ec%-1:IFfc%THENec%=
ec%+1:PROCa:hc%=FNwc(hc%-12):PROClc(hc%)
:PROCmc(ic%):PROCfa
3580IFdc%<0THENdc%=39:ec%=ec%-1
3590IFec%<0THENec%=0:IFhc%>0THENPROCa:h
c%=hc%-1:VDU28,0,23,39,0,30,11,26,30:PRO
Cvc(hc%):PROCmc(ic%):PROCfa
3600IFdc%>39ANDFNxc(ba%?FNsc(39,ec%,hc%
))AND(e%<136ORe%>139)THENPROCyc
3610IFdc%>39THENdc%=0:ec%=ec%+1
3620IFec%>23THENec%=23:IFhc%<(((w%-40)D
IV40)-23)THENPROCa:hc%=hc%+1:VDU28,0,23,
39,0,31,0,23,10,26,31,0,23:PROCvc(hc%+23
):PROCmc(ic%):PROCfa
3630IF(e%=13OR(e%=32ANDdc%=0))ANDFNzc(b
a%?FNsc(0,ec%-1,hc%))THENad%=ba%?FNsc(0,
ec%-1,hc%):PRINTTAB(dc%,ec%);CHR$(ad%);:
ba%?FNsc(0,ec%,hc%)=ad%:dc%=dc%+1
3640UNTILe%=27
3650IFjc%>0THENCLOSE#jc%
3660PROCa
3670=tb$
3680:
3690DEFPROCyc
3700LOCAL
3710IFFNsc(0,ec%+1,hc%)>=(w%-40)THENEND
PROC
3720bd$=""
3730dc%=dc%-1
3740sc%=FNsc(dc%,ec%,hc%)
3750REPEAT
3760bd$=CHR$(ba%?sc%)+bd$
3770dc%=dc%-1
3780sc%=sc%-1
3790UNTILNOTFNxc(ba%?sc%)
3800PRINTTAB(dc%+1,ec%);
3810FORcd%=sc%+1TOFNsc(39,ec%,hc%)
3820ba%?cd%=32:VDU32
3830NEXT
3840ec%=ec%+1
3850dc%=0
3860IFFNzc(ba%?FNsc(0,ec%-1,hc%))THENad
%=ba%?FNsc(0,ec%-1,hc%):PRINTTAB(dc%,ec%
);CHR$(ad%);:ba%?FNsc(0,ec%,hc%)=ad%:dc%
=dc%+1
3870PRINTTAB(dc%,ec%);bd$;
3880dd%=FNsc(dc%,ec%,hc%)
3890FORed%=0TOLEN(bd$)-1
3900ba%?(ed%+dd%)=ASC(MID$(bd$,ed%+1,1)
)
3910NEXT
3920dc%=dc%+LEN(bd$)
3930ENDPROC
3940:
3950DEFFNzc(ad%)
3960=(ad%>=129ANDad%<=135)
3970:
3980DEFFNxc(ad%)
3990=(ad%>=33ANDad%<=126)
4000:
4010DEFPROCpc(ec%,hc%)
4020LOCALfd%,gd%
4030fd%=FNhd
4040IFfd%>=(((w%-40)DIV40)*40)THENPROCd
:ENDPROC
4050IFFNsc(0,ec%,hc%)>fd%THENENDPROC
4060!&70=ba%+FNsc(0,ec%,hc%)-40
4070!&72=ba%+(fd%DIV40)*40
4080CALLpc
4090FORgd%=FNsc(0,ec%,hc%)TOFNsc(39,ec%
,hc%)
4100ba%?gd%=32
4110NEXT
4120ENDPROC
4130:
4140DEFPROCqc(ec%,hc%)
4150LOCALfd%,gd%
4160fd%=FNhd
4170IFFNsc(0,ec%,hc%)>fd%THENENDPROC
4180IFfd%>=FNsc(0,ec%,hc%)ANDfd%<=FNsc(
39,ec%,hc%)THENFORgd%=FNsc(0,ec%,hc%)TOF
Nsc(39,ec%,hc%):ba%?gd%=32:NEXT:ENDPROC
4190!&70=ba%+FNsc(0,ec%,hc%)
4200!&72=ba%+(fd%DIV40)*40
4210CALLqc
4220FORgd%=(fd%DIV40)*40TO(fd%DIV40)*40
+40
4230ba%?gd%=32
4240NEXT
4250ENDPROC
4260:
4270DEFPROCd
4280SOUND1,-10,101,5
4290ENDPROC
4300:
4310DEFPROCuc(dc%,ec%,hc%)
4320!&70=ba%+FNsc(0,ec%,hc%)
4330?&72=dc%+1
4340CALLuc
4350ENDPROC
4360:
4370DEFPROCid(dc%,ec%,hc%)
4380IFdc%=39THENba%?FNsc(39,ec%,hc%)=32
:ENDPROC
4390!&70=ba%+FNsc(0,ec%,hc%)
4400?&72=dc%
4410CALLid
4420ENDPROC
4430:
4440DEFFNwc(hc%)
4450IFhc%<0THENhc%=0
4460IFhc%>(((w%-40)DIV40)-23)THENhc%=((
(w%-40)DIV40)-23)
4470=hc%
4480:
4490DEFFNnc(dc%,ec%,hc%,e%,fc%,gc%)
4500LOCALad%
4510IFe%>=3ANDe%<=9ANDNOTfc%ANDNOTgc%TH
ENVDU126+e%:ba%?FNsc(dc%,ec%,hc%)=126+e%
:dc%=dc%+1
4520IFe%>=3ANDe%<=9ANDfc%ANDNOTgc%THENV
DU142+e%:ba%?FNsc(dc%,ec%,hc%)=142+e%:dc
%=dc%+1
4530IFNOTfc%ANDgc%ANDe%=12THENPROCa:PRO
Cjd:VDU26,12:PROClc(hc%):PROCmc(ic%):PRO
Cfa
4540IFe%>=10ANDe%<=11ANDNOTfc%ANDNOTgc%
THENVDU126+e%:ba%?FNsc(dc%,ec%,hc%)=126+
e%:dc%=dc%+1
4550IFe%>=10ANDe%<=11ANDfc%ANDNOTgc%THE
NVDU167-e%:ba%?FNsc(dc%,ec%,hc%)=167-e%:
dc%=dc%+1
4560IFe%>=3ANDe%<=4ANDNOTfc%ANDgc%THENV
DU150+e%:ba%?FNsc(dc%,ec%,hc%)=150+e%:dc
%=dc%+1
4570IFe%>=5ANDe%<=6ANDNOTfc%ANDgc%THENV
DU153+e%:ba%?FNsc(dc%,ec%,hc%)=153+e%:dc
%=dc%+1
4580IFe%>=7ANDe%<=8ANDNOTfc%ANDgc%THENV
DU148-e%:ba%?FNsc(dc%,ec%,hc%)=148-e%:dc
%=dc%+1
4590IFe%=9ANDNOTfc%ANDgc%THENPROCid(dc%
,ec%,hc%):PROCa:VDU31,0,ec%:PROCvc(hc%+e
c%):PROCfa
4600=dc%
4610:
4620DEFPROCmc(ic%)
4630IFNOTic%THENPRINTTAB(0,24);CHR$(128
+ra%);"Press CTRL";CHR$(129);"f9";CHR$(1
28+ra%);"for help... ";ELSEPRINTT
AB(0,24);CHR$(128+ra%);"Press";CHR$(129)
;"f9";CHR$(128+ra%);"to exit pixel editi
ng...";
4640ENDPROC
4650:
4660DEFFNoc(tb$)
4670LOCALkd$,fb%
4680PRINTTAB(0,24);CHR$(128+ra%);"Load
text file - are you sure?";CHR$(128+ja%)
;
4690IFNOTFNldTHEN=0
4700PRINTTAB(0,24);SPC(35);TAB(0,24);CH
R$(128+ra%);"Filename:";CHR$(128+ja%);
4710kd$=FNja(0,20)
4720IFkd$=""THEN=0
4750ONERRORPROCa:PROCd:PROCzb(tb$):PROC
da:GOTO500
4760fb%=OPENIN(kd$)
4770IFfb%=0THENPROCd
4780=fb%
4790:
4800DEFPROClc(hc%)
4810PRINTTAB(0,0);
4820!&70=ba%+FNsc(0,0,hc%)
4830!&72=ba%+FNsc(0,0,hc%)+960
4840CALLlc
4850ENDPROC
4860:
4870DEFPROCvc(hc%)
4880!&70=ba%+FNsc(0,0,hc%)
4890CALLvc
4900ENDPROC
4910:
4920DEFFNsc(dc%,ec%,hc%)
4930=dc%+(ec%+hc%)*40
4940:
4950DEFFNtc(ad%,e%)
4960IFad%>128THENad%=ad%-128
4970ad%=ad%-32
4980z%(1)=(ad%AND1)=1
4990z%(2)=(ad%AND2)=2
5000z%(3)=(ad%AND4)=4
5010z%(4)=(ad%AND8)=8
5020z%(5)=(ad%AND16)=16
5030z%(6)=(ad%AND64)=64
5040IFe%=ASC"Q"THENz%(1)=NOTz%(1)
5050IFe%=ASC"W"THENz%(2)=NOTz%(2)
5060IFe%=ASC"A"THENz%(3)=NOTz%(3)
5070IFe%=ASC"S"THENz%(4)=NOTz%(4)
5080IFe%=ASC"Z"THENz%(5)=NOTz%(5)
5090IFe%=ASC"X"THENz%(6)=NOTz%(6)
5100ad%=160+ABS(z%(1))+ABS(z%(2))*2+ABS
(z%(3))*4+ABS(z%(4))*8+ABS(z%(5))*16+ABS
(z%(6))*64
5110VDUad%,8
5120=ad%
5130:
5140DEFPROCzb(tb$)
5150LOCALfb%,ub%,A%,X%,Y%
5160VDU26
5170PRINTTAB(0,24);CHR$(128+ya%);"Pleas
e wait, saving message... ";
5180fb%=OPENUP("!Mesg")
5190PTR#fb%=kb%
5200INPUT#fb%,ub%
5210PTR#fb%=kb%
5220PRINT#fb%,ub%+1
5230PTR#fb%=EXT#fb%
5240PRINT#fb%,tb$
5250BPUT#fb%,0
5260aa%?0=fb%
5270aa%!1=ba%
5280aa%!5=FNhd+1
5290A%=2
5300X%=aa%MOD256
5310Y%=aa%DIV256
5320CALL&FFD1
5330BPUT#fb%,152
5340CLOSE#fb%
5350ENDPROC
5360:
5370DEFFNhd
5380!&70=ba%+w%+1
5390!&72=ba%
5400CALLhd
5410!&72=0
5420=(!&70)-ba%
5430:
5440DEFPROCr
5450LOCALfb%,ub%,md%,nd%,od%,hc%,e%,oa%
,tb$,ld%,pd%
5460fb%=OPENUP("!Mesg")
5470PTR#fb%=kb%
5480INPUT#fb%,ub%
5490IFub%=0THENCLOSE#fb%:ENDPROC
5500PROCia
5510PRINTTAB(0,2);CHR$(128+ab%);"Please
wait, loading message..."
5520md%=1
5530pd%=TRUE
5540REPEAT
5550IFNOTpd%THENVDU26:PRINTTAB(0,24);CH
R$(128+za%);"Please wait, loading messag
e... ";
5560pd%=FALSE
5570REPEAT
5580nd%=PTR#fb%
5590INPUT#fb%,tb$
5600od%=BGET#fb%
5610PROCqd(fb%)
5620UNTILod%=0
5630y%(md%)=nd%
5640VDU26,12
5650hc%=0
5660PROClc(hc%)
5670PROCrd(tb$,md%,ub%)
5680REPEAT
5690REPEAT
5700*FX21
5710e%=GET
5720IFe%>=ASC"a"ANDe%<=ASC"z"THENe%=e%-
32
5730UNTIL(e%>=136ANDe%<=139)ORe%=27ORe%
=ASC"E"ORe%=ASC"D"ORe%=ASC"P"ORe%=3
5740fc%=INKEY(-1)
5750IFe%=3THENPROCsd:VDU26,12:PROClc(hc
%):PROCrd(tb$,md%,ub%)
5760oa%=FALSE
5770IFe%=136ANDmd%>1THENmd%=md%-1:PTR#f
b%=y%(md%):oa%=TRUE
5780IFe%=137ANDmd%<ub%THENmd%=md%+1:oa%
=TRUE
5790IFe%=139ANDNOTfc%ANDhc%>0THENhc%=hc
%-1:VDU28,0,23,39,0,30,11,26,30:PROCvc(h
c%)
5800IFe%=139ANDfc%THENhc%=FNwc(hc%-12):
VDU26,12:PROClc(hc%):PROCrd(tb$,md%,ub%)
5810IFe%=138ANDNOTfc%ANDhc%<(((w%-40)DI
V40)-23)THENhc%=hc%+1:VDU28,0,23,39,0,31
,0,23,10,26,31,0,23:PROCvc(hc%+23)
5820IFe%=138ANDfc%THENhc%=FNwc(hc%+12):
VDU26,12:PROClc(hc%):PROCrd(tb$,md%,ub%)
5830IFe%=ASC"D"THENPRINTTAB(0,24);CHR$(
128+xa%);"Are you sure you want to delet
e this? ";:ld%=FNld:PROCrd(tb$,md%,ub%):
IFNOTld%THENe%=-1
5840IFe%=ASC"E"THENPRINTTAB(0,24);CHR$(
128+xa%);"Are you sure you want to edit
this? ";:ld%=FNld:PROCrd(tb$,md%,ub%):I
FNOTld%THENe%=-1
5850IFe%=ASC"P"THENPRINTTAB(0,24);CHR$(
128+xa%);"Are you sure you want to print
this?";:ld%=FNld:PROCrd(tb$,md%,ub%):IF
NOTld%THENe%=-1
5860UNTILe%=27ORoa%ORe%=ASC"E"ORe%=ASC"
D"ORe%=ASC"P"
5870UNTILe%=27ORe%=ASC"E"ORe%=ASC"D"ORe
%=ASC"P"
5880IFe%=ASC"D"THENPTR#fb%=y%(md%):PROC
td(fb%)
5890IFe%=ASC"E"THENPTR#fb%=y%(md%):PROC
td(fb%):CLOSE#fb%:tb$=FNyb(tb$,0,4):PROC
zb(tb$)
5900IFe%=ASC"P"THENPROCud
5910IFe%<>ASC"E"THENCLOSE#fb%
5920PROCda
5930ENDPROC
5940:
5950DEFFNld
5960LOCALe$
5970REPEAT
5980e$=CHR$(GETAND&DF)
5990UNTILe$="Y"ORe$="N"
6000=(e$="Y")
6010:
6020DEFPROCqd(fb%)
6030LOCALA%,X%,Y%
6040aa%?0=fb%
6050aa%!1=ba%
6060aa%!5=w%+1
6070A%=4
6080X%=aa%MOD256
6090Y%=aa%DIV256
6100CALL&FFD1
6110!&70=ba%-1
6120!&72=ba%+w%+1
6130CALLvd
6140!&76=0
6150PTR#fb%=PTR#fb%-((w%-aa%!5)-(!&74-b
a%))
6160ENDPROC
6170:
6180DEFPROCrd(wd$,xd%,yd%)
6190LOCALzd$
6200IFxd%>9ANDyd%>9THENzd$=""ELSEzd$="
"
6210PRINTTAB(0,24);CHR$(128+ra%);"Messa
ge ";xd%;" of ";yd%;",";zd$;"to ";wd$;"
-";CHR$(129);"f0";CHR$(128+ra%);"for hel
p ";
6220ENDPROC
6230:
6240DEFPROCtd(fb%)
6250LOCALub%,ae$
6260INPUT#fb%,ae$
6270BPUT#fb%,255
6280PTR#fb%=kb%
6290INPUT#fb%,ub%
6300PTR#fb%=kb%
6310PRINT#fb%,ub%-1
6320ENDPROC
6330:
6340DEFPROCs
6350LOCALfb%,ub%,wd$,od%
6360PROCia
6370fb%=OPENIN("!Mesg")
6380PTR#fb%=kb%
6390INPUT#fb%,ub%
6400IFub%=0THENCLOSE#fb%:PRINTTAB(0,2);
CHR$(128+ua%);"There are no messages to
print."''CHR$(128+ua%);"Press SPACE to r
eturn to the menu.":PROCh("FX21"):REPEAT
UNTILGET=32:ENDPROC
6410PRINTTAB(0,2);CHR$(128+ua%);"Are yo
u sure you want to print the"'CHR$(128+u
a%);"messages?";CHR$(128+ja%);:IFNOTFNld
THENCLOSE#fb%:ENDPROC
6420PRINT"Yes"
6430REPEAT
6440INPUT#fb%,wd$
6450od%=BGET#fb%
6460PROCqd(fb%)
6470IFod%=0THENPROCud
6480UNTILEOF#fb%
6490CLOSE#fb%
6500ENDPROC
6510:
6520DEFPROCud
6530LOCALsc%,be%,ce%
6540*FX3,10
6550sc%=0
6560FORbe%=0TO(FNhdDIV40)
6570be$=""
6580FORce%=0TO39
6590de%=ba%?sc%
6600sc%=sc%+1
6610IFde%>=32ANDde%<=126THENVDUde%ELSEV
DU32
6620NEXT
6630PRINT
6640NEXT
6650PRINT
6660*FX3
6670ENDPROC
6680:
6690DEFPROCt
6700LOCALee%,fe%,ge$,ub%,wd$,od%,de%,n%
6710PROCia
6720PRINTTAB(0,2);CHR$(128+va%);"Are yo
u sure you want to tidy the"'CHR$(128+va
%);"messages?";CHR$(128+ja%);:IFNOTFNldT
HENENDPROC
6730PRINT"Yes"
6740PRINT'CHR$(128+va%);"Please wait, t
idying messages..."
6750VDU21
6760IFFNj("!MesgB")THENOSCLI"DELETE !Me
sgB"
6770*RENAME !Mesg !MesgB
6780ee%=OPENIN("!MesgB")
6790fe%=OPENOUT("!Mesg")
6800n%=BGET#ee%
6810BPUT#fe%,n%
6820INPUT#ee%,ge$
6830PRINT#fe%,ge$
6840INPUT#ee%,ge$
6850PRINT#fe%,ge$
6860INPUT#ee%,ub%
6870PRINT#fe%,ub%
6880IFEOF#ee%THENVDU6:CLOSE#ee%:CLOSE#f
e%:PROCh("DELETE !MesgB"):ENDPROC
6890REPEAT
6900INPUT#ee%,wd$
6910od%=BGET#ee%
6920IFod%=0THENPRINT#fe%,wd$:BPUT#fe%,o
d%:REPEAT:de%=BGET#ee%:BPUT#fe%,de%:UNTI
Lde%=152ELSEREPEATUNTILBGET#ee%=152
6930UNTILEOF#ee%
6940CLOSE#ee%
6950CLOSE#fe%
6960*DELETE !MesgB
6970VDU6
6980ENDPROC
6990:
7000DEFPROCsd
7010PROCda
7020PROCia
7030PRINTTAB(0,2);CHR$(128+sa%);"Use th
e cursor up and down keys to"'CHR$(128+s
a%);"scroll through the displayed"'CHR$(
128+sa%);"message. Use SHIFT to scroll"'
CHR$(128+sa%);"quickly."
7040PRINT'CHR$(128+sa%);"Use the cursor
left and right keys"'CHR$(128+sa%);"to
move between messages."
7050PRINT'CHR$(128+sa%);"Press D to del
ete the current"'CHR$(128+sa%);"message,
E to edit it or P to print";CHR$(128+sa
%);"it."
7060PRINT'CHR$(128+sa%);"Press ESCAPE t
o return to the menu."
7070PRINTTAB(0,16);CHR$(128+ta%);"Press
ESCAPE to return to"'CHR$(128+ta%);"vie
wing...";
7080*FX21
7090REPEATUNTILGET=27
7100ENDPROC
7110:
7120DEFPROCjd
7130LOCALe%
7140PROCda
7150PROCia
7160PRINTTAB(0,2);CHR$(128+sa%);"Use th
e cursor keys to move around"'CHR$(128+s
a%);"the message. Use SHIFT to move more
";CHR$(128+sa%);"quickly. Use the keyboa
rd to enter"'CHR$(128+sa%);"text and DEL
ETE to delete"'CHR$(128+sa%);"characters
."
7170PRINT'CHR$(128+sa%);"Use";CHR$(129)
;"f0-f6";CHR$(128+sa%);"to set the text
colour"
7180PRINTCHR$(128+sa%);"Use SHIFT";CHR$
(129);"f0-f6";CHR$(128+sa%);"to set the
graphic"'CHR$(128+sa%);"colour"
7190PRINTCHR$(128+sa%);"Use";CHR$(129);
"f7/f8";CHR$(128+sa%);"for flashing/stea
dy"
7200PRINTCHR$(128+sa%);"Use SHIFT";CHR$
(129);"f7/f8";CHR$(128+sa%);"for coloure
d/black"'CHR$(128+sa%);"background"
7210PRINTTAB(0,16);CHR$(128+ta%);"Press
CTRL";CHR$(129);"f9";CHR$(128+ta%);"for
more help or"'CHR$(128+ta%);"press ESCA
PE to continue editing..";
7220REPEAT
7230*FX21
7240e%=GET
7250UNTIL(e%=12ANDINKEY(-2))ORe%=27
7260IFe%=27THENENDPROC
7270PROCia
7280PRINTTAB(0,2);CHR$(128+sa%);"Use";C
HR$(129);"f9";CHR$(128+sa%);"to design a
graphic block"
7290PRINTCHR$(128+sa%);"Use CTRL";CHR$(
129);"f0/f1";CHR$(128+sa%);"to set conti
guous/"'CHR$(128+sa%);"separated graphic
s"
7300PRINTCHR$(128+sa%);"Use CTRL";CHR$(
129);"f2/f3";CHR$(128+sa%);"to hold/rele
ase"'CHR$(128+sa%);"graphics"
7310PRINTCHR$(128+sa%);"Use CTRL";CHR$(
129);"f4/f5";CHR$(128+sa%);"for double/s
ingle"'CHR$(128+sa%);"height"
7320PRINTCHR$(128+sa%);"Use SHIFT";CHR$
(129);"f9";CHR$(128+sa%);"to change the"
'CHR$(128+sa%);"recipient of the message
"
7330PRINTCHR$(128+sa%);"Use CTRL";CHR$(
129);"f6";CHR$(128+sa%);"to insert a spa
ce"
7340PRINTCHR$(128+sa%);"Use CTRL";CHR$(
129);"f7/f8";CHR$(128+sa%);"to insert/de
lete a"'CHR$(128+sa%);"line"
7350PRINTTAB(0,16);CHR$(128+ta%);"Press
CTRL";CHR$(129);"f9";CHR$(128+ta%);"for
more help or"'CHR$(128+ta%);"press ESCA
PE to continue editing..";
7360REPEAT
7370*FX21
7380e%=GET
7390UNTIL(e%=12ANDINKEY(-2))ORe%=27
7400IFe%=27THENENDPROC
7410PROCia
7420PRINTTAB(0,2);CHR$(128+sa%);"Use CT
RL-T to read in an ASCII text";CHR$(128+
sa%);"file"
7430PRINT'CHR$(128+sa%);"Press ESCAPE t
o finish editing"
7440PRINTTAB(0,17);CHR$(128+ta%);"Press
ESCAPE to continue editing..";
7450*FX21
7460REPEATUNTILGET=27
7470ENDPROC
7480:
7490DEFPROCea
7500DIMad%308
7510PROCh("LOAD SendMC "+STR$÷ad%)
7520wb=ad%
7530lc=ad%+&20
7540hd=ad%+&41
7550vc=ad%+&63
7560vd=ad%+&70
7570uc=ad%+&AB
7580id=ad%+&BE
7590pc=ad%+&D0
7600qc=ad%+&102
7610ENDPROC
7620:
7630DEFPROCu
7640LOCALfb%,he$,ie$
7650PROCia
7660PRINTTAB(0,2);CHR$(128+l%);"Your us
er ID is currently entered"'CHR$(128+l%)
;"as ";hb$
7670PRINT'CHR$(128+l%);"Please enter yo
ur three-digit user"'CHR$(128+l%);"ID:";
CHR$(128+ja%);
7680*FX229,0
7690he$=FNib(FNja(3,3))
7700*FX229,1
7710PRINT''CHR$(128+l%);"Your name is c
urrently entered as"'CHR$(128+l%);jb$
7720PRINT'CHR$(128+l%);"Please enter yo
ur name:"'CHR$(128+ja%);
7730*FX229,0
7740ie$=FNja(0,20)
7750*FX229,1
7760hb$=he$
7770jb$=ie$
7780fb%=OPENUP("!Mesg")
7790PTR#fb%=0
7800BPUT#fb%,0
7810PRINT#fb%,hb$
7820PRINT#fb%,LEFT$(jb$+STRING$(20," ")
,20)
7830CLOSE#fb%
7840ENDPROC
7850:
7860DEFFNrc(tb$)
7870LOCALnb%,rb%
7880PROCda
7890PROCia
7900PRINTTAB(0,2);CHR$(128+wa%);"This m
essage is currently going"'CHR$(128+wa%)
;"to ";tb$
7910PRINT'CHR$(128+wa%);"Please enter t
he user ID of the"'CHR$(128+wa%);"recipi
ent:";CHR$(128+ja%);
7920nb%=POS
7930rb%=VPOS
7940PRINT''CHR$(128+wa%);"(Use 999 for
all users and CCC for"'CHR$(128+wa%);"pr
ogram comments)"
7950PRINTTAB(nb%,rb%);
7960=FNib(FNja(3,3))
7970:
7980DEFPROCv
7990LOCALfb%,ub%,wd$,od%,qb%
8000PROCia
8010PRINTTAB(0,2);CHR$(128+v%);"Are you
sure you want to undelete?"
8020IFNOTFNldTHENENDPROC
8030PRINT'CHR$(128+v%);"Please wait, un
deleting messages..."
8040qb%=FALSE
8050fb%=OPENUP("!Mesg")
8060PTR#fb%=kb%
8070INPUT#fb%,ub%
8080IFEOF#fb%THENCLOSE#fb%:ENDPROC
8090REPEAT
8100INPUT#fb%,wd$
8110od%=BGET#fb%
8120IFNOTqb%ANDod%=255THENPTR#fb%=PTR#f
b%-1:BPUT#fb%,0:ub%=ub%+1
8130REPEATUNTILBGET#fb%=152
8140IFub%=x%ANDNOTEOF#fb%THENqb%=TRUE
8150UNTILEOF#fb%
8160PTR#fb%=kb%
8170PRINT#fb%,ub%
8180CLOSE#fb%
8190IFqb%THENPRINT'CHR$(128+v%);"Warnin
g - not all of the messages"'CHR$(128+v%
);"have been recovered."''CHR$(128+v%);"
Press SPACE to return to the menu..";:PR
OCh("FX21"):REPEATUNTILGET=32
8200ENDPROC
8210:
8220DEFFNcb(je$,ke%)
8230LOCALe$
8240REPEAT
8250*FX21
8260IFke%THENe$=CHR$(GETAND&DF)ELSEe$=G
ET$
8270UNTILINSTR(je$,e$)<>0
8280=e$