diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 8629a26..93da93f 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -4,7 +4,7 @@ void main() { // Do kernel stuff char* vidmem = (char*)0xb8000; *vidmem = 'X'; - for( int i = 0; i < 16; i++ ) { - println("C-Printing test!", 16); - } + + clear_screen(); + println("Kernel loaded.", 14); } diff --git a/src/kernel/lib/vga.c b/src/kernel/lib/vga.c index f0d9f02..7e89353 100644 --- a/src/kernel/lib/vga.c +++ b/src/kernel/lib/vga.c @@ -8,7 +8,8 @@ #define HEIGHT 480 // Memory -#define VIDEO_MEM (char*)0xb8000 +#define VIDEO_MEM (char*)0xb8000 +#define VIDEO_MEM_MAX (char*)0xb8fa0 // Global static int cursor_row = 0; @@ -27,8 +28,10 @@ void putc(char c, unsigned int col, unsigned int row) { /* Graphics Functions */ -void clear_screen(unsigned int width = 640, unsigned int height = 480) { - +void clear_screen() { + for( char* c = VIDEO_MEM; c <= VIDEO_MEM_MAX; c += 2 ) { + *c = 0x20; + } }