for i=0 to 4095 poke $8000+i,0 next i bg 1 bg fill 0,0 to 31,31 char 255 bg 0 for x=0 to 19 for y=0 to 7 cell x,y*2,x*8+y tint x,y*2 pal 0 cell x,y*2+1,x*8+y tint x,y*2+1 pal 1 next y next x sub plot(tx,ty,tc) tx1=int(tx/8) tx2=tx mod 8 tad1=$8000+ty+(tx1*128) tpk1=peek(tad1) if (tc and 1)<>0 then poke tad1,tpk1 or (2^(7-tx2)) end if if (tc and 2)<>0 then poke tad1,tpk1 xor (2^(7-tx2)) end if end sub sub bar(x1,y1,x2,y2,c) steps=1 d1=-(x2-x1>0)*2-1 d2=-(y2-y1>0)*2-1 for iy=y1 to y2 step steps*d2 for ix=x1 to x2 step steps*d1 call plot(ix,iy,c) next ix next iy end sub do call bar(int(rnd*160),int(rnd*128),int(rnd*160),int(rnd*128),1) call bar(int(rnd*160),int(rnd*128),int(rnd*160),int(rnd*128),3) call bar(int(rnd*160),int(rnd*128),int(rnd*160),int(rnd*128),2) wait vbl loop #1:MAIN PALETTES FF00FF00FFFF0000FF00FF00FFFF0000 FF00FF00FFFF0000FF00FF00FFFF0000