100 gr : call -936 : print
110 up = 0:dn = 0 : x = 20 : y = 19
120 gosub 800:e=-16368
130 for q = 0 to 0 step 0
140 c = c + 1 : color = c : plot x, y
150 if c = 15 then c = 6
160 k = peek(-16384)
170 a = peek(e + (k < 128) * 32)
180 gosub 200 : next q
190 end
200 if k = 193 or k = 139 then 300
210 if k = 218 or k = 138 then 400
220 if k = 136 then 500
230 if k = 149 then 600
240 if k = 213 then 700
250 if k = 222 then 900
260 if k = 176 then 920
280 if k = 155 then q = 1
290 return
300 if y = 0 then return
310 y = y - 1
320 nu = scrn(x, y)
330 color = c : plot x, y
340 color = 5 : plot x, y + 1
350 color = dn : plot x, y + 2
360 dn = up : up = nu
390 return
400 if y = 38 then return
410 y = y + 1
420 nu = scrn(x, y + 1)
430 color = 5 : plot x, y + 1
440 color = c : plot x, y
450 color = up : plot x, y - 1
460 up = dn : dn = nu
490 return
500 if x = 0 then return
510 x = x - 1
520 nu = scrn(x, y)
530 nv = scrn(x, y + 1)
540 color = c : plot x, y
550 color = 5 : plot x, y + 1
560 color = up : plot x + 1, y
570 color = dn : plot x + 1, y + 1
580 up = nu : dn = nv
590 return
600 if x = 39 then return
610 x = x + 1
620 nu = scrn(x, y)
630 nv = scrn(x, y + 1)
640 color = c : plot x, y
650 color = 5 : plot x, y + 1
660 color = up : plot x - 1, y
670 color = dn : plot x - 1, y + 1
680 up = nu : dn = nv
690 return
700 f=0:up = 13 : dn = 13 : color = up
710 hlin x-1,x+2 at y - 3
720 for i = y-2 to y + 3
730 hlin x-2,x+3 at i : next i
740 hlin x-1,x+2 at y + 4
750 color = 0:v=y+1+f
760 plot x-1,y-1 : plotx+2,y-1
770 plot x-1,v : plotx+2,v
780 hlin x-1,x+2 at y+2-f
785 tab18
785 poke36,17
790 s = s + 1 - f * 2 : print s;" ";
800 c = 6 : color = c : plot x, y
810 color = 5 : plot x, y + 1
890 return
900 f = 1:up = 2 : dn = 0 : color = up
910 goto 710
920 color = 14
930 hlin x-2,x+3 at y - 3
940 hlin x-2,x+3 at y + 4
950 vlin y-1,y+2 at x-2
960 vlin y-1,y+2 at x+3
970 plot x-1,y-2: plot x+2,y-2
980 plot x-1,y+3: plot x+2,y+3
990 return