' GABasic Studio v1.00

endloop = 0
screen 13
x = getmaxx SHR 1
y = getmaxy SHR 1
lx = x
ly = y

do while not endloop = 1
  k$ = inkey$

  SELECT CASE k$
    case "a"
      x = x - 1
      fillbox lx, ly, lx + 10, ly + 10, 0
      fillbox x, y, x + 10, y + 10, 15
    case "s"
      y = y + 1
      fillbox lx, ly, lx + 10, ly + 10, 0
      fillbox x, y, x + 10, y + 10, 15
    case "w"
      y = y - 1
      fillbox lx, ly, lx + 10, ly + 10, 0
      fillbox x, y, x + 10, y + 10, 15
    case "d"
      x = x + 1
      fillbox lx, ly, lx + 10, ly + 10, 0
      fillbox x, y, x + 10, y + 10, 15
    case chr$(27)
      end
    case else
  end select

  lx = x
  ly = y
loop

