vdu 22,8 vdu 23,23,1| off:vdu 5:colour 0:clg proc_image(100,500) wait 0:end def proc_image(h,v) local data u=0:r=0:g=0:b=0:a=0:c=0:t=0 ost$="" read x,y:repeat read nst$,t if nst$="0" then r=0:g=0:b=0 :rem 'black 0 0 0 if nst$="1" then r=192:g=128:b=64:rem ' brown 192 128 64 if nst$="2" then r=64:g=64:b=192 :rem'dark blue 64 64 192 if nst$="3" then r=128:g=128:b=128:rem' dark grey 128 128 128 if nst$="4" then r=128:g=0:b=0:rem'dark red 128 0 0 if nst$="5" then r=224:g=192:b=0 :rem'dark yellow 224 192 0 if nst$="6" then r=128:g=160:b=192:rem'flat blue 128 160 192 if nst$="7" then r=32:g=192:b=64 :rem'green 32 192 64 if nst$="8" then r=166:g=202:b=240:rem'light blue 166 202 240 if nst$="9" then r=192:g=192:b=192:rem 'light gray 192 192 192 if nst$="a" then r=192:g=224:b=0:rem 'light green 192 224 0 if nst$="b" then r=224:g=32:b=64:rem'light red 224 32 64 if nst$="c" then r=0:g=160:b=192 :rem'medblue 0 160 192 if nst$="d" then r=224:g=128:b=64 :rem 'orange 224 128 64 if nst$="e" then r=224:g=160:b=192:rem'pink 224 160 192 if nst$="f" then r=160:g=64:b=192:rem'purple 160 64 192 if nst$="g" then r=192:g=220:b=192:rem'tan 192 220 192 if nst$="h" then r=255:g=255:b=255:rem'white 255 255 255 if nst$="i" then r=255:g=255:b=0:rem'yellow 255 255 0 colour 0,r,g,b:gcol 0 for u=0 to t a=a+1: move h+c,v-a:draw h+c,v-a:if a>x then c=c+1:a=0 next u until nst$="100000" move 0,0 data 161,161 data 0,9471,3,1,0,159,3,1,0,157,h,3,0,157,h,3,0,155,h,7,0,153,h,7,0,151,h,11,0,149,h,11,0,147,h,13,3,1,0,145,h data 13,3,1,0,143,h,15,0,145,h,15,0,145,g,1,h,15,0,143,g,1,h,15,0,143,h,17,0,143,h,17,0,141,h,21,0,139,h,21,0,139 data h,21,0,139,h,21,0,137,h,25,0,135,h,25,0,135,h,27,0,133,h,27,0,133,h,27,3,1,0,131,h,27,3,1,0,129,3,1,h,29,0 data 129,3,1,h,29,0,129,g,1,h,29,0,129,g,1,h,29,0,129,h,31,0,129,h,31,0,129,h,31,0,129,h,31,0,129,h,13,9,1,0,1 data h,11,0,131,h,13,9,1,0,1,h,11,0,131,h,11,0,5,9,1,h,7,0,133,h,11,0,5,9,1,h,7,0,133,h,9,3,1,0,7,h data 5,0,135,h,9,3,1,0,7,h,5,0,139,h,7,0,5,g,1,h,3,0,141,h,7,0,5,g,1,h,3,0,145,g,1,h,7,g,1,0,149 data g,1,h,7,g,1,100000,0 endproc