diff --git a/sys/boot/forth/brand-fbsd.4th b/sys/boot/forth/brand-fbsd.4th index f06d47e3494a..9cd017f84a3f 100644 --- a/sys/boot/forth/brand-fbsd.4th +++ b/sys/boot/forth/brand-fbsd.4th @@ -26,13 +26,21 @@ 2 brandX ! 1 brandY ! \ Initialize brand placement defaults +: brand+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : brand ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) - 2dup at-xy ." ______ ____ _____ _____ " 1+ - 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ - 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ - 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ - 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ - at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " + s" ______ ____ _____ _____ " brand+ + s" | ____| | _ \ / ____| __ \ " brand+ + s" | |___ _ __ ___ ___ | |_) | (___ | | | |" brand+ + s" | ___| '__/ _ \/ _ \| _ < \___ \| | | |" brand+ + s" | | | | | __/ __/| |_) |____) | |__| |" brand+ + s" | | | | | | || | | |" brand+ + s" |_| |_| \___|\___||____/|_____/|_____/ " brand+ + + 2drop ; diff --git a/sys/boot/forth/logo-beastie.4th b/sys/boot/forth/logo-beastie.4th index 73601e92bf3b..671eb5e496b2 100644 --- a/sys/boot/forth/logo-beastie.4th +++ b/sys/boot/forth/logo-beastie.4th @@ -28,25 +28,34 @@ 46 logoX ! 4 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + [char] @ escc! \ replace @ with Esc + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) -2dup at-xy ." , ," 1+ -2dup at-xy ." /( )`" 1+ -2dup at-xy ." \ \___ / |" 1+ -2dup at-xy ." /- _ `-/ '" 1+ -2dup at-xy ." (/\/ \ \ /\" 1+ -2dup at-xy ." / / | ` \" 1+ -2dup at-xy ." O O ) / |" 1+ -2dup at-xy ." `-^--'`< '" 1+ -2dup at-xy ." (_.) _ ) /" 1+ -2dup at-xy ." `.___/` /" 1+ -2dup at-xy ." `-----' /" 1+ -2dup at-xy ." <----. __ / __ \" 1+ -2dup at-xy ." <----|====O)))==) \) /====|" 1+ -2dup at-xy ." <----' `--' `.__,' \" 1+ -2dup at-xy ." | |" 1+ -2dup at-xy ." \ / /\" 1+ -2dup at-xy ." ______( (_ / \______/" 1+ -2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" + s" @[31m, ," logo+ + s" /( )`" logo+ + s" \ \___ / |" logo+ + s" /- @[m_@[31m `-/ '" logo+ + s" (@[m/\/ \@[31m \ /\" logo+ + s" @[m/ / |@[31m ` \" logo+ + s" @[34mO O @[m) @[31m/ |" logo+ + s" @[m`-^--'@[31m`< '" logo+ + s" (_.) _ ) /" logo+ + s" `.___/` /" logo+ + s" `-----' /" logo+ + s" @[33m<----.@[31m __ / __ \" logo+ + s" @[33m<----|====@[31mO)))@[33m==@[31m) \) /@[33m====|" logo+ + s" @[33m<----'@[31m `--' `.__,' \" logo+ + s" | |" logo+ + s" \ / /\" logo+ + s" @[36m______@[31m( (_ / \______/" logo+ + s" @[36m,' ,-----' |" logo+ + s" `--{__________)@[m" logo+ + + 2drop ; diff --git a/sys/boot/forth/logo-beastiebw.4th b/sys/boot/forth/logo-beastiebw.4th index 63e613052606..197099cda0bc 100644 --- a/sys/boot/forth/logo-beastiebw.4th +++ b/sys/boot/forth/logo-beastiebw.4th @@ -27,25 +27,33 @@ 46 logoX ! 4 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) - 2dup at-xy ." , ," 1+ - 2dup at-xy ." /( )`" 1+ - 2dup at-xy ." \ \___ / |" 1+ - 2dup at-xy ." /- _ `-/ '" 1+ - 2dup at-xy ." (/\/ \ \ /\" 1+ - 2dup at-xy ." / / | ` \" 1+ - 2dup at-xy ." O O ) / |" 1+ - 2dup at-xy ." `-^--'`< '" 1+ - 2dup at-xy ." (_.) _ ) /" 1+ - 2dup at-xy ." `.___/` /" 1+ - 2dup at-xy ." `-----' /" 1+ - 2dup at-xy ." <----. __ / __ \" 1+ - 2dup at-xy ." <----|====O)))==) \) /====|" 1+ - 2dup at-xy ." <----' `--' `.__,' \" 1+ - 2dup at-xy ." | |" 1+ - 2dup at-xy ." \ / /\" 1+ - 2dup at-xy ." ______( (_ / \______/" 1+ - 2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" + s" , ," logo+ + s" /( )`" logo+ + s" \ \___ / |" logo+ + s" /- _ `-/ '" logo+ + s" (/\/ \ \ /\" logo+ + s" / / | ` \" logo+ + s" O O ) / |" logo+ + s" `-^--'`< '" logo+ + s" (_.) _ ) /" logo+ + s" `.___/` /" logo+ + s" `-----' /" logo+ + s" <----. __ / __ \" logo+ + s" <----|====O)))==) \) /====|" logo+ + s" <----' `--' `.__,' \" logo+ + s" | |" logo+ + s" \ / /\" logo+ + s" ______( (_ / \______/" logo+ + s" ,' ,-----' |" logo+ + s" `--{__________)" logo+ + + 2drop ; diff --git a/sys/boot/forth/logo-fbsdbw.4th b/sys/boot/forth/logo-fbsdbw.4th index 29dffc194df9..d4a532b78f4f 100644 --- a/sys/boot/forth/logo-fbsdbw.4th +++ b/sys/boot/forth/logo-fbsdbw.4th @@ -27,19 +27,27 @@ 52 logoX ! 9 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) - 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ - 2dup at-xy ." |_| |_| \___|\___|" 1+ - 2dup at-xy ." ____ _____ _____" 1+ - 2dup at-xy ." | _ \ / ____| __ \" 1+ - 2dup at-xy ." | |_) | (___ | | | |" 1+ - 2dup at-xy ." | _ < \___ \| | | |" 1+ - 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ - at-xy ." |____/|_____/|_____/" + s" ______" logo+ + s" | ____| __ ___ ___ " logo+ + s" | |__ | '__/ _ \/ _ \" logo+ + s" | __|| | | __/ __/" logo+ + s" | | | | | | |" logo+ + s" |_| |_| \___|\___|" logo+ + s" ____ _____ _____" logo+ + s" | _ \ / ____| __ \" logo+ + s" | |_) | (___ | | | |" logo+ + s" | _ < \___ \| | | |" logo+ + s" | |_) |____) | |__| |" logo+ + s" | | | |" logo+ + s" |____/|_____/|_____/" logo+ + + 2drop ; diff --git a/sys/boot/forth/logo-orb.4th b/sys/boot/forth/logo-orb.4th index 74a89b765137..c2a504d1ddf5 100644 --- a/sys/boot/forth/logo-orb.4th +++ b/sys/boot/forth/logo-orb.4th @@ -26,21 +26,30 @@ 46 logoX ! 7 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + [char] @ escc! \ replace @ with Esc + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." + s" @[31m``` @[31;1m`@[31m" logo+ + s" s` `.....---...@[31;1m....--.``` -/@[31m" logo+ + s" +o .--` @[31;1m/y:` +.@[31m" logo+ + s" yo`:. @[31;1m:o `+-@[31m" logo+ + s" y/ @[31;1m-/` -o/@[31m" logo+ + s" .- @[31;1m::/sy+:.@[31m" logo+ + s" / @[31;1m`-- /@[31m" logo+ + s" `: @[31;1m:`@[31m" logo+ + s" `: @[31;1m:`@[31m" logo+ + s" / @[31;1m/@[31m" logo+ + s" .- @[31;1m-.@[31m" logo+ + s" -- @[31;1m-.@[31m" logo+ + s" `:` @[31;1m`:`" logo+ + s" @[31;1m.-- `--." logo+ + s" .---.....----.@[m" logo+ + + 2drop ; diff --git a/sys/boot/forth/logo-orbbw.4th b/sys/boot/forth/logo-orbbw.4th index 9b613e6770c8..11dc11cabb77 100644 --- a/sys/boot/forth/logo-orbbw.4th +++ b/sys/boot/forth/logo-orbbw.4th @@ -26,21 +26,29 @@ 46 logoX ! 7 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." + s" ``` `" logo+ + s" s` `.....---.......--.``` -/" logo+ + s" +o .--` /y:` +." logo+ + s" yo`:. :o `+-" logo+ + s" y/ -/` -o/" logo+ + s" .- ::/sy+:." logo+ + s" / `-- /" logo+ + s" `: :`" logo+ + s" `: :`" logo+ + s" / /" logo+ + s" .- -." logo+ + s" -- -." logo+ + s" `:` `:`" logo+ + s" .-- `--." logo+ + s" .---.....----." logo+ + + 2drop ; diff --git a/sys/boot/forth/menu.4th b/sys/boot/forth/menu.4th index 4eab6ab692e8..4d8aaee32bd1 100644 --- a/sys/boot/forth/menu.4th +++ b/sys/boot/forth/menu.4th @@ -395,14 +395,15 @@ also menu-infrastructure definitions setenv \ Assign third to ansi_caption[x][y] - kerncapbuf 0 s" Kernel: " strcat + kerncapbuf 0 s" @[1mK@[37mernel: " [char] @ escc! strcat kernmenuidx @ [char] 0 = if - s" default/" + s" default/@[32m" else - s" " - then strcat + s" @[34;1m" + then + [char] @ escc! strcat 2over strcat - s" " strcat + s" @[37m" [char] @ escc! strcat kernidx @ kernmenuidx @ ansi_caption[x][y] setenv diff --git a/sys/boot/forth/screen.4th b/sys/boot/forth/screen.4th index 1e0b7bf93cfe..e0af82b3a8b8 100644 --- a/sys/boot/forth/screen.4th +++ b/sys/boot/forth/screen.4th @@ -62,3 +62,13 @@ marker task-screen.4th \ Disable inverse foreground/background mode ( Esc-[27m ) : -inv ( -- ) escc 27 .# [char] m emit ; + +\ Convert all occurrences of given character (c) in string (c-addr/u) to Esc +: escc! ( c-addr/u c -- c-addr/u ) + 2 pick 2 pick + begin dup 0> while + over c@ 3 pick = if over 27 swap c! then + 1- swap 1+ swap + repeat + 2drop drop +;