Greyscale bars/Display: Difference between revisions

Content added Content deleted
(added basic 256)
Line 183: Line 183:
return 0xFF000000 | (r << 16) | (g << 8) | (b)
return 0xFF000000 | (r << 16) | (g << 8) | (b)
}</lang>
}</lang>
=={{header|BASIC256}}==
<lang>
h=ceil(graphheight/4)
for row=1 to 4
w=ceil(graphwidth/(8*row))
c=255/(8*row-1)
for n = 0 to (8*row-1)
color 255-c*n,255-c*n,255-c*n
if row/2 = int(row/2) then color c*n,c*n,c*n
rect n*w,h*(row-1),w,h
next n
next row
</lang>


=={{header|BBC BASIC}}==
=={{header|BBC BASIC}}==
<lang bbcbasic>MODE 8:REM 640 x 512 pixel display mode: BBC BASIC gives 2 graphics points per pixel
<lang bbcbasic>MODE 8:REM 640 x 512 pixel display mode: BBC BASIC gives 2 graphics points per pixel