; x y addr - returns screen address for x y
: addr 54 * + 54 154 * mod 400000 + ;
5 integer xx 10 integer yy 5 integer ww 4 integer hh
: box hh 0 do xx yy i + addr dup ww ff fill dup 1 00 fill ww + 1 00 fill loop
xx yy addr ww 00 fill xx yy hh + addr ww 00 fill ;
; x y w h box - draws box at x y
: box2 hh to ww to yy to xx to yy hh + 153 min yy - 1 max hh to xx ww + 53 min xx - 1 max ww to box ;
: demo9 100 0 do 50 rnd 150 rnd 20 rnd 50 rnd box2 loop ;