Here you go:
sync on : sync rate 60
autocam off : hide mouse
backdrop on : color backdrop 0
make object cube 1,10
color object 1,rgb(255,255,0)
position camera object position x(1),object position y(1),object position z(1)
x# = object position x(1) : y# = object position y(1) : z# = object position z(1)
position camera x#,y# + 25,z# - 100
point camera x#,y#,z#
repeat
if keystate(45) = 1 : ` X key
xa# = object angle x(1)
xa# = wrapvalue(xa# + 1.0)
xrotate object 1,xa#
endif
if keystate(21) = 1 : ` Y key
ya# = object angle y(1)
ya# = wrapvalue(ya# + 1.0)
yrotate object 1,ya#
endif
if keystate(44) = 1 : ` Z key
za# = object angle z(1)
za# = wrapvalue(za# + 1.0)
zrotate object 1,za#
endif
text 10,10,"FPS: " + str$(screen fps())
text 10,30,"Press X, Y or Z to rotate on that axis."
text 10,70,"Press [SPACEBAR] to exit."
sync
until spacekey() = 1
delete object 1
show mouse
end
Press 'X' to spin on the X axis, 'Y' to spin on the Y axis or 'Z' to spin on the Z axis. You can press all three at one time if you want.