From a84b5003f4048dbfbd161c205be2bf8917ad1775 Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Thu, 24 Mar 2011 20:24:59 -0500 Subject: [PATCH] Classic text colors. --- kernel/core/multiboot.c | 7 ++++--- kernel/core/vga.c | 5 +++++ kernel/include/system.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kernel/core/multiboot.c b/kernel/core/multiboot.c index 7863f8a7..a458914c 100644 --- a/kernel/core/multiboot.c +++ b/kernel/core/multiboot.c @@ -14,9 +14,9 @@ void dump_multiboot( struct multiboot *mboot_ptr ) { - resettextcolor(); + brighttextcolor(); kprintf("MULTIBOOT header at 0x%x:\n", (uintptr_t)mboot_ptr); - settextcolor(7,0); + resettextcolor(); kprintf("Flags : 0x%x ", mboot_ptr->flags); kprintf("Mem Lo: 0x%x ", mboot_ptr->mem_lower); kprintf("Mem Hi: 0x%x ", mboot_ptr->mem_upper); @@ -41,7 +41,7 @@ dump_multiboot( kprintf("VBE se: 0x%x ", mboot_ptr->vbe_interface_seg); kprintf("VBE of: 0x%x ", mboot_ptr->vbe_interface_off); kprintf("VBE le: 0x%x\n", mboot_ptr->vbe_interface_len); - resettextcolor(); + brighttextcolor(); if (mboot_ptr->flags & (1 << 2)) { kprintf("Started with: %s\n", (char *)mboot_ptr->cmdline); } @@ -65,5 +65,6 @@ dump_multiboot( } } } + resettextcolor(); } diff --git a/kernel/core/vga.c b/kernel/core/vga.c index 07b607ce..303a0c80 100644 --- a/kernel/core/vga.c +++ b/kernel/core/vga.c @@ -209,6 +209,11 @@ settextcolor( */ void resettextcolor() { + settextcolor(7,0); +} + +void +brighttextcolor() { settextcolor(15,0); } diff --git a/kernel/include/system.h b/kernel/include/system.h index 014a0d7f..4c314160 100644 --- a/kernel/include/system.h +++ b/kernel/include/system.h @@ -36,6 +36,7 @@ extern void cls(); extern void puts(char *str); extern void settextcolor(unsigned char forecolor, unsigned char backcolor); extern void resettextcolor(); +extern void brighttextcolor(); extern void init_video(); extern void placech(unsigned char c, int x, int y, int attr); extern void writechf(unsigned char c);