Home » Personal collection » Commodore disks » disk50a2_progs1.d64 » solar system
solar system
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
| Tape/disk: | Home » Personal collection » Commodore disks » disk50a2_progs1.d64 |
| Filename: | solar system |
| Read OK: | ✔ |
| File size: | 0323 bytes |
| Load address: | 0801 |
| Exec address: | 0000 |
File contents
10 REM SOLAR SYSTEM SIMULATOR
20 :
30 READ N:T=0
40 DIM P$(N),X(N),Y(N),R(N),M(N),YR(N),V(N),D(N)
50 FOR P=1 TO N
60 READ P$(P),D(P),R(P),M(P),YR(P)
70 V(P)=0
80 NEXT
90 :
100 GOSUB 1100
110 GOSUB 1000
120 GOTO 100
990 :
1000 REM DISPLAY PLANETS
1010 PRINT"<clr>"
1020 FOR P=1 TO N
1030 POKE 1524+INT(X(P)/300)+40*INT(Y(P)/500),81
1040 NEXT:RETURN
1050 :
1100 REM MOVEMENT
1110 T=T+10
1120 FOR P=1 TO N
1130 X(P)=D(P)*SIN((π*T/YR(P))/180)
1140 Y(P)=D(P)*COS((π*T/YR(P))/180)
1150 NEXT:RETURN
1990 :
2000 REM GRAVITATIONAL DATA
2005 :
2010 DATA 10
2015 :
2020 REM NAME,DISTANCE,RADIUS,MASS,YEAR
2025 :
2030 DATA "MERCURY",58,0.4,0.06,0.2
2040 DATA "VENUS",108,0.95,0.8,0.6
2050 DATA "EARTH",150,1,1,1
2060 DATA "MARS",228,0.5,0.1,1.9
2070 DATA "JUPITER",778,11,320,12
2080 DATA "SATURN",1427,9,95,30
2090 DATA "URANUS",2870,4,15,84
2100 DATA "NEPTUNE",4497,4,17,165
2110 DATA "PLUTO",5900,0.2,0.002,248
2120 DATA "SUN",0,110,335,1
� SOLAR SYSTEM SIMULATOR $ : 0 � N:T�0 `( � P$(N),X(N),Y(N),R(N),M(N),YR(N),V(N),D(N) n2 � P�1 � N �<