home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 18
/
018.d81
/
halley
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
179 lines
30 iffl=0thenpoke45,56:poke46,74:clr:fl=1
40 poke53280,0:poke53281,0:poke45,56:poke46,74:poke650,255
50 text=8198
100 ifun=0thenun=1:load"unpacker",8,1
110 :
120 poke249,224:poke250,204
140 poke251,0:poke252,64
160 poke253,0:poke254,0
180 ifx=0thenx=1:load"title.shp",8,1
200 ifx=1thenx=2:sys51456:sys51459
202 ifct>0then900
204 ifdh>0then800
205 ifpo>0then610
206 ifbl>0then540
260 h%=10
320 data sunday,monday,tuesday,wednesday,thursday,friday,saturday
340 dim wd%(120),mo%(120),da%(120),ti%(120)
360 dim nx%(120),ny%(120),sh%(120),m$(120)
380 gosub4240
400 dt%=1
420 i%=1
440 d=4:fori=1to120:wd%(i)=d:d=d+1:ifd>7thend = 1
460 next
480 i%(1)=1:i%(2)=32:i%(3)=60:i%(4)=91
500 :
520 :
540 ifbl=0thenbl=1:a=49152: load"horizons.bdata",8,1
560 fori=1to117:n=peek(a):ifn=255thena=a+1:next:goto 600
580 nx%(i)=n:a=a+1:n=peek(a):ny%(i)=n:a=a+1:next
600 fori=1to120:n=peek(a):sh%(i)=n:a=a+1:next
610 ifpo=0thenpo=1:load"plotter.o",8,1
620 open2,8,2,"wordy.data"
640 fori=1to120:input#2,m$(i)
660 ifm$(i)="x"thenm$(i)=m$(i-1)
680 next:close2
700 fori=1to120
720 ifi<26thenti%(i)=1:next:goto 800
740 ifi>105thenti%(i)=1:next:goto 800
760 ifi>=100 and i<106 or i>25 and i<51 then ti%(i) = 255
780 next
800 ifdh=0thendh=1:load"display.shp",8,1
820 poke249,224:poke250,204
840 poke251,0:poke252,64
860 poke253,0:poke254,0
880 sys51456
900 ifct=0thenct=1:load"comet.table",8,1
1000 rem sys51462
1020 gosub 2200:hc%=8
1040 gosub 1440
1060 t$="date:"+str$(mo%(i%))+"/"+str$(da%(i%))+" "+dy$+" "
1062 iflen(t$)<25thent$=t$+" ":goto1062
1065 systext,t$,16,182
1080 t$="time:"
1100 ifti%(i%)=0thent$=t$+"sunrise":goto1150
1120 ifti%(i%)=1thent$=t$+"sunset ":goto 1150
1140 t$=t$+"-------"
1150 sys text,t$,216,182
1160 k=peek(198):ifk>0then1240
1180 iffl%=0thenfl%=1:plot=8192:goto1220
1200 iffl%=1thenfl%=0:plot=8195
1220 gosub3820:goto1160
1240 geta$:poke198,0
1245 iffl%=0thenplot=8192:gosub 3820
1260 :
1280 ifa$="[133]"thengosub2280:goto1440
1300 ifa$="[136]"thengosub2400:goto1440
1320 ifa$="t"ora$="t"thengosub2480:goto1440
1340 :rem no information
1360 ifa$="q"thengosub3340:goto1440
1380 ifa$="h"thengosub3480:goto1440
1400 ifhc%=0thenhc%=4:goto1160
1420 goto1160
1440 plot=8192:gosub3820
1442 gosub 3940
1480 gosub 3980: goto 1060
2160 return
2180 printspc(((42-len(a$))/2)):printa$;:return
2200 rem
2220 dy=wd%(i%):restore
2240 fori=1tody:readdy$:next:return
2260 return
2280 rem
2300 plot=8195:gosub 3820
2320 ifi%-dt%<1theni%=1:goto2360
2340 ifi%>=1+dt%theni%=i%-dt%
2360 gosub2200
2380 return
2400 rem
2420 plot=8195:gosub 3820
2440 i%=i%+dt%:ifi%>120theni%=120
2460 gosub2200:return
2480 rem
2500 sys51459:print"[147]"
2520 print "* time *
2540 [153] " g)o to a specific date": [153] " a)djust the time increment";
2560 [151]198,0:[146]198,1:[161]a$:[153]
2580 [139]a$[178]"g"[167] 2640
2600 [139]a$[178]"a"[167] 2940
2620 [158]51459:[142]
2640 [143]
2660 [153]"loadacceptable dates between 1/1 and 4/30": [153]
2680 mo$[178]"":[133]"go to which month (1-4) > ";mo$
2700 [139]mo$[178]""[167][158]51459:[142]
2720 da$[178]"":[133] "go to which day (1-31) > ";da$
2740 [139]da$[178]""[167][158]51459:[142]
2760 [139][197](mo$)[179]1[176][197](mo$)[177]4[167]3040
2780 [139][197](da$)[179]1[176][197](da$)[177]31[167]3040
2800 [139]mo$[178]"2"[167][139][197](da$)[177]28[167]3040
2820 [139]mo$[178]"4"[167][139][197](da$)[177]30[167]3040
2840 plot[178]8195:[141] 3820
2860 m%[178][197](mo$):d%[178][197](da$)
2880 i%[178]i%(m%)[170]d%[171]1
2900 [141]2200
2920 [158]51459:[142]
2940 [143]
2960 [153]"loadcurrent time increment ="dt%"days per move"
2980 a$[178]"":[133]"enter a new increment -> ";a$:[139]a$[178]""[167][158]51459:[142]
3000 dt%[178][197](a$):[139]dt%[179][178]0[167]dt%[178]1
3020 [158]51459:[142]
3040 [143]
3060 [153]"loadbad date...": [129] i [178] 1 [164] 2000: [130]
3080 [158]51459:[142]
3340 [143]
3360 [158]51459:[153]"loadquit for sure? ";:[151]198,0:[146]198,1:[161]a$:[153]a$
3380 [139]a$[179][177]"y"[175]a$[179][177]"y"[167][158]51459:[142]
3400 [153]"load"
3420 [153] "bye!"
3440 [147]"hello connect",8
3460 [128]
3480 [143]
3500 [158]51459:[153]"load"
3520 [153]" * help! *wait"
3540 [153]""
3560 [153]"this program displays the locations"
3580 [153]"of halley's comet as it will appear on"
3600 [153]"the southern horizon during the first"
3620 [153]"120 days of 1986, jan 1 - apr 30.":[153]:[153]
3640 [153]" use f1 or f7 to step"
3660 [153]" backward and forward through time":[153]""
3680 [153]"press <t> to either <g>o to a specific"
3700 [153]"date or to <a>djust the time increment"
3720 [153]
3760 [153]" press 'q' to exit the program"
3765 [153]" press any key to continue."
3780 k[178][194](198):[139]k[178]0[167]3780
3800 [158]51459:[142]
3820 [143]
3840 [139]nx%(i%)[178]0[167][142]
3860 xd[178]93[170]nx%(i%):yd[178]144[171]ny%(i%)[172]2: [158]plot,xd,yd
3880 [158]plot,xd[171]1,yd[171]1:[158]plot,xd,yd[171]1:[158]plot,xd[170]1,yd[171]1:[158]plot,xd[171]1,yd
3900 [158]plot,xd[170]1,yd:[158]plot,xd[171]1,yd[170]1:[158]plot,xd,yd[170]1:[158]plot,xd[170]1,yd[170]1
3920 [142]
3940 [151]249,224:[151]250,204
3942 [151]251,0:[151]252,64
3944 [151]253,3:[151]254,1
3950 [151]255,sh%(i%):[158]51462
3960 [142]
3980 [143]
4000 [151]53280,0
4010 :
4020 yp[178]190:t$[178]" ":[158]text,t$,0,yp
4040 xp[178]((41[171][195](m$(i%)))[173]2)[172]8:t$[178]m$(i%)
4050 [158]text,t$,xp,yp
4060 [142]
4080 [142]
4220 :
4240 [143]
4260 m%[178]1:d%[178]1
4280 [129]i[178]1[164]120
4300 mo%(i)[178]m%:da%(i)[178]d%
4320 d%[178]d%[170]1
4340 [139]m%[178]1[167][139]d%[177]31[167]4440
4360 [139]m%[178]2[167][139]d%[177]28[167]4440
4380 [139]m%[178]3[167][139]d%[177]31[167]4440
4400 [139]m%[178]4[167][139]d%[177]30[167]4440
4420 [130]:[142]
4440 m%[178]m%[170]1:d%[178]1
4460 [130]:[142]