8-Bit Software Online Conversion
Year Planner/Organiser - Listing
0DEFFNS:FOR L=PAGE TO PAGE+100:IF?L=
244 FOR IL=L+2 TOL+25:?IL=ASC(MID$(TIME$
,IL-(L+1),1)):NEXT:="CAL" ELSE NEXT:REM
Mon,03 Mar 1991.10:06:35 last saving
10 MODE 7
20 *FX229,1
24 *OPT1,1
30 *FX4,1
40 DIM List$(3,150),Type$(3),code%(4)
50 DayMonth$="31283130313031313031303
1"
60 MonthName$="January February Marc
h April May June July
August SeptemberOctober November Dec
ember "
70 DayName$="SunMonTueWedThuFriSat"
80 Pay$="MnlyQrlyAnlySngl"
90 Type$(0)="Finances":Type$(1)="Appo
intments":Type$(2)="Celebrations":Type$(
3)="Holidays"
100 F$=CHR$132+CHR$157+CHR$135+CHR$141
110 SaveFlag%=0:P%=0:Month%=0:Day%=0
120 PRINT"Have you existing lists (Y/N
)?"
125 IF FNget("YN")=1 PROCload
130 REPEAT
140 MODE7:C%=FNmenu:MODE7
150 IF C%=1 PROCscrM
160 IF C%=2 PROCannual
170 IF C%=3 PROCdiary
180 IF C%>3 AND C%<8 PROClist(C%-4):Sa
veFlag%=1
190 IF C%=8 PROCsave:SaveFlag%=0
200 IF C%=9 AND SaveFlag%=1 PRINT''"Yo
u have not saved any alterations":PRINT"
Are you sure you wish to leave (Y/N) ":I
F FNget("YN")=2 C%=0
210 UNTIL C%=9
220 *FX4,0
230 *FX229
240 CLS:PRINTTAB(12,12)"GOODBYE"
250 END
260 DEF FNmonthL(m%)
270 LOCAL max%,a%
280 IF Year%MOD4=0 a%=1
290 IF Year%MOD100=0 a%=0
300 IF Year%MOD400=0 a%=1
310 IF m%=2 max%=a%+28
320 IF m%<>2 max%=VAL(MID$(DayMonth$,m
%*2-1,2))
330 =max%
340 DEF FNmarker(type%)
350 LOCALa$,n%,flag%,max%
360 IF P%=2 =32
370 IF type%=5 AND Month%=Meast% AND D
ay%=Deast%=134
380 IF type%=5 =135
390 max%=VAL(List$(type%,0))
400 REPEAT
410 n%=n%+1
420 a$=List$(type%,n%)
430 d%=ASC(MID$(a$,2,1))
440 IF d%<>Day% GOTO460
450 flag%=FNcheck(a$)
460 UNTIL flag%=1 OR n%>=max%
470 IF flag%=1 =135
480 n%=129+type%:IF n%=132 =133
490 IF n%=131 =132
500 =n%
510 DEF FNcheck(a$)
520 LOCAL t%,y%,m%,flag%
530 t%=ASC(MID$(a$,1,1))
540 y%=ASC(MID$(a$,3,1))
550 m%=y%AND&F
560 y%=(y%DIV16+17)*100+ASC(MID$(a$,4,
1))
570 IF y%>Year%=0
580 IF(t%=1 AND Month%>=m%)OR(t%=2 AND
(m%-Month%)MOD3=0)OR(t%=3 AND m%=Month%)
OR(t%=4 AND m%=Month% AND y%=Year%)flag%
=1
590 =flag%
600 DEF FNdayNo
610 LOCAL d%,m%,y%
620 y%=Year%-1
630 d%=y%*365+y%DIV4-y%DIV100+y%DIV400
640 IF Month%=1 GOTO 680
650 FOR m%=1 TO Month%-1
660 d%=d%+FNmonthL(m%)
670 NEXT
680 =d%+Day%
690 DEF PROCeaster
700 LOCAL c%,n%,d%
710 Mstore%=Month%:Dstore%=Day%
720 Day%=1:Month%=3:Deast%=FNdayNo MOD
7
730 n%=(Year%DIV100)-16:c%=3+n%-(n%+1)
DIV3-n%DIV4
740 n%=(Year%+1)MOD19:d%=(c%+(n%*19))M
OD30
750 IF n%>11 AND d%>27 d%=d%-1 ELSE IF
n%<=11 AND d%=29 d%=28
760 d%=d%+21:REPEAT d%=d%+1:UNTIL(d%+D
east%)MOD7=1
770 IF d%<32 Meast%=3 ELSE d%=d%-31:Me
ast%=4
780 Deast%=d%:Month%=Mstore%:Day%=Dsto
re%
790 ENDPROC
800 DEF PROCscrM
810 LOCAL a,a$,t
820 PROCmydate:PROCprinter
830 FOR t=19 TO 24
840 PRINTTAB(0,t)CHR$132+CHR$157+CHR$1
35;:PRINTTAB(36,t)CHR$156;
850 NEXT
860 VDU28,3,24,34,19
870 PRINTTAB(0,0)"Use Cursor arrows to
alter month"
880 PRINT"<ESCAPE> to return to Menu"
890 PRINT'Type$(0);" ";Type$(1)
900 PRINT Type$(2);" ";Type$(3);
910 VDU26,28,0,18,39,0
920 marker%=5
930 REPEAT
940 CLS:*FX15
950 PROCmyheader:PRINT:PROCprintdays(1
)
960 PRINT':PROCprintmonth(marker%,1)
970 P%=0:VDU3
980 a=FNget(CHR$136+CHR$137+"FACH"+CHR
$27)
990 IF a=1 Month%=Month%-1
1000 IF a=2 Month%=Month%+1
1010 IF Month%=13:Month%=1:Year%=Year%+
1:PROCeaster
1020 IF Month%=0:Month%=12:Year%=Year%-
1:PROCeaster
1030 IF a>2 AND a<7 marker%=a-3
1040 IF a<3 marker%=5
1050 UNTIL a=7
1060 ENDPROC
1070 DEF FNmenu
1080 LOCAL n
1090 FOR n=1 TO 2
1100 PRINT F$+"INPUT: "+CHR$135+"Calend
er & Diary "+CHR$156
1110 NEXT
1120 PRINT
1130 FOR n=1 TO 2
1140 PRINTSPC(9)F$+"Menu "+CHR$156
1150 NEXT
1160 PRINT'"1"+CHR$131+"Look at Monthly
Calender"
1170 PRINT"2"+CHR$131+"Look at Year Cal
ender"
1180 PRINT"3"+CHR$131+"Look at Month Di
ary"
1190 PRINT"4"+CHR$131+"Review/Edit Fina
nce"
1200 PRINT"5"+CHR$131+"Review/Edit Appo
intments"
1210 PRINT"6"+CHR$131+"Review/Edit Cele
brations"
1220 PRINT"7"+CHR$131+"Review/Edit Holi
days"
1230 PRINT"8"+CHR$131+"Save the lists"
1240 PRINT"9"+CHR$131+"Leave the progra
m"
1250 PRINTTAB(18,18)"Please Choose ";
1260 =FNget("123456789")
1270 DEF PROClist(type%)
1280 LOCAL n,a%,b%
1290 PROCheader(type%)
1300 REPEAT
1310 CLS
1320 b%=VAL(List$(type%,0))
1330 IF b%=0 GOTO 1370
1340 FOR n=1 TO b%
1350 PROCop(List$(type%,n),n)
1360 NEXT
1370 a%=FNget("ADM")
1380 IF a%=1 List$(type%,b%+1)=CHR$(FNt
ype(type%))+FNadd:List$(type%,0)=STR$(b%
+1)
1390 IF a%=2 AND b%>0 FOR p%=FNnoln(1,b
%,"Which number")+1 TO b%:List$(type%,p%
-1)=List$(type%,p%):NEXT:List$(type%,0)=
STR$(b%-1)
1400 UNTIL a%=3
1410 ENDPROC
1420 DEF PROCheader(t%)
1430 LOCAL y
1440 FOR y=1 TO 2:PRINT F$+Type$(t%):NE
XT
1450 PRINTTAB(2,3)CHR$134+"Current List
"
1460 FOR y=21 TO 24
1470 PRINTTAB(0,y)CHR$132+CHR$157+CHR$1
35TAB(35,y)CHR$156;
1480 NEXT
1490 PRINTTAB(4,23)"Add Delete Menu";
1500 VDU28,0,21,39,4
1510 ENDPROC
1520 DEF PROCop(a$,no%)
1530 LOCAL n%,b$,d$
1540 FOR n%=1 TO 4:code%(n%)=ASC(MID$(a
$,n%,1)):NEXT
1550 b$=MID$(Pay$,code%(1)*4-3,4)
1560 d$=STR$code%(2)+":"+STR$(code%(3)M
OD16)+":"+STR$((code%(3)DIV16+17)*100+co
de%(4))
1570 PRINT;no%;CHR$131;b$;CHR$133;d$;TA
B(17,VPOS);CHR$135;RIGHT$(a$,LENa$-4)
1580 ENDPROC
1590 DEF FNadd
1600 LOCAL b$,vpos%
1610 PRINT"To be called ? (max 20 lette
rs)":INPUT,b$
1620 vpos%=VPOS+1
1630 REPEAT PRINTTAB(0,vpos%);
1640 PRINT"Significant data ?"
1650 Day%=FNnoln(1,31," Day:")
1660 PROCmydate
1670 UNTIL Day%<=FNmonthL(Month%)
1680 =FNcode(b$)
1690 DEF FNget(a$)
1700 LOCAL b$,a%
1710 REPEAT b$=GET$:a%=INSTR(a$,b$):UNT
IL a%
1720 =a%
1730 DEF FNnoln(min,max,b$)
1740 LOCAL y,a$
1750 y=VPOS
1760 REPEAT PRINTTAB(0,y)SPC30
1770 PRINTTAB(0,y)b$;:INPUT a$
1780 UNTIL VALa$>=min AND VALa$<=max
1790 =VALa$
1800 DEF FNcode(b$)
1810 LOCAL p%,q%
1820 p%=(Year%DIV100-17)*16+Month%
1830 q%=Year% MOD100
1840 =CHR$Day%+CHR$p%+CHR$q%+LEFT$(b$,2
0)
1850 DEF FNtype(t%)
1860 IF t%=0 PRINT"Monthly,Quarterly,An
nual,Single":=FNget("MQAS")
1870 IFt%=2 =3
1880 =4
1890 DEF PROCsave
1900 LOCAL n%,p%
1910 X=OPENOUT("Diary")
1920 FOR n%=0 TO 3
1930 FOR p%=0 TO VAL(List$(n%,0))
1940 PRINT#X,List$(n%,p%)
1950 NEXT
1955NEXT
1960 CLOSE#X
1970 ENDPROC
1980 DEF PROCload
1990 LOCAL X,n%,p%,m%
2000 X=OPENIN("Diary")
2010 FOR n%=0 TO 3
2020 INPUT#X,List$(n%,0)
2030 m%=VAL(List$(n%,0))
2040 IF m%=0 GOTO 2080
2050 FOR p%=1 TO m%
2060 INPUT#X,List$(n%,p%)
2070 NEXT
2080 NEXT
2090 CLOSE#X
2100 ENDPROC
2110 DEF PROCannual
2120 LOCAL m%,a
2130 Year%=FNnoln(1752,3299," Year:"):P
ROCeaster
2140 PROCprinter:CLS
2150 PRINT F$;"YEAR ";Year%;TAB(35)CHR$
156
2160 VDU P%:PRINT F$;"YEAR ";Year%;TAB(
35)CHR$156
2170 PRINT:PROCprintdays(0):PRINT
2180 PROCspacebar
2190 FOR Month%=1 TO 6
2200 PRINT CHR$129;MID$(MonthName$,Mont
h%*9-8,9)
2210 PROCprintmonth(5,0)
2220 IF P%=0 a=GET
2230 NEXT:VDU3:PRINT"REWIND SHEET THEN
PRESS SPACE":ARGL=GET:VDUP%,1,27,1,108,1
,40:PRINT'':PROCprintdays(0):PRINT:FOR M
onth%=7 TO 12:PRINT CHR$129;MID$(MonthNa
me$,Month%*9-8,9):PROCprintmonth(5,0):IF
P%=0 a=GET
2231NEXT:VDUP%,1,27,1,108,1,0
2240 VDU26,3
2250 ENDPROC
2260 DEF PROCprintdays(s%)
2270 LOCAL d,c%,x%
2280 IF s%=0 x%=7
2290 PRINTSPC(x%);
2300 FOR d=0 TO 6
2310 IF d=0 c%=129 ELSE c%=134
2320 IF P%=2 c%=32
2330 PRINT CHR$ c%+STRING$(s%," ")+MID$
(DayName$,d*3+1,3);
2340 NEXT
2350 ENDPROC
2360 DEF PROCprintmonth(type%,s%)
2370 LOCAL max%,xpos%,x%,w%,a$,d$
2380 IF s%=1 a$=" ":w%=4
2390 IF s%=0 x%=7:w%=3
2400 Day%=1
2410 max%=FNmonthL(Month%)
2420 xpos%=FNdayNo MOD7
2430 PRINTSPC(xpos%*(w%+1));
2440 Day%=0
2450 REPEAT
2460 PRINTSPC(x%);
2470 REPEAT
2480 Day%=Day%+1:d$=a$+STR$(Day%)+" ":I
F LEN d$<w% d$=d$+" "
2490 PRINT CHR$(FNmarker(type%));d$;
2500 xpos%=xpos%+1
2510 UNTIL xpos%>6 OR Day%=max%
2520 xpos%=0:PRINT:IF s%=1 PRINT
2530 UNTIL Day%=max%
2540 IF Month%=Meast%:PRINT'CHR$131;"Ea
ster Sunday ";MID$(MonthName$,Meast%*9-8
,9);Deast%
2550 ENDPROC
2560 DEF PROCdiary
2570 LOCAL t%,max%,n%,a$,col%,month%,ye
ar%
2580 VDU14
2590 PROCmydate:PROCprinter:CLS
2600 PROCmyheader:PRINT
2610 PRINT"DAY";CHR$134;SPC(5)"ENTRY"
2620 PROCspacebar
2630 IF Month%=Meast% PRINT;Deast%;CHR$
134;"Easter Sunday":PRINT
2640 FOR t%=0 TO 3
2650 col%=129+t%:IF t%=3 col%=133
2660 IF t%=2 THEN col%=132
2670 IF P%=2 col%=32
2680 max%=VAL(List$(t%,0))
2690 IF max%=0 GOTO 2740
2700 FOR n%=1 TO max%
2710 a$=List$(t%,n%)
2720 IF FNcheck(a$)=1 PRINT STR$(ASC(MI
D$(a$,2,1)));" ";CHR$ col%;RIGHT$(a$,LE
N a$-4)
2730 NEXT
2740 PRINT:IF P%=0 a$=GET$
2750 NEXT
2760 VDU3:a$=GET$
2770 VDU15
2780 ENDPROC
2790 DEF PROCspacebar
2800 VDU3,31,4,24,132,157,135:PRINT"Any
Key to continue ";:VDU156,28,0,23,39,5
,P%
2810 ENDPROC
2820 DEF PROCprinter
2830 PRINT'"Would you like a printout(Y
/N)?":IF FNget("YN")=1 P%=2 ELSE P%=0
2840 ENDPROC
2850 DEF PROCmydate
2860 Month%=FNnoln(1,12,"Month:")
2870 Year%=FNnoln(1753,3299," Year:")
2880 PROCeaster
2890 ENDPROC
2900 DEF PROCmyheader
2910 PRINT F$;MID$(MonthName$,Month%*9-
8,9);" ";Year%;TAB(30)CHR$156
2920 VDU P%:PRINT F$;MID$(MonthName$,Mo
nth%*9-8,9);" ";Year%;TAB(30)CHR$156
2930 ENDPROC