(def ofs 0) (def x1 0) (def x2 0) (def y1 0) (def y2 0) (def fb (mmap "/framebuffer")) (def f (open "/framebuffer")) (def color 0xffffff) (def line (fn x y w (do (def x1 (* 4 x)) (def x2 (* 4 (+ x w))) (def ofs (* y 7680)) (while (lt x1 x2) (do (def x1 (+ x1 4)) (put32 fb (+ ofs x1) color))) ))) (def box (fn x y sz (do (def y1 y) (def y2 (+ y sz)) (while (lt y1 y2) (do (def y1 (+ y1 1)) (line x y1 sz))) (gc) ))) (def box-size 2) (def main (fn (do (def box-size 2) (def color 0) (box 0 0 100) (box 100 100 100) (box 200 0 100) (box 300 100 100) (box 0 200 100) (box 200 200 100) (while (lt box-size 50) (do (def color 0xffffff) (def box-size (+ box-size 1)) (box 0 0 box-size) (box 100 100 box-size) (def color 0xff00ff) (box 200 0 box-size) (def color 0x00ff00) (box 300 100 box-size) (def color 0x00ffff) (box 0 200 box-size) (def color 0xffff00) (box 200 200 box-size) (send f 0))) )))