Calendar

Date: 198x
Type: Program
Platform(s): TS 2068

Simple program to display a calendar month.

Appears on

One of a series of library tapes. Programs on these tapes were renamed to a number series. This tape contained programs 20001 to 20050. These tapes were compiled by Tony Willing.

Gallery

Calendar

Source Code

   20 POKE 23658,8: BORDER 5: PAPER 6
   30 LET A$="CDJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDECSUN MON TUE WED THU FRI SAT"
   40 INPUT "ENTER MONTH ";B$
   50 FOR M=1 TO 12
   60 IF B$(1 TO 3)=A$(3*M TO 3*M+2) THEN GO TO 90
   70 NEXT M
   80 GO TO 40
   90 INPUT "ENTER YEAR ";Y
  100 IF Y<1752 THEN PRINT "YEAR CANNOT BE LESS THAN 1752": GO TO 90
  110 CLS 
  120 PRINT AT 3,10;B$;" ";Y
  130 PRINT AT 6,3;A$(39 TO )
  140 GO SUB 250
  150 PRINT AT 8,Z*4+3;
  160 LET M=M+1
  170 GO SUB 250
  180 LET Z=Z+7*(Z=0)
  200 FOR I=1 TO 31
  210 PRINT " " AND I<10;I;"  ";
  220 IF I>27 AND 30-PEEK 23688=Z*4 THEN GO TO 500
  230 IF PEEK 23688=2 THEN PRINT ''"   ";
  240 NEXT I
  250 LET X=(M=1)+(M=2)
  260 LET L=Y-X
  270 LET X=M+X*12
  280 LET P=INT (L/100)
  290 LET Z=INT (13*(X+1)/5)+INT (5*L/4)+INT (P/4)-P
  300 LET Z=Z-7*INT (Z/7)
  310 RETURN 

People

No people associated with this content.

Scroll to Top