brand.4th (280923) | brand.4th (280924) |
---|---|
1\ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org> 2\ All rights reserved. 3\ 4\ Redistribution and use in source and binary forms, with or without 5\ modification, are permitted provided that the following conditions 6\ are met: 7\ 1. Redistributions of source code must retain the above copyright 8\ notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23\ SUCH DAMAGE. 24\ | 1\ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org> 2\ All rights reserved. 3\ 4\ Redistribution and use in source and binary forms, with or without 5\ modification, are permitted provided that the following conditions 6\ are met: 7\ 1. Redistributions of source code must retain the above copyright 8\ notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23\ SUCH DAMAGE. 24\ |
25\ $FreeBSD: head/sys/boot/forth/brand.4th 280923 2015-03-31 22:10:40Z dteske $ | 25\ $FreeBSD: head/sys/boot/forth/brand.4th 280924 2015-03-31 22:32:35Z dteske $ |
26 27marker task-brand.4th 28 29variable brandX 30variable brandY 31 | 26 27marker task-brand.4th 28 29variable brandX 30variable brandY 31 |
32\ Initialize logo placement | 32\ Initialize brand placement to defaults |
332 brandX ! 341 brandY ! 35 36: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) 37 38 2dup at-xy ." ______ ____ _____ _____ " 1+ 39 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ 40 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ --- 15 unchanged lines hidden (view full) --- 56\ NAME DESCRIPTION 57\ fbsd FreeBSD logo 58\ 59\ NOTE: Setting `loader_brand' to the value of an existing function 60\ (such as "mycustom-brand") will cause that symbol to be executed. 61\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will 62\ prevent any brand from being drawn. 63\ | 332 brandX ! 341 brandY ! 35 36: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) 37 38 2dup at-xy ." ______ ____ _____ _____ " 1+ 39 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ 40 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ --- 15 unchanged lines hidden (view full) --- 56\ NAME DESCRIPTION 57\ fbsd FreeBSD logo 58\ 59\ NOTE: Setting `loader_brand' to the value of an existing function 60\ (such as "mycustom-brand") will cause that symbol to be executed. 61\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will 62\ prevent any brand from being drawn. 63\ |
64: draw-brand ( -- ) | 64: draw-brand ( -- ) \ at (loader_brand_x,loader_brand_y), else (2,1) |
65 66 s" loader_brand_x" getenv dup -1 <> if 67 ?number 1 = if brandX ! then 68 else drop then 69 s" loader_brand_y" getenv dup -1 <> if 70 ?number 1 = if brandY ! then 71 else drop then 72 --- 21 unchanged lines hidden --- | 65 66 s" loader_brand_x" getenv dup -1 <> if 67 ?number 1 = if brandX ! then 68 else drop then 69 s" loader_brand_y" getenv dup -1 <> if 70 ?number 1 = if brandY ! then 71 else drop then 72 --- 21 unchanged lines hidden --- |