8-Bit Software Online Conversion
Calendar Printer - Listing
10REM Sat,08 Oct 1994.10:51:21
20DEFFNS:$(PAGE+6)=TIME$:="YrPrint"
30ONERROR VDU3:REPORT:PRINTERL:END
40PROCDES
50DAY$=" MON TUE WED THU FRI SA
T SUN"
60MODE128:PRINT"YEAR CALENDAR PRINTER
"'"By C.J.Richardson"'
70INPUT'"Print out how many years? "n
umyears%
80INPUT'"First year to print? "YEAR$:
Y%=VAL(YEAR$)-1
90IF numyears%<>1 PRINT'"Pause betwee
n years? Y/N ":IF GET$="Y" P%=1 ELSE P%=
0
100A%=0
110FORL%=1900TOY%
120A%=A%+1:IF A%=8 A%=1
130IF L%MOD4=0 A%=A%+1:IF A%=8 A%=1
140NEXT
150leaveblank%=-(A%-2)
160FORLquantity=Y%+1 TO Y%+numyears%
170REPEAT
180Y%=Y%+1
190YEAR$=STR$Y%
200IFY%MOD4=0leapyear%=1:ELSEleapyear%
=0
210VDU2
220PRINT'TAB(20);DAY$:REM BJ ;" ! "
230RESTORE
240FORyearloop%=1TO12
250daymonth%=leaveblank%
260PRINT:READMONTH$,Daysinmonth%:IFyea
rloop%=2:IFleapyear% Daysinmonth%=29
270PRINTMONTH$;" ";YEAR$;
280FORmonthloop%=1TO6
290PRINTTAB(20);
300FORweekloop%=1TO7
310IF daymonth%<1 OR daymonth%>Daysinm
onth% PRINT" ";
320IF daymonth%>0 IF daymonth%<10 PRIN
T" ";STR$daymonth%;
330IF daymonth%>9 IF daymonth%<=Daysin
month% PRINT" ";STR$daymonth%;
340PRINT" ";
350daymonth%=daymonth%+1:IFdaymonth%=D
aysinmonth%:leaveblank%=-weekloop%:IFlea
veblank%=-7leaveblank%=0ELSEIFleaveblank
%=-6leaveblank%=1
360NEXT weekloop%::IFdaymonth%>Daysinm
onth%:monthloop%=6
370IFmonthloop%<6:PRINT
380NEXTmonthloop%
390IF leaveblank%=1 PRINT
400NEXTyearloop%
410VDU12
420IF P%=1 VDU3:PRINT"Press a Key":OSC
LI"FX21":REPEATUNTILGET:VDU2
430NEXT
440VDU3
450END
460DEFPROCDES
470REM VDU2,1,27,1,61,1,15,1,0,1,20,1,
ASC"!",1,0,1,0,1,112,1,136,1,170,1,170,1
,188,1,160,1,127,1,72,1,72,1,54,1,3,1,27
,1,73,1,4:REM ! ON BJ
480VDU2
490VDU1,27,1,83,1,1
500VDU1,27,1,48
510VDU3
520ENDPROC
530DATAJANUARY,31,FEBRUARY,28,MARCH,31
,APRIL,30,MAY,31,JUNE,30,JULY,31,AUGUST,
31,SEPTEMBER,30,OCTOBER,31,NOVEMBER,30,D
ECEMBER,31