Yes, only the three lines in the main loop are doing any work.
I thought I'd clean it up a bit. I have coding OCD at the moment, I can't look at a piece of code without tidying it up!
set display mode 800,600,32
hide mouse
sync on
sync rate 60
gosub _MakeSprites
rem some constants
xrad=300
yrad=150
centerx=(screen width()/2)-64
centery=(screen height()/2)-64
rem position sun
sprite 1,centerx,centery,1
rem === MAIN ===
do
rem caluclate orbit
ang = wrapvalue(ang+1)
x=xrad*cos(ang)+centerx
y=yrad*sin(ang)+centery
rem display
sprite 2,x,y,2
sync
loop
rem === SUBROUTINES ===
_MakeSprites:
rem sun
cinc#=255/63
for x=0 to 63
ink rgb(255-(x*cinc#),255-(x*cinc#),0),0
circle 64,63,x
circle 63,63,x
next x
get image 1,0,0,128,128
sync
cls 0
rem planet
cinc#=255/31
for x=0 to 31
ink rgb(255-(x*cinc#),0,0),0
circle 32,31,x
circle 31,31,x
next x
get image 2,0,0,64,64
sync
cls 0
return