From cdd04333a07f97bda05a153d979446a6775425a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 3 Nov 2004 02:28:27 +0000 Subject: [PATCH] Standard console height are 25 lines, not just 24. Now clears the screen and scrolls using the current colors (which allows for other background colors than black). console_set_color() no longer allows to set the 8 bit of the background color which indicates blinking. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9753 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/bios_ia32/console.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kernel/boot/platform/bios_ia32/console.cpp b/src/kernel/boot/platform/bios_ia32/console.cpp index 90c64f709e..809fe56a25 100644 --- a/src/kernel/boot/platform/bios_ia32/console.cpp +++ b/src/kernel/boot/platform/bios_ia32/console.cpp @@ -37,7 +37,7 @@ static const uint32 kSerialBaudRate = 115200; static uint16 *sScreenBase = (uint16 *)0xb8000; static uint32 sScreenWidth = 80; -static uint32 sScreenHeight = 24; +static uint32 sScreenHeight = 25; static uint32 sScreenOffset = 0; static uint16 sColor = 0x0f00; @@ -133,7 +133,7 @@ scroll_up() sScreenOffset = (sScreenHeight - 1) * sScreenWidth; for (uint32 i = 0; i < sScreenWidth; i++) - sScreenBase[sScreenOffset + i] = 0x0720; + sScreenBase[sScreenOffset + i] = sColor | ' '; } @@ -191,7 +191,7 @@ console_clear_screen(void) return; for (uint32 i = 0; i < sScreenWidth * sScreenHeight; i++) - sScreenBase[i] = 0xf20; + sScreenBase[i] = sColor; // reset cursor position as well sScreenOffset = 0; @@ -222,7 +222,7 @@ console_set_cursor(int32 x, int32 y) void console_set_color(int32 foreground, int32 background) { - sColor = (background & 0xf) << 12 | (foreground & 0xf) << 8; + sColor = (background & 0x7) << 12 | (foreground & 0xf) << 8; }