Colour bars/Display: Difference between revisions
Content added Content deleted
(Tidy up task definition (most modern display hardware no longer uses palettes as such)) |
m (→{{header|ZX Spectrum Basic}}: minor correction) |
||
Line 2: | Line 2: | ||
The task is to display a series of color bars across the width of the display. The color bars should either use the system palette, or the sequence of colors: Black, Red, Green, Blue, Magenta, Cyan, Yellow, White. |
The task is to display a series of color bars across the width of the display. The color bars should either use the system palette, or the sequence of colors: Black, Red, Green, Blue, Magenta, Cyan, Yellow, White. |
||
== {{header|ZX Spectrum Basic}} == |
|||
<lang basic>10 REM The ZX Spectrum display is 32 columns wide, so we have 8 columns of 4 spaces |
<lang basic>10 REM The ZX Spectrum display is 32 columns wide, so we have 8 columns of 4 spaces |
Revision as of 14:37, 23 May 2011
Colour bars/Display is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
The task is to display a series of color bars across the width of the display. The color bars should either use the system palette, or the sequence of colors: Black, Red, Green, Blue, Magenta, Cyan, Yellow, White.
ZX Spectrum Basic
<lang basic>10 REM The ZX Spectrum display is 32 columns wide, so we have 8 columns of 4 spaces 20 FOR r=0 TO 20: REM There are 21 rows 30 FOR c=0 TO 7: REM We use the native colour sequence here 40 PRINT " ";: REM four spaces, the semicolon prevents newline 50 NEXT c 60 REM at this point the cursor has wrapped, so we don't need a newline 70 NEXT r</lang>