Variable assignment is always shorter that INC/DEC
R=R-5
LOCATE.,.?"E"
If 4 is the lowest G can be you can you inequalities to save a character e.g. (G<5)
Colon (:) unneeded after functions, numbers (except when the next instructions starts with E, and string suffix $
Space unneeded before TO e.g. FOR I=0TO ...
use #L and #R in place of 256 and 512, respectively (can probably RGB(#L,#L-R,#L-R))
Calculations longer than like 4 characters used more than once should be precalculated and assigned to a variable e.g. Z=G*FLOOR(I/G)FOR J=G TO Z+(G-1)
Since no colon is needed after numbers, consecutive variable assignments can become F=.C=222D=-D: