8-Bit Software Online Conversion
:0.$.Control - Listing
10programname$="CONTROL"
20REM revised 14 OCTOBER added FNdayn
eame
30VDU3:MODE7:CLOSE#0
40*FX18
50*DRIVE0
60*K.0*BASIC|MCHAIN":0.CONTROL"|M
70*KEY1VDU2:VDU1,27,83,49:VDU1,27,48:
VDU1,15|M|OLIST|M
80*KEY2MODE7|M|NLIST|M
90*KEY3RUN|M
100*KEY4AUTO|M
110*KEY6CHAIN":0.LOADER"|M
120*KEY7*CAT|M
130*KEY8SAVE":0."+programname$|M
140*KEY9SAVE":0.WORK"|M
150*KEY10OLD|M|NLIST|M
160*FX6,0
170*FX4,0
190DATA"January","JAN","February","FEB
","March","MAR","April","APR","May","MAY
","June","JUN","July","JUL","August","AU
G","September","SEP","October","OCT","No
vember","NOV","December","DEC"
195DATAFri,5,Satur,6,Sun,7,Mon,1,Tues,
2,Wednes,3,Thurs,4
200DIMA$(256)
210IFD%>31THEND%=0
220IFD%=0:date=OPENIN("DATE"):INPUT#da
te,D%,M%,Y%,N%:CLOSE#0
230PROCdate
240CLS:PRINTCHR$132;CHR$157;CHR$130;CH
R$141;" CONTROL MENU"
250PRINTCHR$132;CHR$157;CHR$130;CHR$14
1;" CONTROL MENU"
260PRINTTAB(1,3)dayname$;", ";D%;bit$;
" "month$;", ";Y%;"."
270PRINTTAB(6,7)"1. WORD-WISE"
280PRINTTAB(6)"2. INTERWORD"
290PRINTTAB(6)"3. FAITHFUL SCRIBE"
300PRINTTAB(6)"4. File loader"
310PRINTTAB(6)"5. Work"
320PRINTTAB(6)"6. Printer"
330PRINTTAB(6)"7. Library"
340PRINTTAB(6)"8. Up the date"
350PRINTTAB(6)"9. Address book"
360PRINTTAB(6)"0. Diary"
370PRINTTAB(6)"B. BASIC"
380PRINTTAB(6)"F. Format discs"
390PRINTTAB(6)"T. TERMINAL"
400PRINTTAB(6)"W. WAPPING EDITOR"
410PRINTTAB(6)"V. VIEW"
420*FX21,0
430PROCbell
440PRINT
450p%=VPOS:PRINTTAB(0)" Optio
n ? ";:A=GET
460IFA=84ORA=116CHAIN"TERMNAL"
470IFA=87ORA=119THEN540
480IFA=66ORA=98CLS:END
490IFA=86ORA=118THEN570
500IFA=70ORA=102THENCLS:VDU7:PRINT"FOR
MATTER"'"========="'':*FORM80
510IFA>57ORA<48VDU11,7:GOTO450
520PRINTTAB(0,p%)" Loading ... ";
CHR$(A)
530ON A-47 GOTO 590,600,640,680,690,70
0,710,720,730,740
540IFS%<>1THENS%=1:*LOAD"R.SUPPORT" 80
00
550*DR.1
560*WEDIT
570*DR.1
580*WORD
590CHAIN"DIARY"
600*KEY0*B.|MCLS:CHAIN":0.CONTROL"|M
601*KEY6*B.|MCLS:CHAIN":0.PRINTER"|M
602*KEY9*B.|MCLS:CHAIN":0.ADRBK"|M
610*FX202,48
620*DR.1
630*WORDWISE
640IFB%=0THENB%=1:PRINTTAB(0,p%)"Loadi
ng user dictionary";:*DLOAD USERDIC
650*FX202,48
660*DR.1
670*IWORD
680CHAIN"SCRIBE"
690CHAIN"LOADER"
700CHAIN"WORK"
710CHAIN"PRINTER"
720CHAIN"LIBRARY"
730GOTO1320
740CHAIN"ADRBK"
750
760DEFPROCcheck`date
770CLS:PRINTTAB(4,3)dayname$;",";TAB(1
4,3)D%;bit$;TAB(20,3)month$;",";TAB(30,3
)Y%"."
780PRINTTAB(12,7)"CHECK THE DATE":PRIN
TTAB(12,8)"``````````````":PRINTTAB(8,11
)"Is this to-day's date ?"
790PRINTTAB(11,13)"Hit RETURN if O.K."
800PRINTTAB(13,14)"+ to increase"
810PRINTTAB(13,15)"- to decrease"
820PRINTTAB(11,18);
830REPEAT
840inc$="":A$="":A$=GET$
850IFA$="+"ORA$=";"THENinc$="+"
860IFA$="-"ORA$="="THENinc$="-"
870IFASC(A$)=13ORA$="y"ORA$="Y"THENinc
$="*"
880UNTILinc$="+"ORinc$="-"ORinc$="*"
890ENDPROC
900
910DEFPROCdate
920RESTORE190:FORI=1TOM%:READmonth$,MO
NTH$:NEXTI
930REMOVE RESTORE180:FORI=1TON%:READda
yname$:NEXTI
935dayname$=FNdayname(D%,M%,Y%)+"day"
940bit$="":IFD%=1ORD%=21ORD%=31THENbit
$="st."
950IFD%=2ORD%=22THENbit$="nd."
960IFD%=3ORD%=23THENbit$="rd."
970IFbit$=""THENbit$="th."
980ENDPROC
990
1000DEFPROCsave`date
1010PRINT"Saving the new date ..."
1020date=OPENOUT("DATE")
1030PRINT#date,D%,M%,Y%,N%
1040CLOSE#0
1050ENDPROC
1100
1110DEFPROCincrement`date
1120D%=D%+1
1130N%=N%+1:IFN%=8THENN%=1
1140IF(M%=2) AND (D%>29) THEND%=1:M%=3
1150IF(M%=3)AND(D%=0)THEN IF NOT FNLEAP
(R%-1)THEND%=28:M%=2
1160IF((M%=4 OR M%=6 OR M%=9 OR M%=11)
AND (D%=31)) THEN D%=1:M%=M%+1
1170IFD%>31 THEN D%=1:M%=M%+1
1180IFM%>12 THEN M%=1:Y%=Y%+1
1190ENDPROC
1200:
1210DEFPROCdecrement`date
1220D%=D%-1
1230N%=N%-1:IFN%=0THENN%=7
1240IF(M%=3) AND (D%=0) THEND%=29:M%=23
1250IF((M%=5 OR M%=7 OR M%=10 OR M%=12)
AND (D%=0)) THEN D%=30:M%=M%-1
1260IFD%=0 THEN D%=31:M%=M%-1
1270ENDPROC
1280:
1290DEFFNLEAP(Y%)
1300IFY%MOD4=0AND(Y% MOD 100<>0 OR Y% M
OD 400=0) THEN =TRUE ELSE=FALSE
1310:
1320REM SUBROUTINE RESET DATE
1330inc$="+"
1340REPEAT
1350IFinc$="+"PROCincrement`date
1360IFinc$="-"PROCdecrement`date
1370PROCdate
1380PROCcheck`date
1390UNTILinc$="*"
1400PROCsave`date
1410GOTO240
1420:
1430DEFPROCbell
1440*FX15,0
1450ENVELOPE3,3,-1,-2,0,0,0,0,80,-2,-2,
-2,80,40
1460SOUND1,3,255,100
1470SOUND2,3,200,100
1480SOUND3,3,240,100
1490ENDPROC
1500
1510DEFFNdayname(D,M,Y)
1520IFFNvalidate(D%,M%,Y%)=0THEN="INVAL
ID "
1525RESTORE1580
1530Y=(Y-1780)*365+INT((Y-1777)/4)-INT(
(Y-1701)/100)+INT((Y-1601)/400)
1540IFM=1 M=0:GOTO1600
1550FORI=1TOM-1
1560READX
1570NEXT
1580DATA31,28,31,30,31,30,31,31,30,31,3
0
1590IFM<13 M=X ELSE M=M+X
1600N=Y+M+D
1610N=N-INT(N/7)*7
1620RESTORE195
1630FORJ=1TON+1:READN$,N%:NEXT
1640DATAWednes,3,Thurs,4,Fri,5,Satur,6,
Sun,7,Mon,1,Tues,2
1650=N$
1660
1670DEFFNvalidate(D,M,Y)=D*M*(M<13)*(D<
31+((M+(M>7))AND1)+(M=2)*(2+((Y AND3)=0)
))