From 7b6bb7071914657b8be1ea031054bb7734b114f3 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 12 Nov 2021 09:58:07 +0100 Subject: [PATCH] Minor functionality --- kernel/kernel.c | 6 +++--- kernel/kernel.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/kernel.c b/kernel/kernel.c index 343a8da..ff1adce 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -4,15 +4,15 @@ #include "../lib/str.h" #include "../lib/strf.h" -void display_status(char* status_text) { +void display_status(char* status_text, unsigned int bg_color) { clear_row(0); set_cursor_pos(0, 0); - print(status_text, 0x7f); + print(status_text, bg_color | STATUS_TEXT_COLOR); } void init() { - display_status("Kernel loaded"); + display_status("Kernel loaded", 0x70); vga_init(); // Initialize the screen first // i.e. clear the screen et cetera. diff --git a/kernel/kernel.h b/kernel/kernel.h index 4ef9269..2e61e23 100644 --- a/kernel/kernel.h +++ b/kernel/kernel.h @@ -1,2 +1,4 @@ +#define STATUS_TEXT_COLOR 0x0f + void init(); -void display_status(char*); +void display_status(char*, unsigned int);