Task

Display a series of vertical 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


include c:\cxpl\codes;       \intrinsic code declarations
int W, X0, X1, Y, C;
[SetVid($13);           \320x200x8 graphics
W:= 320/8;              \width of color bar (pixels)
for C:= 0 to 8-1 do
        [X0:= W*C; X1:= X0+W-1;
        for Y:= 0 to 200-1 do
                [Move(X0, Y); Line(X1, Y, C)];
        ];
C:= ChIn(1);            \wait for keystroke
SetVid(3);              \restore normal text mode
]