Text = "Moving cursor with MEM"
'DIM a AS _UNSIGNED _BYTE
PRINT " l to move left, r to move right"
curOffset
= 4 * _WIDTH * (15 + 32) + curPosX
FOR T
= curOffset
TO curOffset
+ curWidth
STEP 4
'b = _MEMGET(M, M.OFFSET + T, _UNSIGNED _BYTE)
b = 255
'g = _MEMGET(M, M.OFFSET + T + 1, _UNSIGNED _BYTE)
g = 255
' r = _MEMGET(M, M.OFFSET + T + 2, _UNSIGNED _BYTE)
r = 0
curOffset
= 4 * _WIDTH * (15 + 32) + curPosX
curOffset
= 4 * _WIDTH * (15 + 32) + curPosX
curon:
FOR T
= curOffset
TO curOffset
+ curWidth
STEP 4
'b = _MEMGET(M, M.OFFSET + T, _UNSIGNED _BYTE)
b = 255
'g = _MEMGET(M, M.OFFSET + T + 1, _UNSIGNED _BYTE)
g = 255
' r = _MEMGET(M, M.OFFSET + T + 2, _UNSIGNED _BYTE)
r = 0
curoff:
FOR T
= curOffset
TO curOffset
+ curWidth
STEP 4
'b = _MEMGET(M, M.OFFSET + T, _UNSIGNED _BYTE)
b = 0
' g = _MEMGET(M, M.OFFSET + T + 1, _UNSIGNED _BYTE)
g = 0
'r = _MEMGET(M, M.OFFSET + T + 2, _UNSIGNED _BYTE)
r = 0