diff options
Diffstat (limited to 'sys/boot/forth/frames.4th')
-rw-r--r-- | sys/boot/forth/frames.4th | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/sys/boot/forth/frames.4th b/sys/boot/forth/frames.4th index 5d6df24..0f8d460 100644 --- a/sys/boot/forth/frames.4th +++ b/sys/boot/forth/frames.4th @@ -1,9 +1,37 @@ -\ Words implementing frame drawing -\ XXX Filled boxes are left as an exercise for the reader... ;-/ +\ Copyright (c) 2003 Scott Long <scottl@FreeBSD.org> +\ Copyright (c) 2012-2015 Devin Teske <dteske@FreeBSD.org> +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ \ $FreeBSD$ marker task-frames.4th +vocabulary frame-drawing +only forth also frame-drawing definitions + +\ XXX Filled boxes are left as an exercise for the reader... ;-/ + variable h_el variable v_el variable lt_el @@ -14,6 +42,7 @@ variable fill \ ASCII frames (used when serial console is detected) 45 constant ascii_dash + 61 constant ascii_equal 124 constant ascii_pipe 43 constant ascii_plus @@ -61,6 +90,8 @@ s" arch-pc98" environment? [if] 178 constant fill_bright [then] +only forth definitions also frame-drawing + : hline ( len x y -- ) \ Draw horizontal single line at-xy \ move cursor 0 do @@ -88,7 +119,11 @@ s" arch-pc98" environment? [if] ; : f_double ( -- ) \ set frames to double - boot_serial? if f_ascii exit then + boot_serial? if + f_ascii + ascii_equal h_el ! + exit + then dh_el h_el ! dv_el v_el ! dlt_el lt_el ! @@ -126,3 +161,5 @@ s" arch-pc98" environment? [if] f_single fill_none fill ! + +only forth definitions |