DIM sprite(1000) AS INTEGER
'DIM x AS INTEGER
'DIM y AS INTEGER
'DIM First AS INTEGER
'DIM oldx AS INTEGER
'DIM oldy AS INTEGER
SCREEN 2
LINE (5, 10)-(420, 145), , B
CIRCLE (100, 100), 20, , , , .3
'OPEN "disk.spr" FOR BINARY AS #1 LEN = LEN(sprite(1))
GET (69, 80)-(131, 120), sprite
PUT (69, 80), sprite, XOR
'IF NOT First THEN PUT (oldx, oldy), sprite, XOR
x1 = 5
y1 = 5
v = 1
FOR n = 1 TO 400 STEP 1
   ss$ = INKEY$
   IF ss$ = CHR$(61) THEN x1 = x1 + 5
   IF ss$ = CHR$(46) THEN y1 = y1 + 5
   IF ss$ = CHR$(49) THEN v = v + 5
   IF ss$ = CHR$(45) THEN x1 = x1 - 5
   IF ss$ = CHR$(44) THEN y1 = y1 - 5
   IF ss$ = CHR$(48) THEN v = v - 5
   x = x + x1
   y = y + y1
   PUT (x, y), sprite
   PUT (oldx, oldy), sprite, XOR
'  PUT (x, y), sprite, XOR
'   ON KEY(1) GOSUB l
   IF x > 350 THEN x1 = -x1
   IF y > 110 THEN y1 = -y1
   IF x < 5 THEN x1 = -x1
   IF y < 5 THEN y1 = -y1
   IF v = 0 THEN v = 1
   SOUND 20000, v
   oldx = x
   oldy = y
'  SLEEP 1
NEXT n
'l:
PUT (x, y), sprite
END

