OK, some minor adjustments:
White As Dword
Black As Dword
LightBlue As Dword
Red As Dword
White = rgb(255,255,255)
Black = rgb(0,0,0)
LightBlue = rgb(22,100,124)
Red = rgb(177,1,1)
CursorX as Dword = 3
CursorY As Dword = 3
ink LightBlue,LightBlue
box 0,0,640,480
ink black,black
X as Dword
Y as Dword
X = 0
Y = 0
sync on
sync rate 60
U As Dword
U = 0
while U < 100
BoardCounter as float
BoardCounter = 0
` --- Monitor Keys ---
if INKEY$()="a"
cls
CursorY = CursorY + 1
if CursorY = 8 then CursorY = 7
endif
` --- Draw board ---
X = 0
while X < 8
Y = 0
if BoardCounter = 0
BoardCounter = 1
else
BoardCounter = 0
endif
while Y < 8
if BoardCounter = 0
BoardCounter = 1
ink black,black
else
BoardCounter = 0
ink white,black
endif
box x * (480 / 8) , y *(480/8) ,(x+1)* (480 / 8) , (y+1) *(480/8)
Y = Y + 1
endwhile
X = X + 1
endwhile
` --- Draw Cursor ---
ink red,black
box CursorX * (480 / 8), CursorY * (480 / 8),( CursorX +1) * (480 / 8), (CursorY + 1)* (480 / 8)
sync
endwhile
wait key
1) You did not reset X to zero when redrawing the board....
Line 41: X = 0
...so when X was too high the board ended up being off the screen.
2) You didn't set a limit for CursorY...
Line 37: if CursorY = 8 then CursorY = 7
...that also went zooming off the screen.
3) As you are continuiosly redrawing the board, I've moved "Draw Cursor" out of the while/endwhile loop
If you can follow this alternative code, then perhaps this could be of use to you.
White As Dword
Black As Dword
LightBlue As Dword
Red As Dword
White = rgb(255,255,255)
Black = rgb(0,0,0)
LightBlue = rgb(22,100,124)
Red = rgb(177,1,1)
CursorX as Dword = 3
CursorY As Dword = 3
ink LightBlue,LightBlue
box 0,0,640,480
ink black,black
sync on
sync rate 60
U As Dword
U = 0
while U < 100
` --- Monitor arrow Keys ---
if leftkey()=1
CursorX = CursorX - 1
if CursorX = -1 then CursorX = 0
endif
if rightkey()=1
CursorX = CursorX + 1
if CursorX = 8 then CursorX = 7
endif
if upkey()=1
CursorY = CursorY - 1
if CursorY = -1 then CursorY = 0
endif
if downkey()=1
CursorY = CursorY + 1
if CursorY = 8 then CursorY = 7
endif
` --- if any key is pressed then we delay for a bit ---
if scancode() <> 0
tim = timer() + 125 : ` 1/8th of a second
repeat : until timer() > tim
endif
` --- Draw board ---
sq = 1 : ` value will alternate for white or black squares
for y = 0 to 7
for x = 0 to 7
if sq = 1 then ink white,0 else ink black,0
box x * 60 , y * 60 ,(x+1)* 60 , (y+1) * 60
sq = 0 - sq
next x
sq = 0 - sq
next y
` --- Draw Cursor ---
ink red,black
box CursorX * 60, CursorY * 60,( CursorX +1) * 60, (CursorY + 1)* 60
sync
endwhile
wait key
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.