%begin
   %include "level1:graphinc.imp"
   %routine Set Up
   %integer i
   %integer z = 0
     %on 0 %start
       Print string ("Software requires a graphics system"); newline
       %stop
     %finish
     Offset (0,0)
     enable(16_FF)
     colour (White)
     %for i = 0, 16, 240 %cycle
        Colour Map (0+i)  = z
        Colour Map (1+i)  = 31
        Colour Map (2+i)  = 31<<5
        Colour Map (3+i)  = 31<<5+31
        Colour Map (4+i)  = 31<<10
        Colour Map (5+i) = 31<<10+31
        Colour Map (6+i) = 31<<10+31<<5
        Colour Map (7+i) = 31<<10+31<<5+31
        Colour Map (8+i) = 31<<10+31<<5+31
        Colour Map (9+i) = 31<<10+31<<5
        Colour Map (10+i) = 31<<10+31
        Colour Map (11+i) = 31<<10
        Colour Map (12+i) = 31<<5+31
        Colour Map (13+i) = 31<<5
        Colour Map (14+i) = 31
        Colour Map (15+i) = z
     %repeat
   %end
   
   %integer i, j, c, cb, xl, xh, yl, yh
   setup
   clear
   cb = red
   %cycle
      xl = 256
      xh = 432
      yl = 256
      yh = 256
      %for i = 0, 1, 7 %cycle
         c = cb
         %for j = 0, 1, 31 %cycle
            colour(c)
            c = (c+1)&white
            line(xl,yl,xh,yl)
            line(xl,yh,xh,yh)
            fill(xl,yl,xl,yh)
            fill(xh,yl,xh,yh)
            xl = xl-8
            xh = xh+8
            yl = yl-8
            yh = yh+8
         %repeat
         xl = xl+255
         xh = xh-255
         yl = yl+255
         yh = yh-255
      %repeat
      cb = (cb-1)&white
   %repeat
%end %of %program
