From b4f3bc078f78f0db42a24f344836d0f490c6a283 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 30 Oct 2018 23:49:06 +0100 Subject: [PATCH] Minor VGA cleanup. --- Kernel/VGA.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Kernel/VGA.cpp b/Kernel/VGA.cpp index d048fe01d4..15c2ff92d9 100644 --- a/Kernel/VGA.cpp +++ b/Kernel/VGA.cpp @@ -5,8 +5,7 @@ #include "StdLib.h" #include "Task.h" -PRIVATE BYTE *vga_mem = 0L; -PRIVATE BYTE current_attr = 0x07; +static byte* vga_mem = nullptr; void vga_scroll_up() { @@ -38,14 +37,8 @@ void vga_putch_at(byte row, byte column, byte ch, byte attr) vga_mem[cur + 1] = attr; } -byte vga_get_attr() -{ - return current_attr; -} - void vga_init() { - current_attr = 0x07; vga_mem = (byte*)0xb8000; for (word i = 0; i < (80 * 25); ++i) { @@ -69,9 +62,7 @@ WORD vga_get_cursor() void vga_set_cursor(WORD value) { if (value >= (80 * 25)) { - /* XXX: If you try to move the cursor off the screen, I will go reddish pink! */ vga_set_cursor(0); - current_attr = 0x0C; return; } IO::out8(0x3d4, 0x0e);