1 REM BASICODE 2 ROUTINES DOOR HENK WEVERS
2 REM NADERE INLICHTINGEN BASICODE
3 REM NOS, HOBBYSCOOP HILVERSUM  
5 PRINT CHR$(26);:WIDTH(255)
10 GOTO 1000
20 GOTO 1010
100 PRINT CHR$(26);:RETURN
110 REM
111 IF HO>51 THEN HO=51
112 IF VE>23 THEN VE=23
113 PRINT CHR$(27);"=";CHR$(VE+32);CHR$(HO+32);
115 RETURN
120 HO=PEEK(&HEF5A):VE=PEEK(&HEF5B)-&HF0
121 VE=VE*2
122 IF HO>127 THEN HO=HO-128:VE=VE+1
123 VE=VE-PEEK(&HEF62):IF VE<0 THEN VE=32+VE
124 RETURN
200 IN$=INKEY$:RETURN
210 GOSUB 200:IF IN$="" THEN 210
211 RETURN
250 PRINT CHR$(7);:RETURN
260 RV=RND(1):RETURN
270 FR=FRE(2):RETURN
300 SR$=STR$(SR)
301 Q7=LEN(SR$):IF Q7=0 THEN RETURN
302 IF RIGHT$(SR$,1)<>" " THEN 304
303 SR$=LEFT$(SR$,Q7-1):GOTO 301
304 IF LEFT$(SR$,1)<>" " THEN RETURN
305 SR$=RIGHT$(SR$,Q7-1):GOTO 301
310 Q4=SR:IF CN<>0 THEN 316
312 SR=INT(SR+.5):GOSUB 300:GOTO 330
316 Q5=SGN(SR):SR=ABS(SR):Q8=INT(SR):Q9=SR-Q8
318 FOR Q6=1 TO CN:Q9=Q9*10:NEXT Q6
320 Q9=INT(Q9+.5):SR=Q9:GOSUB 300
322 Q9$=RIGHT$("00000000000000000000"+SR$,CN)
324 IF Q8=0 AND Q9=0 THEN Q5=1
326 SR=Q8:GOSUB 300:IF Q5=-1 THEN SR$="-"+SR$
328 SR$=SR$+"."+Q9$
330 IF LEN(SR$)<=CT THEN 334
332 SR$=LEFT$("********************",CT):GOTO 340
334 SR$=RIGHT$("                    "+SR$,CT)
340 SR=Q4:RETURN
350 LPRINT SR$;:RETURN
360 LPRINT:RETURN
1000 A=500:GOTO 20
1010 Z=0:LJ=0:GOSUB 100:REM WISSEN
1020 GOTO 5020:REM INITIALISATIES
1030 REM
1040 REM ** HOOFDPROGRAMMA **
1050 REM 
1060 GOSUB 3220:REM UITLEG
1070 GOSUB 4020:REM UITLEG(2)+KEUZE
1080 IF Z=1 THEN END
1090 GOSUB 2320:REM SCHRIKKELJAAR?
1100 M(2)=M(0)+S
1110 DE=0
1120 FOR T=1 TO M:DB=DE:DE=DB+M(T):NEXT T
1130 A$="":B$=""
1140 FOR T=1 TO 31:A$(T)="  ":NEXT T
1150 IF J=LJ THEN 1180
1160 GOSUB 2520:REM PAASDATUM
1170 LJ=J
1180 I=J-1
1190 U=J+INT(I/4)-INT(I/100)+INT(I/400)
1200 T=U+DB:N=7:GOSUB 2030
1210 Y=-R
1220 FOR N=0 TO 5:K(N)=0:NEXT N
1230 IF M>6 THEN 1250
1240 GOSUB 2760:REM FEESTDAGEN?
1250 IF M<>12 THEN 1270
1260 GOSUB 2120:REM KERSTDAGEN
1270 GOSUB 100:PRINT"         ";B$(M);" ";J:PRINT
1280 PRINT"--------------------------------------"
1290 GOSUB 3620:REM PRINTEN
1300 PRINT
1310 PRINT"--------------------------------------"
1320 PRINT:PRINT A$;" ";B$:PRINT
1330 GOSUB 4200:REM KEUZE
1340 GOTO 1080
1350 :
2000 REM **BEPALING QUOTIENT +
2010 REM **REST VAN DE BREUK
2020 REM 
2030 Q=INT(T/N):R=T-Q*N:RETURN
2040 :
2100 REM **KERSTDAGEN
2110 REM 
2120 A$="K = Kerstmis"
2130 A$(25)=":K"
2140 A$(26)=":K"
2150 T=24-Y:N=7:GOSUB 2030
2160 K(Q)=1:T=25-Y:GOSUB 2030
2170 K(Q)=1
2180 RETURN
2190 :
2300 REM **SCHRIKKELJAAR ?
2310 REM 
2320 S=0:T=J:N=4:GOSUB 2030
2330 IF R<>0 THEN 2390
2340 S=1:N=100:GOSUB 2030
2350 IF R<>0 THEN 2390
2360 S=0:N=400:GOSUB 2030
2370 IF R<>0 THEN 2390
2380 S=1
2390 RETURN
2400 :
2500 REM **PAASDATUM ?
2510 REM 
2520 T=J:N=19:GOSUB 2030
2530 A=R:T=J:N=100:GOSUB 2030
2540 B=Q:C=R:T=B:N=4:GOSUB 2030
2550 D=Q:E=R:T=B+8:GOSUB 2030
2560 F=Q:T=B-F+1:N=3:GOSUB 2030
2570 G=Q:T=19*A+B-D-G+15:N=30:GOSUB 2030
2580 H=R:T=C:N=4:GOSUB 2030
2590 I=Q:K=R:T=32+E+E+I+I-H-K:N=7:GOSUB 2030
2600 L=R:T=A+11*H+22*L:N=451:GOSUB 2030
2610 O=Q:T=H+L-7*O+114:N=31:GOSUB 2030
2620 MA=Q:DA=R+1:RETURN
2630 :
2700 REM **BEPALING CARNAVAL-,
2710 REM **PAAS-, HEMELVAART-
2720 REM **OF PINKSTERDAG IN DE
2730 REM **AF TE DRUKKEN MAAND
2750 REM 
2760 C(4)=59+S+DA+(MA-3)*31
2770 C(1)=C(4)-49:C(2)=C(4)-48
2780 C(3)=C(4)-47:C(5)=C(4)+1
2790 C(6)=C(4)+39:C(7)=C(4)+49
2800 C(8)=C(4)+50
2810 FOR T=1 TO 3:X=C(T)-DB
2820 IF X<1 THEN 2860
2830 IF X>M(M)THEN 2860
2840 A$(X)=":C"
2850 A$="C = Carnaval"
2860 NEXT T
2870 FOR T=4 TO 5:X=C(T)-DB
2880 IF X<1 THEN 2920
2890 IF X>M(M)THEN 2920
2900 A$(X)=":P"
2910 A$="P = Pasen"
2920 NEXT T
2930 X=C(6)-DB
2940 IF X<1 THEN 2980
2950 IF X>M(M)THEN 2980
2960 A$(X)=":H"
2970 A$="H = Hemelvaart"
2980 FOR T=7 TO 8
2990 X=C(T)-DB
3000 IF X<1 THEN 3040
3010 IF X>M(M)THEN 3040
3020 A$(X)=":P"
3030 B$="P = Pinksteren"
3040 NEXT T
3050 :
3100 REM *FEESTDAG IN KOLOM?
3110 REM 
3120 FOR X=1 TO M(M)
3130 IF A$(X)="  "THEN 3160
3140 T=X-Y-1:N=7:GOSUB 2030
3150 K(Q)=1
3160 NEXT X:RETURN
3170 :
3200 REM **SUBR.UITLEG
3210 REM 
3220 PRINT"****************************"
3230 PRINT"*                          *"
3240 PRINT"*         KALENDER         *"
3250 PRINT"*                          *"
3260 PRINT"****************************"
3270 PRINT
3280 PRINT:PRINT"Dit programma geeft steeds"
3290 PRINT:PRINT"per maand een kalenderblad."
3300 PRINT:PRINT"Carnaval, Pasen, Hemelvaart,"
3310 PRINT:PRINT"Pinksteren en Kerstmis wor-"
3320 PRINT:PRINT"den hierbij aangegeven."
3330 PRINT
3340 PRINT
3350 GOSUB 4920
3360 GOSUB 100:REM *WISSEN
3370 PRINT"U moet eerst de maand en het"
3380 PRINT:PRINT"jaar opgeven."
3390 PRINT:PRINT"Daarna kunt U een volgende"
3400 PRINT:PRINT"maand kiezen met een enkele"
3410 PRINT:PRINT"toets, te weten:"
3420 PRINT
3430 PRINT:PRINT"'N' als U een nieuwe maand wilt"
3440 PRINT:PRINT"'T' als U terug wilt (vorige)"
3450 PRINT:PRINT"'V' als U verder wilt"
3460 PRINT:PRINT"'S' als U wilt stoppen"
3470 PRINT
3480 PRINT
3490 GOSUB 4920
3500 RETURN
3510 :
3600 REM **PRINTEN
3610 REM 
3620 CT=2:CN=0
3630 FOR A=1 TO 7
3640 :PRINT:PRINT D$(A)
3650 NEXT A
3660 VE=2-2*Y:HO=4
3670 FOR SR=1 TO M(M)
3680 VE=VE+2
3690 IF VE>17 THEN VE=VE-14:HO=HO+6
3700 GOSUB 110:GOSUB 310:PRINT SR$;A$(SR)
3710 NEXT SR
3720 VE=17:HO=0:GOSUB 110
3730 RETURN
3740 :
4000 REM **SUBR. UITLEG(2)
4010 REM 
4020 GOSUB 100:REM *WISSEN
4030 PRINT"Geef maandnummer, jaar"
4040 PRINT
4050 PRINT"Dus voor bijv. Mei 1982"
4060 PRINT
4070 PRINT"Typt U dan :   5,1982"
4080 PRINT
4090 PRINT
4100 REM *SUBROUTINE DATUM INVOER
4110 PRINT"Maand, Jaar: ";:INPUT M,J
4120 M=INT(M):IF M>12 OR M<1 THEN 4260
4130 J=INT(J)
4140 IF J>9999 THEN 4310
4150 IF J<1583 THEN 4350
4160 RETURN
4170 :
4200 PRINT"   N , V , T , S : ";:GOSUB 210
4210 GOSUB 100
4220 IF IN$="T"OR IN$="t"THEN 4520
4230 IF IN$="V"OR IN$="v"THEN 4620
4240 IF IN$="S"OR IN$="s"THEN 4720
4250 IF IN$="N"OR IN$="n"THEN 4020
4260 PRINT
4270 PRINT"FOUTIEVE INVOER !!!!!!"
4280 PRINT:PRINT:PRINT
4300 GOTO 4030
4310 PRINT:PRINT"Jaartallen boven 9999 worden"
4320 PRINT:PRINT"NIET verwerkt !"
4330 FOR T=1 TO 4000:NEXT T
4340 GOTO 4020
4350 PRINT:PRINT"Tot 1582 gold de Juliaanse"
4360 PRINT:PRINT"kalender. Schrijf het programma"
4370 PRINT:PRINT"daarvoor maar zelf !"
4380 FOR T=1 TO 4000:NEXT T
4390 GOTO 4020
4400 :
4500 REM **TERUG
4510 REM 
4520 M=M-1
4530 IF M>0 THEN 4140:REM *INPUT(2)
4540 M=12
4550 J=J-1
4560 GOTO 4140:REM *INPUT(2)
4570 :
4600 REM **VOLGENDE
4610 REM 
4620 M=M+1
4630 IF M<13 THEN 4140:REM *INPUT(2)
4640 M=1
4650 J=J+1
4660 GOTO 4140:REM *INPUT(2)
4670 :
4700 REM **STOPPEN
4710 REM 
4720 GOSUB 100:REM *WISSEN
4730 PRINT:PRINT"U Koos voor stoppen"
4740 PRINT:PRINT"Voor opnieuw beginnen 'RUN' intypen"
4750 Z=1:RETURN
4760 :
4900 REM **WACHT OP INPUT
4910 REM
4920 PRINT"                     >RETURN";
4930 GOSUB 210:RETURN
4940 :
5000 REM **INITIALISATIES
5010 REM
5020 DIM A$(31),B$(12),D$(7),C$(8),M(12),K(5),C(8)
5030 FOR T=1 TO 12:READ B$(T):NEXT T
5040 FOR T=1 TO 7:READ D$(T):NEXT T
5050 FOR T=0 TO 12:READ M(T):NEXT T
5060 GOTO 1060
5070 :
30000 DATA"Januari","Februari","Maart"
30010 DATA"April","Mei","Juni","Juli"
30020 DATA"Augustus","September","Oktober"
30030 DATA"November","December"
30040 DATA"Zo","Ma","Di"
30050 DATA"Wo","Do","Vr","Za"
30060 DATA 28,31,00,31,30,31,30
30070 DATA   31,31,30,31,30,31
30080 :
30090 REM ********************
30100 REM *                  *
30110 REM *     KALENDER     *
30120 REM *                  *
30130 REM *  INCL.FEESTDAGEN *
30140 REM *                  *
30150 REM * MAKER:E. IVENS,  *
30160 REM *       DOETINCHEM *
30170 REM *                  *
30180 REM ********************
30190 REM
30200 REM  GEMAAKT OP APPLE II
30210 REM
30220 REM  VERSIE: 17-5-1982
30230 REM
30240 REM  ZIE VOOR DE BEPALING
30250 REM  VAN DE PAASDATUM:
30260 REM  HEMEL EN DAMPKRING,
30270 REM  APRIL 1973; OF HET
30280 REM  BOEK VAN J. MEEUS.
30290 REM
M  VAN DE PAASDATUM:
30260 REM  HEMEL EN DAMPKRING,
30270 REM  APRIL 1973; OF HET
3