IF SY>0.1 THEN UP=1
IF SY<0.1 THEN DOWN=1
IF B AND #UP THEN UP=1
IF B AND #DOWN THEN DOWN=1
IF B AND #RIGHT THEN RIGHT=1
IF B AND #LEFT THEN LEFT=1
INC X,(RIGHT-LEFT)
INC Y,(UP-DOWN)
VSYNC
WEND
has stick and dpad support.
It moves the sprite around with the dpad.
Put @'s before the GLOOP's, replace the underscore with a space, and change the periods to commas to fix it.
...though you should not use labels for looping. Better code is:
ACLS
SPSET 0,256,208
X=0:Y=0
WHILE TRUE
SPOFS 0,X,Y,-10
B=BUTTON()
STICK OUT SX,SY:SY=-SY
UP=0:DOWN=0:LEFT=0:RIGHT=0
IF SX>0.1 THEN RIGHT=1
IF SX<0.1 THEN LEFT=1
use SPOFS management number OUT X,Y to get the sprite's position.
use SPOFS management number, x, y to move the sprite.
use STICK OUT SX,SY to get the circle pad's location. SY is inverted, however.
use those both in a loop to check what the stick's location is, check where the sprite is, then move the sprite by the stick's movements and the location.