1 \ Words implementing frame drawing
2 \ XXX Filled boxes are left as an exercise for the reader... ;-/
15 \ ASCII frames (used when serial console is detected)
16 45 constant ascii_dash
17 124 constant ascii_pipe
18 43 constant ascii_plus
20 s" arch-pc98" environment? [if]
37 32 constant fill_blank
38 135 constant fill_dark
40 135 constant fill_bright
58 32 constant fill_blank
59 176 constant fill_dark
61 178 constant fill_bright
64 : hline ( len x y -- ) \ Draw horizontal single line
71 : f_ascii ( -- ) ( -- ) \ set frames to ascii
80 : f_single ( -- ) \ set frames to single
81 boot_serial? if f_ascii exit then
90 : f_double ( -- ) \ set frames to double
91 boot_serial? if f_ascii exit then
100 : vline ( len x y -- ) \ Draw vertical single line
111 : box ( w h x y -- ) \ Draw a box
112 2dup 1+ 4 pick 1- -rot
113 vline \ Draw left vert line
114 2dup 1+ swap 5 pick + swap 4 pick 1- -rot
115 vline \ Draw right vert line
116 2dup swap 1+ swap 5 pick 1- -rot
117 hline \ Draw top horiz line
118 2dup swap 1+ swap 4 pick + 5 pick 1- -rot
119 hline \ Draw bottom horiz line
120 2dup at-xy lt_el @ emit \ Draw left-top corner
121 2dup 4 pick + at-xy lb_el @ emit \ Draw left bottom corner
122 2dup swap 5 pick + swap at-xy rt_el @ emit \ Draw right top corner
123 2 pick + swap 3 pick + swap at-xy rb_el @ emit