home *** CD-ROM | disk | FTP | other *** search
- 1 REM **********************
- 2 REM * *
- 3 REM * IL DEFLATTORE *
- 4 REM * *
- 5 REM * COPYRIGHT 1986 *
- 6 REM * BY *
- 7 REM * EDITRONICA SRL *
- 8 REM * *
- 9 REM **********************
- 10 IF PEEK(64435) = 234 THEN GOSUB 7500
- 20 CALL -936
- 30 VTAB 10: HTAB 10: PRINT "Un momento, prego..."
- 99 DIM RIGA$(1):RIGA$(1) = " "
- 100 DIM M$(12),MM$(12),M(12),PAR(27,12): GOSUB 2000
- 102 DIM VM(2),OM(2),OA(2),MS(2),AO(2)
- 115 VTAB 1: HTAB 1
- 120 VM(1) = 7:VM(2) = 13:OM(1) = 21:OM(2) = 21:OA(1) = 36:OA(2) = 36:V1 = 10:V2 = 15:VT = 17:OT = 1
- 140 MS(1) = 12:AO(1) = 1986:MS(2) = 12:AO(2) = 1986
- 150 CALL -936: GOSUB 1380: VTAB VM(1): HTAB OM(1) +1: PRINT M$(MS(1));: VTAB VM(1): HTAB OA(1): PRINT AO(1): VTAB VM(2): HTAB OM(2) +1: PRINT M$(MS(2));: VTAB VM(2): HTAB OA(2): PRINT AO(2);
- 1000 REM ----- main -----
- 1020 VTAB 1: HTAB 1: GOSUB 3000: VTAB 1: HTAB 1
- 1030 IF CALC = 1 THEN GOSUB 6000: GOTO 1020
- 1035 IF DIR$ = "DX" THEN 1050
- 1040 IF DIR$ = "SX" THEN 1090
- 1045 IF DIR$ = "SU" OR DIR$ = "GIU" THEN 1150
- 1050 MESE = 1: GOSUB 4000:MS(1) = MS
- 1060 IF CALC = 1 THEN GOSUB 6000: GOTO 1050
- 1070 IF DIR$ = "SX" THEN 1020
- 1080 IF DIR$ = "DX" THEN 1090
- 1082 IF DIR$ = "SU" OR DIR$ = "GIU" THEN 1150
- 1090 ANNO = 1: GOSUB 5000:AO(1) = AO
- 1100 IF CALC = 1 THEN GOSUB 6000: GOTO 1090
- 1110 IF DIR$ = "DX" THEN 1020
- 1115 IF DIR$ = "SX" THEN 1050
- 1120 IF DIR$ = "SU" OR DIR$ = "GIU" THEN 1190
- 1150 MESE = 2: GOSUB 4000:MS(2) = MS
- 1160 IF CALC = 1 THEN GOSUB 6000: GOTO 1150
- 1170 IF DIR$ = "SX" OR DIR$ = "DX" THEN 1190
- 1175 IF DIR$ = "SU" OR DIR$ = "GIU" THEN 1050
- 1190 ANNO = 2: GOSUB 5000:AO(2) = AO
- 1200 IF CALC = 1 THEN GOSUB 6000: GOTO 1190
- 1210 IF DIR$ = "SX" OR DIR$ = "DX" THEN 1150
- 1220 IF DIR$ = "SU" OR DIR$ = "GIU" THEN 1090
- 1380 REM ----- cornice -----
- 1390 CALL -936: FOR KK = 0 TO 39: PRINT "_";: NEXT
- 1393 VTAB 16: FOR KK = 0 TO 39: PRINT "_";: NEXT
- 1395 A$ = " IL DEFLATTORE ": VTAB 1: HTAB INT((41 - LEN(A$))/2): PRINT A$;
- 1397 A$ = " Valido dall'anno 1960 all'anno 1986 ": VTAB 3: HTAB 3: PRINT A$;
- 1398 A$ = " equivalgono a ": VTAB 10: HTAB INT((21 - LEN(A$))/2): PRINT A$;
- 1400 A$ = " lire del ": VTAB 7: HTAB 12: PRINT A$;
- 1402 A$ = " lire del ": VTAB 13: HTAB 12: PRINT A$;
- 1408 VTAB VT: HTAB OT: INVERSE : PRINT "TASTI ABILITATI";: NORMAL : PRINT ":"
- 1409 VTAB VT +1: HTAB OT: PRINT " tasti freccia per spostarsi."
- 1410 VTAB VT +2: HTAB OT: PRINT "'+'/ '-' aumenta/diminuisce mesi e anni."
- 1420 VTAB VT +3: HTAB OT: PRINT "'RETURN' per effettuare i calcoli."
- 1425 VTAB VT +4: HTAB OT: PRINT "'M' per tornare al MENU."
- 1430 VTAB VT +5: HTAB OT: PRINT "<cifre> immette il valore numerico."
- 1440 VTAB VT +6: HTAB OT: PRINT "'Esc' cancella il valore numerico."
- 1500 RETURN
- 2000 REM ----- Parametri -----
- 2005 DATA Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre
- 2007 DATA GENNAIO,FEBBRAIO,MARZO,APRILE,MAGGIO,GIUGNO,LUGLIO,AGOSTO,SETTEMBRE,OTTOBRE,NOVEMBRE,DICEMBRE
- 2010 DATA 31,28,31,30,31,30,31,31,30,31,30,31
- 2020 FOR J = 1 TO 12: READ M$(J): NEXT
- 2025 FOR J = 1 TO 12: READ MM$(J): NEXT
- 2030 FOR J = 1 TO 12: READ M(J): NEXT
- 2050 DATA 11.2863,11.3194,11.3695,11.3528,11.3028,11.2533,11.2206,11.2369,11.2533,11.2533,11.1880,11.1718: REM 1960
- 2060 DATA 11.0755,11.0596,11.0596,10.9965,10.9652,10.9496,10.9496,10.9341,10.9032,10.8870,10.8114,10.7511: REM 1961
- 2070 DATA 10.6587,10.6484,10.5866,10.4551,10.4551,10.4054,10.3660,10.3857,10.3366,10.2977,10.2591,10.1545: REM 1962
- 2080 DATA 9.9877,9.8087,9.7649,9.7130,9.7130,9.7130,9.7216,9.7043,9.6106,9.5187,9.5187,9.4166: REM 1963
- 2090 DATA 9.3720,9.3480,9.3082,9.2688,9.2298,9.1449,9.0918,9.0767,9.0392,8.9873,8.9505,8.9141: REM 1964
- 2100 DATA 8.8707,8.8564,8.8349,8.8136,8.7853,8.7642,8.7362,8.7293,8.7154,8.7084,8.7015,8.6671: REM 1965
- 2110 DATA 8.6397,8.6397,8.6329,8.6057,8.5855,8.5922,8.5855,8.5922,8.5922,8.5653,8.5386,8.5120: REM 1966
- 2120 DATA 8.4784,8.4867,8.4700,8.4533,8.4367,8.4201,8.4036,8.3872,8.3545,8.3627,8.3627,8.3627: REM 1967
- 2130 DATA 8.3302,8.3383,8.3302,8.3140,8.3060,8.3140,8.3221,8.3140,8.2980,8.2900,8.2819,8.2501: REM 1968
- 2140 DATA 8.2264,8.2264,8.1949,8.1560,8.1405,8.1097,8.0564,8.0338,8.0113,7.9741,7.9445,7.9079: REM 1969
- 2150 DATA 7.8644,7.8072,7.7859,7.7508,7.7229,7.7090,7.6952,7.6745,7.6132,7.5796,7.5396,7.5066: REM 1970
- 2160 DATA 7.4701,7.4484,7.4125,7.3911,7.3486,7.3276,7.2997,7.2859,7.2378,7.2039,7.1836,7.1702: REM 1971
- 2170 DATA 7.1303,7.0908,7.0712,7.0517,7.0067,6.6985,6.9370,6.8996,6.8321,6.7421,6.6951,6.6777: REM 1972
- 2180 DATA 6.5973,6.5356,6.4804,6.4048,6.3152,6.2739,6.2433,6.2130,6.1830,6.1141,6.0467,5.9483: REM 1973
- 2190 DATA 5.8710,5.7739,5.6094,5.5406,5.4618,5.3589,5.2311,5.1264,4.9640,4.8634,4.7906,4.7491: REM 1974
- 2200 DATA 4.6939,4.6400,4.6344,4.5710,4.5413,4.4961,4.4699,4.4466,4.4058,4.3509,4.3142,4.2734: REM 1975
- 2210 DATA 4.2310,4.1622,4.0760,3.9584,3.8922,3.8745,3.8512,3.8186,3.7515,3.6291,3.5536,3.5097: REM 1976
- 2220 DATA 3.4618,3.3849,3.3345,3.2998,3.2575,3.2271,3.2027,3.1813,3.1471,3.1137,3.0685,3.0537: REM 1977
- 2230 DATA 3.0246,2.9937,2.9634,2.9315,2.9002,2.8761,2.8546,2.8418,2.8041,2.7735,2.7495,2.7298: REM 1978
- 2240 DATA 2.6779,2.6389,2.6064,2.5643,2.5319,2.5069,2.4840,2.4599,2.4010,2.3463,2.3163,2.2789: REM 1979
- 2250 DATA 2.2063,2.1686,2.1490,2.1155,2.0969,2.0775,2.0429,2.0223,1.9802,1.9468,1.9068,1.8823: REM 1980
- 2260 DATA 1.8480,1.8150,1.7895,1.7646,1.7405,1.7228,1.7083,1.6969,1.6732,1.6408,1.6135,1.5970: REM 1981
- 2270 DATA 1.5760,1.5555,1.5414,1.5275,1.5105,1.4960,1.4743,1.4481,1.4278,1.4003,1.3822,1.3729: REM 1982
- 2280 DATA 1.3537,1.3359,1.3237,1.3101,1.2976,1.2902,1.2780,1.2732,1.2567,1.2361,1.2234,1.2176: REM 1983
- 2290 DATA 1.2032,1.1905,1.1822,1.1740,1.1673,1.1606,1.1567,1.1534,1.1449,1.1335,1.1266,1.1191: REM 1984
- 2300 DATA 1.1076,1.0962,1.0886,1.0793,1.0731,1.0675,1.0641,1.0619,1.0575,1.0450,1.0375,1.0307: REM 1985
- 2310 DATA 1.0259,1.0191,1.0152,1.0123,1.0085,1.0047,1.0047,1.0028,1.0000,0.9944,0.9888,0.9834: REM 1986
- 2350 FOR J = 1 TO 27: FOR J1 = 1 TO 12: READ PAR(J,J1): NEXT : NEXT
- 2360 RETURN
- 2900 REM ----- dati da tastiera -----
- 2902 POKE -16368,0
- 2905 GET A$: IF A$ = "" THEN 2905
- 2920 RETURN
- 3000 REM ----- edit -----
- 3010 R = 1:L = 9:VE = 6:OE = 6:SPACE$ = " "
- 3020 NORMAL : VTAB VE +1: HTAB 1: PRINT " ";
- 3030 INVERSE : FOR J = 1 TO R: VTAB VE +J: HTAB OE -4: PRINT RIGA$(J);: NEXT
- 3040 VC = VE +1:OC = OE
- 3050 VTAB VC: HTAB OC -4: GOSUB 2900
- 3060 IF A$ = CHR$(21) OR A$ = CHR$(11) OR A$ = CHR$(8) OR A$ = CHR$(10) THEN 3100
- 3061 IF A$ = "m" OR A$ = "M" THEN NORMAL : GOSUB 8000: PRINT : PRINT CHR$(4)"RUN HELLO2"
- 3062 IF ASC(A$) < >8 THEN 3070
- 3064 OC = OC -1: IF OC = OE -1 THEN OC = OE +L -1:VC = VC -1: IF VC = VE THEN VC = VE +R
- 3070 IF ASC(A$) = 13 THEN CALC = 1: GOTO 3200
- 3072 IF ASC(A$) = 27 THEN RIGA$(VC -VE) = SPACE$:B$ = "": GOTO 3030
- 3075 IF ASC(A$) <48 OR ASC(A$) >57 THEN CALL -198: GOTO 3050
- 3080 IF OC -OE <1 THEN RIGA$(VC -VE) = A$ + RIGHT$(RIGA$(VC -VE), LEN(RIGA$(VC -VE)) -1): GOTO 3088
- 3082 IF OC -OE >0 AND OC -OE < LEN(RIGA$(VC -VE)) -1 THEN RIGA$(VC -VE) = LEFT$(RIGA$(VC -VE),OC -OE) +A$ + RIGHT$(RIGA$(VC -VE), LEN(RIGA$(VC -VE)) -(OC -OE) -1): GOTO 3088
- 3084 RIGA$(VC -VE) = LEFT$(RIGA$(VC -VE), LEN(RIGA$(VC -VE)) -1) +A$
- 3088 PRINT A$;:OC = OC +1: IF OC = OE +L THEN OC = OE:VC = VC +1: IF VC = VE +R +1 THEN VC = VE +1:
- 3090 GOTO 3050
- 3100 IF PEEK(64435) = 234 THEN GOSUB 7000: GOTO 3200
- 3130 IF ASC(A$) = 10 THEN DIR$ = "SU": GOTO 3200
- 3140 IF ASC(A$) = 11 THEN DIR$ = "GIU": GOTO 3200
- 3150 IF ASC(A$) = 8 THEN DIR$ = "SX": GOTO 3200
- 3160 IF ASC(A$) = 21 THEN DIR$ = "DX": GOTO 3200
- 3190 CALL -198: GOTO 3050
- 3200 NORMAL :CRA = VAL(RIGA$(1)): VTAB VE +1: HTAB OE -4: POKE 33,11: CALL -868: PRINT CRA;: POKE 33,40: RETURN
- 4000 REM ----- Scelta mese -----
- 4003 MS = MS(MESE)
- 4005 GOSUB 4200
- 4010 POKE -16368,0: WAIT -16384,128
- 4012 A$ = CHR$( PEEK( -16384) -128)
- 4015 IF A$ = "m" OR A$ = "M" THEN GOSUB 8000: PRINT : PRINT CHR$(4)"RUN HELLO2"
- 4020 IF A$ = CHR$(13) THEN CALC = 1: GOSUB 4300: RETURN
- 4022 IF A$ = "+" THEN 4150
- 4024 IF A$ = "-" THEN 4100
- 4040 IF PEEK(64435) = 234 THEN GOSUB 7000: GOTO 4095
- 4050 IF A$ = CHR$(10) THEN DIR$ = "GIU": GOTO 4095
- 4060 IF A$ = CHR$(11) THEN DIR$ = "SU": GOTO 4095
- 4070 IF A$ = CHR$(8) THEN DIR$ = "SX": GOTO 4095
- 4080 IF A$ = CHR$(21) THEN DIR$ = "DX": GOTO 4095
- 4090 CALL -198: GOTO 4010
- 4095 GOSUB 4300: RETURN
- 4100 IF MS = 1 THEN MS = 13
- 4110 MS = MS -1: GOSUB 4200: GOTO 4010
- 4150 IF MS = 12 THEN MS = 0
- 4160 MS = MS +1: GOSUB 4200: GOTO 4010
- 4200 INVERSE : VTAB VM(MESE): HTAB OM(MESE): PRINT " ";MM$(MS);" ";: NORMAL : PRINT " ";: RETURN
- 4300 VTAB VM(MESE): HTAB OM(MESE): PRINT " ";M$(MS);" ": RETURN
- 5000 REM ----- Scelta anno -----
- 5003 AO = AO(ANNO)
- 5005 GOSUB 5200
- 5010 POKE -16368,0: WAIT -16384,128
- 5012 A$ = CHR$( PEEK( -16384) -128)
- 5015 IF A$ = "m" OR A$ = "M" THEN GOSUB 8000: PRINT : PRINT CHR$(4)"RUN HELLO2"
- 5020 IF A$ = CHR$(13) THEN CALC = 1: GOSUB 5300: RETURN
- 5022 IF A$ = "+" THEN 5150
- 5024 IF A$ = "-" THEN 5100
- 5040 IF PEEK(64435) = 234 THEN GOSUB 7000: GOTO 5095
- 5050 IF A$ = CHR$(10) THEN DIR$ = "GIU": GOTO 5095
- 5060 IF A$ = CHR$(11) THEN DIR$ = "SU": GOTO 5095
- 5070 IF A$ = CHR$(8) THEN DIR$ = "SX": GOTO 5095
- 5080 IF A$ = CHR$(21) THEN DIR$ = "DX": GOTO 5095
- 5090 CALL -198: GOTO 5010
- 5095 GOSUB 5300: RETURN
- 5100 IF AO = 1960 THEN CALL -198: GOTO 5010
- 5110 AO = AO -1: GOSUB 5200: GOTO 5010
- 5150 IF AO = 1986 THEN CALL -198: GOTO 5010
- 5160 AO = AO +1: GOSUB 5200: GOTO 5010
- 5200 INVERSE : VTAB VM(ANNO): HTAB OA(ANNO): PRINT AO;: NORMAL : RETURN
- 5300 VTAB VM(ANNO): HTAB OA(ANNO): PRINT AO;: RETURN
- 6000 REM ----- calcolo data -----
- 6010 CALC = 0
- 6020 C2 = CRA *PAR(AO(1) -1959,MS(1))/PAR(AO(2) -1959,MS(2))
- 6030 VTAB VM(2): HTAB OE -4: PRINT INT(C2);
- 6230 A$ = "premi un tasto qualunque per proseguire": VTAB V2: HTAB 1: PRINT A$;
- 6250 POKE -16368,0: WAIT -16384,128
- 6260 VTAB VM(2): HTAB OE -5: POKE 33,11: CALL -868: POKE 33,40
- 6270 VTAB V2: HTAB 1: CALL -868: RETURN
- 7000 IF ASC(A$) = 8 THEN DIR$ = "SX": RETURN
- 7010 IF ASC(A$) = 21 THEN DIR$ = "SU": RETURN
- 7020 RETURN
- 7500 POKE 816,169: POKE 817,48: POKE 818,141: POKE 819,246: POKE 820,3: POKE 821,169: POKE 822,3: POKE 823,141: POKE 824,247: POKE 825,3: POKE 826,76: POKE 827,64: POKE 828,3: POKE 829,76
- 7510 POKE 830,76: POKE 831,3: POKE 832,169: POKE 833,83: POKE 834,133: POKE 835,54: POKE 836,169: POKE 837,3: POKE 838,133: POKE 839,55: POKE 840,32: POKE 841,234: POKE 842,3: POKE 843,96
- 7520 POKE 844,32: POKE 845,147: POKE 846,254: POKE 847,32: POKE 848,234: POKE 849,3: POKE 850,96: POKE 851,201: POKE 852,225: POKE 853,144: POKE 854,6: POKE 855,201: POKE 856,251
- 7530 POKE 857,176: POKE 858,2: POKE 859,41: POKE 860,223: POKE 861,76: POKE 862,240: POKE 863,253: POKE 864,0
- 7540 CALL 816
- 7550 RETURN
- 8000 IF PEEK(64435) = 234 THEN CALL 844
- 8010 RETURN