home *** CD-ROM | disk | FTP | other *** search
- 100 REM *********************
- 110 REM * *
- 120 REM * COSTELLAZIONI *
- 130 REM * - Riccardo Ronco *
- 140 REM * *
- 150 REM * (C) 1990 by *
- 160 REM * AppleDISK *
- 170 REM * *
- 180 REM *********************
- 190 :
- 200 IF PEEK(104) = 8 THEN POKE 104,96: POKE 103,1: POKE 24576,0: PRINT CHR$(4);"RUN COSTELLAZIONI": END
- 210 HGR2 : PRINT CHR$(4);"BLOAD COSTELL.PIC,A$4000": FOR K = 1 TO 5000: NEXT
- 220 PRINT CHR$(4);"BLOAD COSTELL.SHAPES,A$800"
- 230 POKE 232,0: POKE 233,8
- 240 POKE 230,32: CALL 62450: POKE 230,64: CALL 62450
- 250 CLEAR :D$ = CHR$(4): PRINT CHR$(21): PRINT : TEXT : HOME
- 260 DIM X(24),Y(24),SI$(11)
- 270 FOR X = 768 TO 783: READ A: POKE X,A: NEXT
- 280 DATA 173,85,192,169,32,133,230,96,173,84,192,169,64,133,230,96
- 290 ONERR GOTO 320
- 300 PRINT : PRINT D$"PR#4": PRINT CHR$(1): PRINT D$"PR#0": REM *** ABILITA MOUSE ***
- 310 GOTO 540
- 320 POKE 216,0: IF PEEK(222) < >3 THEN PRINT "ERRORE...": END
- 330 INVERSE : PRINT " C O S T E L L A Z I O N I ";: PRINT " DI RICCARDO RONCO - APPLEDISK ": NORMAL
- 340 FOR K = 1 TO 3: PRINT CHR$(7): NEXT : VTAB 10: PRINT "SPIACENTE, QUESTO PROGRAMMA RICHIEDE": PRINT "UN MOUSE COLLEGATO ALLO SLOT 4."
- 350 END
- 360 REM *** SPAZIO PER LE SUBROUTINES ***
- 370 REM *** LETTURA FILE COSTELL.DATA,L47 ***
- 380 HOME : HGR2 : HGR : POKE -16302,0
- 390 HCOLOR= 3: SCALE= 1: ROT= 0
- 400 PRINT D$;"OPEN COSTELL.DATA,L47"
- 410 VF = IN +VI -1
- 420 K = 1
- 430 FOR X = VI TO VF
- 440 PRINT D$;"READ COSTELL.DATA,R";X
- 450 INPUT X$: INPUT Y$: INPUT S$: INPUT N$: INPUT C$: INPUT M$: PRINT D$
- 460 XX = VAL(X$):YY = VAL(Y$):S = VAL(S$)
- 470 X(K) = XX:Y(K) = YY:K = K +1
- 480 POKE 230,32: XDRAW (5 -S) AT XX,YY
- 490 POKE 230,64: XDRAW (5 -S) AT XX,YY
- 500 NEXT X
- 510 POKE 230,32: HPLOT 0,0 TO 279,0 TO 279,191 TO 0,191 TO 0,0: XDRAW 6 AT 0,0
- 520 POKE 230,64: HPLOT 0,0 TO 279,0 TO 279,191 TO 0,191 TO 0,0: XDRAW 6 AT 0,0
- 530 PRINT D$;"CLOSE": RETURN
- 540 HT = 2:SN = 6:HL = 2: PRINT D$;"FRE"
- 550 HL$(0) = " C O S T E L L A Z I O N I "
- 560 HL$(1) = " DI RICCARDO RONCO - APPLEDISK "
- 570 SI$(1) = "COSTELLAZIONI IN PRIMAVERA"
- 580 SI$(2) = "COSTELLAZIONI IN ESTATE"
- 590 SI$(3) = "COSTELLAZIONI IN AUTUNNO"
- 600 SI$(4) = "COSTELLAZIONI IN INVERNO"
- 610 SI$(5) = "COSTELLAZIONI NEL BLOCCO CIRCUMPOLARE"
- 620 SI$(6) = "FINE"
- 630 GOSUB 2240
- 640 ON CS GOTO 650,850,1110,1330,1550,1710
- 650 HT = 2:SN = 8:HL = 1
- 660 HL$(0) = " COSTELLAZIONI IN PRIMAVERA "
- 670 SI$(1) = "BOOTES"
- 680 SI$(2) = "CORONA BOREALIS"
- 690 SI$(3) = "LEO"
- 700 SI$(4) = "HIDRA"
- 710 SI$(5) = "LIBRA"
- 720 SI$(6) = "VIRGO"
- 730 SI$(7) = "CORVUS"
- 740 SI$(8) = "MENU PRINCIPALE"
- 750 GOSUB 2240
- 760 ON CS GOTO 770,780,790,800,810,820,830,840
- 770 VI = 1:IN = 7: GOTO 1810
- 780 VI = 8:IN = 7: GOTO 1810
- 790 VI = 15:IN = 10: GOTO 1810
- 800 VI = 25:IN = 17: GOTO 1810
- 810 VI = 42:IN = 4: GOTO 1810
- 820 VI = 46:IN = 10: GOTO 1810
- 830 VI = 56:IN = 6: GOTO 1810
- 840 GOTO 540
- 850 HT = 2:SN = 11:HL = 1
- 860 HL$(0) = " COSTELLAZIONI IN ESTATE "
- 870 SI$(1) = "AQUILA"
- 880 SI$(2) = "CAPRICORNUS"
- 890 SI$(3) = "CYGNUS"
- 900 SI$(4) = "DELPHINUS"
- 910 SI$(5) = "HERCULES"
- 920 SI$(6) = "LYRA"
- 930 SI$(7) = "OPHIUCHUS"
- 940 SI$(8) = "SAGITTA"
- 950 SI$(9) = "SAGITTARIUS"
- 960 SI$(10) = "SCORPIUS"
- 970 SI$(11) = "MENU PRINCIPALE"
- 980 GOSUB 2240
- 990 ON CS GOTO 1000,1010,1020,1030,1040,1050,1060,1070,1080,1090,1100
- 1000 VI = 62:IN = 9: GOTO 1810
- 1010 VI = 71:IN = 12: GOTO 1810
- 1020 VI = 83:IN = 6: GOTO 1810
- 1030 VI = 89:IN = 5: GOTO 1810
- 1040 VI = 94:IN = 13: GOTO 1810
- 1050 VI = 107:IN = 6: GOTO 1810
- 1060 VI = 113:IN = 23: GOTO 1810
- 1070 VI = 136:IN = 4: GOTO 1810
- 1080 VI = 140:IN = 18: GOTO 1810
- 1090 VI = 158:IN = 20: GOTO 1810
- 1100 GOTO 540
- 1110 HT = 2:SN = 9:HL = 1
- 1120 HL$(0) = " COSTELLAZIONI IN AUTUNNO "
- 1130 SI$(1) = "AQUARIUS"
- 1140 SI$(2) = "ARIES"
- 1150 SI$(3) = "CETUS"
- 1160 SI$(4) = "ANDROMEDA E PEGASO"
- 1170 SI$(5) = "PERSEUS (PERSEO)"
- 1180 SI$(6) = "PISCES"
- 1190 SI$(7) = "PISCIS AUSTRINUS"
- 1200 SI$(8) = "TRIANGULUM"
- 1210 SI$(9) = "MENU PRINCIPALE"
- 1220 GOSUB 2240
- 1230 ON CS GOTO 1240,1250,1260,1270,1280,1290,1300,1310,1320
- 1240 VI = 178:IN = 24: GOTO 1810
- 1250 VI = 202:IN = 3: GOTO 1810
- 1260 VI = 205:IN = 15: GOTO 1810
- 1270 VI = 220:IN = 20: GOTO 1810
- 1280 VI = 240:IN = 19: GOTO 1810
- 1290 VI = 259:IN = 17: GOTO 1810
- 1300 VI = 276:IN = 7: GOTO 1810
- 1310 VI = 283:IN = 3: GOTO 1810
- 1320 GOTO 540
- 1330 HT = 2:SN = 9:HL = 1
- 1340 HL$(0) = " COSTELLAZIONI IN INVERNO "
- 1350 SI$(1) = "AURIGA"
- 1360 SI$(2) = "CANCER"
- 1370 SI$(3) = "CANIS MAJOR"
- 1380 SI$(4) = "CANIS MINOR"
- 1390 SI$(5) = "ERIDANUS"
- 1400 SI$(6) = "GEMINI"
- 1410 SI$(7) = "LEPUS"
- 1420 SI$(8) = "ORION"
- 1430 SI$(9) = "MENU PRINCIPALE"
- 1440 GOSUB 2240
- 1450 ON CS GOTO 1460,1470,1480,1490,1500,1510,1520,1530,1540
- 1460 VI = 286:IN = 9: GOTO 1810
- 1470 VI = 295:IN = 5: GOTO 1810
- 1480 VI = 300:IN = 6: GOTO 1810
- 1490 VI = 306:IN = 3: GOTO 1810
- 1500 VI = 309:IN = 14: GOTO 1810
- 1510 VI = 323:IN = 10: GOTO 1810
- 1520 VI = 333:IN = 8: GOTO 1810
- 1530 VI = 341:IN = 9: GOTO 1810
- 1540 GOTO 540
- 1550 HT = 2:SN = 6:HL = 1
- 1560 HL$(0) = " COSTELLAZIONI NEL BLOCCO CIRCUMPOLARE "
- 1570 SI$(1) = "CASSIOPEA"
- 1580 SI$(2) = "CEPHEUS"
- 1590 SI$(3) = "DRACO"
- 1600 SI$(4) = "URSA MAJOR"
- 1610 SI$(5) = "URSA MINOR"
- 1620 SI$(6) = "MENU PRINCIPALE"
- 1630 GOSUB 2240
- 1640 ON CS GOTO 1650,1660,1670,1680,1690,1700
- 1650 VI = 350:IN = 6: GOTO 1810
- 1660 VI = 356:IN = 11: GOTO 1810
- 1670 VI = 367:IN = 19: GOTO 1810
- 1680 VI = 386:IN = 8: GOTO 1810
- 1690 VI = 394:IN = 7: GOTO 1810
- 1700 GOTO 540
- 1710 HT = 12:SN = 3:HL = 1
- 1720 HL$(0) = " FINE PROGRAMMA "
- 1730 SI$(1) = "MENU PRINCIPALE"
- 1740 SI$(2) = "PRODOS"
- 1750 SI$(3) = "APPLESOFT"
- 1760 GOSUB 2240
- 1770 ON CS GOTO 1780,1790,1800
- 1780 GOTO 540
- 1790 TEXT : HOME : PRINT D$"BYE"
- 1800 TEXT : HOME : END
- 1810 REM *** VISUALIZZAZIONE ***
- 1820 GOSUB 370: REM *** LETTURA E DISEGNO COSTELL ***
- 1830 X1 = 0:Y1 = 0:X2 = 0:Y2 = 0
- 1840 PRINT D$"IN#4"
- 1850 INPUT "";XM,YM,SM: IF SM = 2 THEN A = 1: GOTO 1990
- 1860 IF SM <0 THEN A = 2: GOTO 1990
- 1870 XM = INT(XM/3.666):YM = INT(YM/5.356)
- 1880 PRINT D$"IN#0"
- 1890 CALL 776: XDRAW 6 AT X1,Y1: XDRAW 6 AT XM,YM:X1 = XM:Y1 = YM
- 1900 CALL 768
- 1910 PRINT D$"IN#4"
- 1920 INPUT "";XM,YM,SM: IF SM = 2 THEN A = 1: GOTO 1990
- 1930 IF SM <0 THEN A = 2: GOTO 1990
- 1940 XM = INT(XM/3.666):YM = INT(YM/5.356)
- 1950 PRINT D$"IN#0"
- 1960 XDRAW 6 AT X2,Y2: XDRAW 6 AT XM,YM:X2 = XM:Y2 = YM
- 1970 IF XM >255 THEN POKE 790,1: POKE 792,(XM -256): POKE 791,YM: GOTO 1840
- 1980 POKE 790,0: POKE 791,YM: POKE 792,XM: GOTO 1840
- 1990 POKE -16368,0: PRINT D$"IN#0": PRINT : PRINT D$"PR#4": PRINT CHR$(0): PRINT D$"PR#0": PRINT
- 2000 IF A = 2 THEN POKE 230,32: CALL 62450: POKE 230,64: CALL 62450: GOTO 540
- 2010 IF A = 1 THEN YM = PEEK(791):XM = PEEK(792) + PEEK(790) *256: GOTO 2020
- 2020 XA = XM -3:XB = XM +3:YA = YM -3:YB = YM +3
- 2030 FOR X = 1 TO IN
- 2040 IF X(X) > = XA AND X(X) < = XB AND Y(X) > = YA AND Y(X) < = YB THEN CH = X:X = IN: GOTO 2070
- 2050 NEXT
- 2060 PRINT CHR$(7): GOTO 1770
- 2070 REM *** CONFERMA INDIVIDUAZIONE ***
- 2080 POKE 230,64: HPLOT 0,YM TO XM -5,YM: HPLOT XM +5,YM TO 279,YM: HPLOT XM,0 TO XM,YM -5: HPLOT XM,YM +5 TO XM,191
- 2090 FOR X = 1 TO 2500: NEXT
- 2100 HOME : TEXT : HOME : INVERSE : PRINT " CARATTERISTICHE DELLA STELLA SCELTA "
- 2110 R = VI +CH -1: PRINT D$"OPEN COSTELL.DATA": PRINT D$"READ COSTELL.DATA,R";R: INPUT A: INPUT A: INPUT A: INPUT N$: INPUT C$: INPUT M$: PRINT D$: PRINT D$"CLOSE"
- 2120 VTAB 5: PRINT "< NOME >": VTAB 10: PRINT "< COLORE >": VTAB 15: PRINT "< MAGNITUDINE >": NORMAL
- 2130 IF N$ = "" THEN N$ = "NOME NON PRESENTE"
- 2140 IF C$ = "" THEN C$ = "COLORE NON PRESENTE"
- 2150 IF M$ = "" THEN M$ = "MAGNITUDINE NON PRESENTE"
- 2160 VTAB 7: PRINT N$: VTAB 12: PRINT C$: VTAB 17: PRINT M$
- 2170 FOR X = 1 TO LEN(M$): IF MID$ (M$,X,1) = "(" THEN VTAB 19: PRINT "STELLA DOPPIA DI CUI UNA VARIABILE": GOTO 2220
- 2180 IF MID$ (M$,X,1) = "#" THEN VTAB 19: PRINT "STELLA VARIABILE AD ECLISSE": GOTO 2220
- 2190 IF MID$ (M$,X,1) = "E" THEN VTAB 19: PRINT "STELLA DOPPIA": GOTO 2220
- 2200 IF MID$ (M$,X,1) = "-" THEN VTAB 19: PRINT "STELLA VARIABILE": GOTO 2220
- 2210 NEXT
- 2220 POKE 230,32: CALL 62450: POKE 230,64: CALL 62450
- 2230 VTAB 23: PRINT "PREMI RETURN PER PROSEGUIRE.";: GET A$: PRINT : GOTO 1820
- 2240 TEXT : HOME
- 2250 INVERSE : FOR X = 0 TO HL -1: PRINT HL$(X);: NEXT X: PRINT : NORMAL
- 2260 CS = 1
- 2270 FOR X = 1 TO SN: IF X = CS THEN INVERSE
- 2280 VTAB HL +2 +X +X *(SN <9): HTAB HT: PRINT SI$(X): NORMAL
- 2290 NEXT X
- 2300 VTAB 23: PRINT "<- -> SELEZIONE, RETURN CONFERMA."
- 2310 POKE -16368,0
- 2320 K = PEEK( -16384): IF K <128 THEN 2320
- 2330 POKE -16368,0:K = K -128: IF K < >8 AND K < >11 AND K < >21 AND K < >10 AND K < >13 THEN 2320
- 2340 OS = CS
- 2350 IF K = 8 OR K = 11 THEN CS = CS -1:CS = CS *(CS >0) +SN *(CS = 0): GOSUB 2380: GOTO 2320
- 2360 IF K = 21 OR K = 10 THEN CS = CS +1:CS = CS *(CS < = SN) +(CS = SN +1): GOSUB 2380: GOTO 2320
- 2370 RETURN
- 2380 VTAB HL +2 +OS +OS *(SN <9): HTAB HT: PRINT SI$(OS)
- 2390 VTAB HL +2 +CS +CS *(SN <9): INVERSE : HTAB HT: PRINT SI$(CS): NORMAL : RETURN