DEF GSPSET X#,Y#,S# GPSET X#,Y#/3,GSPOIT(X#,Y#/3)AND NOT(&HFF<<Y# MOD 3*8)OR S#<<Y# MOD 3*8 END2: Use sprites:
FOR I=0 TO 2 SPSET I,0,170*I,512,170,#SPADD+1 NEXT DEF GSPSET X#,Y#,S# GPSET X#,Y#/3+170*(Y# MOD 3),#BLACK OR S#<<Y# MOD 3*8 END(might be faster, but limits you to only part of the screen)