kalender_sss.tap
kalender_sss.z80
Zeichensatz UTF-8+Z1013()+CTRL()-ohne Umlaute(äöüß)

    5 CLS
   10 REM   KALENDER 
   20 DIM M$(12),L(12),A(12)
   30 INPUT "Jahreszahl";JA
   35 CLS
   50 PRINT SPC(16)"Kalender fuer ";JA
   60 PRINT SPC(15)STRING$(21,"=")
   70 DATA "Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Sonnabend"
   80 DATA "Sonntag"
   90 DATA "Januar",31,"Februar",28,"Maerz",31,"April",30,"Mai",31,"Juni",30
  100 DATA "Juli",31,"August",31,"September",30,"Oktober",31,"November",30
  110 DATA "Dezember",31
  120 A(1)=365*JA+INT((JA-1)/4)+5
  130 A(1)=A(1)-INT(A(1)/7)*7+1
  200 FOR K=1 TO 7
  210 READ W$(K):NEXT K
  220 FOR K=1 TO 12
  230 READ M$(K),L(K):NEXT K
  240 IF INT(JA/4)=JA/4 THEN L(2)=29
  300 FOR K=2 TO 12
  310 A(K)=L(K-1)-28+A(K-1)
  320 IF A(K)>7 THEN A(K)=A(K)-7
  330 NEXT K
  400 FOR K=1 TO 11 STEP 2
  410 PRINT TAB(12);M$(K);TAB(38);M$(K+1)
  420 FOR I=1 TO 7
  430 PRINT W$(I);
  440 Y=11
  450 IF I<A(K)THEN Y=Y+4:T=I-A(K)+8:GOTO 470
  451 PRINT AT(23,37);K
  460 T=I-A(K)+1
  470!
  471 PRINT TAB(Y);T;:D=T
  480 Y=Y+4:T=T+7
  490 IF T<=L(K) THEN D=0:GOTO 470
  500 K=K+1 
  510 IF Y>50 THEN K=K-2:Y=37:GOTO 530
  520 Y=37:GOTO 450
  530 PRINT:NEXT I
  540 PRINT
  550 NEXT K
  560 END