home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
CALENDAR-MAKER
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
2KB
|
56 lines
5 POKE53280,0:POKE53281,0:PRINT"[155][147]"
10 DIMND(12),MO$(12):OPEN4,4
15 T$=" ---------------------------------------------------------------- "
20 C$="[200] ":T$=" "+T$
25 FORLO=1TO12:READND(LO),MO$(LO):NEXTLO
30 FORLL=1TO7:READDY$:AA$=AA$+" "+DY$:NEXT
35 D=1:MO=1:YR=2000
40 GOSUB200
45 INPUT"MONTH & YEAR (MM,YYYY)";MO,YR
50 GOSUB120
55 XX=(ND(MO)+J)/7:NU=INT(XX):IFXX>NUTHENNU=NU+1
60 IF (YR/4)-INT(YR/4)=0 THEN ND(2)=29
65 SR=(J*10)+4
70 GOSUB300
75 CLR:INPUT"AGAIN (Y/N)";XZ$:IFXZ$="Y"THENRUN
80 CLOSE4
85 END
90 GOSUB300
95 END
99 REM DAY#
100 DATA 31,JANUARY,28,FEBRUARY,31,MARCH,30,APRIL,31,MAY,30,JUNE,31,JULY,31
105 DATA AUGUST,30,SEPTEMBER,31,OCTOBER,30,NOVEMBER,31,DECEMBER
110 DATA SUN,MON,TUE,WED,THU,FRI,SAT
120 Q=YR+(MO<3):J=INT(275*MO/9)-INT((7*Q+7)/4)+367*YR+D-INT((INT(Q/100)+1)*3/4)
125 J=J-4-7*INT((J-4)/7):RETURN
130 RETURN
135 DATA SUN,MON,TUE,WED,THU,FRI,SAT
200 PRINT"[147]":PRINTSPC(10)"* CALENDAR GENERATOR *":PRINT
210 PRINT" INPUT ANY MONTH IN TWO (2) DIGIT FORM AND ANY YEAR IN FOUR (4)";
215 PRINT" DIGIT FORM. A CALENDAR FOR THAT MONTH AND YEAR WILL BE DUMPED";
220 PRINT" TO THE PRINTER."
225 PRINT:PRINT:PRINT" [158]TURN ON PRINTER NOW![155] "
230 PRINT:PRINT:PRINT" HIT ANY KEY TO CONTINUE"
235 GETG$:IFG$=""THEN235
240 RETURN
300 CE=(64-LEN(MO$(MO))*2-12
14905 PRINT#4:PRINT#4,SPC(CE)CHR$(14);MO$(MO)+" ";YR
305 PRINT#4,CHR$(15):PRINT#4
310 IN=4:GU=0:N9$="01":N9=1
315 PRINT#4,SPC(7)AA$
320 PRINT#4,T$
325 FORLO=1TONU
330 PRINT#4," ";
335 FORL3=1TO7
340 IN=IN+9:IFIN>=SRTHENGU=1
345 IFN9>ND(MO)THENGU=0
350 IFGU=0THEN360
355 PRINT#4,LEFT$(C$,7);RIGHT$(N9$,2);:N9=N9+1:N9$="0"+MID$(STR$(N9),2):GOTO365
360 PRINT#4,C$;
365 NEXTL3:PRINT#4,"[200]"
370 FORL2=2TO8
375 PRINT#4," ";C$;C$;C$;C$;C$;C$;C$;"[200]":NEXTL2
380 PRINT#4,T$
385 NEXTLO:PRINT#4,CHR$(12)
390 RETURN