The task is to create 1 pixel wide coloured vertical pinstripes with a sufficient number of pinstripes to span the entire width of the graphics display.



The pinstripes should either follow the system palette sequence,   or a sequence that includes:

black,   red,   green,   blue,   magenta,   cyan,   yellow,   and   white:

   after filling the top quarter, switch to a wider 2 pixel wide vertical pinstripe pattern,
   halfway down the display, switch to 3 pixel wide vertical pinstripe,
   finally to a 4 pixels wide vertical pinstripe for the last quarter of the display.


See also

   display black and white 
   print colour


PROC Main()
  BYTE
    i,
    CH=$02FC, ;Internal hardware value for last key pressed
    PALNTSC=$D014, ;To check if PAL or NTSC system is used
    PCOLR0=$02C0,PCOLR1=$02C1,
    PCOLR2=$02C2,PCOLR3=$02C3,
    COLOR0=$02C4,COLOR1=$02C5,
    COLOR2=$02C6,COLOR3=$02C7,
    COLOR4=$02C8
 
  Graphics(10)
  PCOLR0=$04 ;gray
  PCOLR1=$00 ;black
  IF PALNTSC=15 THEN
    PCOLR2=$42 ;red for NTSC
    PCOLR3=$C6 ;green for NTSC
    COLOR0=$84 ;blue for NTSC
    COLOR1=$66 ;magenta for NTSC
    COLOR2=$A6 ;cyan for NTSC
    COLOR3=$FC ;yellow for NTSC
  ELSE
    PCOLR2=$22 ;red for PAL
    PCOLR3=$B6 ;green for PAL
    COLOR0=$74 ;blue for PAL
    COLOR1=$48 ;magenta for PAL
    COLOR2=$96 ;cyan for PAL
    COLOR3=$EC ;yellow for PAL
  FI
  COLOR4=$0F ;white
 
  FOR i=0 TO 79
  DO
    Color=i MOD 8+1
    Plot(i,0) DrawTo(i,47)
 
    Color=i/2 MOD 8+1
    Plot(i,48) DrawTo(i,95)
 
    Color=i/3 MOD 8+1
    Plot(i,96) DrawTo(i,143)
 
    Color=i/4 MOD 8+1
    Plot(i,144) DrawTo(i,191)
  OD
 
  DO UNTIL CH#$FF OD
  CH=$FF
RETURN