home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
C64
/
GFX
/
STATSTOR.SDA
/
SS-1
(
.txt
)
next >
Wrap
Commodore BASIC
|
2000-06-30
|
2KB
|
80 lines
4100 POKE53280,0:POKE53281,0:PRINT"[147][158]";SPC(12)"[195]ALENDAR [208]RINTER"
4110 FORI=1TO40:PRINT"[163]";:NEXTI
4120 INPUT"[205]ONTH (1-12)";M
4130 IF M<1 OR M>12 THEN 4120
4140 INPUT"[217]EAR (YYYY)";YR
4150 IFYR<1904ORYR>2099THENPRINT"[207]NLY YEARS FROM 1904-2099 ARE COVERED":GOTO4140
4160 OPEN10,4,10:PRINT#10:CLOSE10:OPEN4,4
4170 DIM A$(10):LF=13
4180 DIM M$(12,2),C(6,7),AA$(10)
4190 FORI=1TO12:READM$(I,1):NEXTI
4200 N$=M$(M,1)+STR$(YR)
4210 DATA " J A N U A R Y "
4220 DATA " F E B R U A R Y "
4230 DATA " M A R C H "
4240 DATA " A P R I L "
4250 DATA " M A Y "
4260 DATA " J U N E "
4270 DATA " J U L Y "
4280 DATA " A U G U S T "
4290 DATA " S E P T E M B E R "
4300 DATA " O C T O B E R "
4310 DATA " N O V E M B E R "
4320 DATA " D E C E M B E R "
4330 FORI=1TO12:READM$(I,2):NEXT
4340 DATA 31,28,31,30,31,30,31
4350 DATA 31,30,31,30,31
4360 DM=VAL(M$(M,2))
4370 IF4*INT(YR/4)=YRANDM=2THENDM=29
4380 Y=YR:IFM<3THENY=Y-1
4390 R%=(Y-1903)/4
4400 P1=5*R%:S=Y-1903-4*R%
4410 IFS>0THENP1=P1+1+S
4420 IFM=1ORM=5THENP1=P1+5:GOTO4480
4430 IFM=2ORM=6THENP1=P1+1:GOTO4480
4440 IFM=4ORM=7THENP1=P1+3:GOTO4480
4450 IFM=8THENP1=P1-1:GOTO4480
4460 IFM=9ORM=12THENP1=P1+2:GOTO4480
4470 IFM=10THENP1=P1+4:GOTO4480
4480 P1=P1-7*INT(P1/7)
4490 FORX=1TO6:FORY=1TO7:C(X,Y)=-1:NEXTY,X
4500 D=1:FORZ=P1+1TO100
4510 X=INT((Z-1)/7)+1
4520 Y=Z-7*INT((Z-1)/7)
4530 C(X,Y)=D
4540 D=D+1:IF D>DM THEN 4560
4550 NEXTZ
4560 L1$="[194]":FORX=1TO69:L1$=L1$+" ":NEXTX:L1$=L1$+"[194]"
4570 L$="":FORX=1TO71:L$=L$+"-":NEXTX
4580 FORX=0TO10:READ AA$(X):NEXTX
4590 DATA 0,1,2,3,4,5,6,7,8,9," "
4600 S$=" ":D$="[194] ":S1$="[194] ":E$=" "
4610 PRINT#4,S$;L$;CHR$(LF);
4620 PRINT#4,S$;L1$;CHR$(LF);:PRINT#4,S$;L1$;CHR$(LF);
4630 PRINT#4,S$;"[194] ";N$;" [194]";CHR$(LF);
4640 PRINT#4,S$;L1$;CHR$(LF);:PRINT#4,S$;L1$;CHR$(LF);
4650 PRINT#4,S$;L$;CHR$(LF);
4660 PRINT#4,S$;D$;D$;D$;D$;D$;D$;D$;"[194]";CHR$(LF);
4670 PRINT#4,S$;"[194] SUN [194] MON [194] TUE [194] WED [194] THU [194]";
4680 PRINT#4," FRI [194] SAT [194]";CHR$(LF);
4690 PRINT#4,S$;D$;D$;D$;D$;D$;D$;D$;"[194]";CHR$(LF);
4700 PRINT#4,S$;L$;CHR$(LF);
4710 FORW=1TO6
4720 T=0:FORZZ=1TO7:T=T+C(W,ZZ):NEXTZZ:IF T=-7 THEN 4830
4730 PRINT#4,S$;D$;D$;D$;D$;D$;D$;D$;"[194]";CHR$(LF);
4740 PRINT#4,S$;
4750 FORY=1TO7:Z=C(W,Y)
4760 IF Z=-1THENA1=10:A2=10:GOTO4790
4770 A1=INT(Z/10):IFA1=0THENA1=10
4780 A2=Z-(INT(Z/10)*10)
4790 PRINT#4,S1$;AA$(A1);AA$(A2);E$;
4800 NEXTY:PRINT#4,"[194]";CHR$(LF);
4810 FORX=1TO6:PRINT#4,S$;D$;D$;D$;D$;D$;D$;D$;"[194]";CHR$(LF);:NEXTX
4820 PRINT#4,S$;L$;CHR$(LF);
4830 NEXTW:CLOSE4
4840 PRINT"[147][A]GAIN OR [M]ENU?"
4850 GETA$
4860 IFA$="A" THEN RUN4100
4870 IFA$="M" THEN LOAD"STA-STORE2",8,1:RUN
4880 IFA$<>"A"ORA$<>"M"THEN4850