From a1b7b35e726c70dd39ff8ed07a4e066e0a999d5d Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Wed, 1 Nov 2017 10:34:48 +0000 Subject: [PATCH] Organize code --- arch/console.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/console.c b/arch/console.c index 8a90be3..32a99aa 100644 --- a/arch/console.c +++ b/arch/console.c @@ -2,6 +2,8 @@ #include "util.h" +static unsigned short *const console_buffer = (unsigned short*)0xB8000; + static const unsigned int console_width = 80; static const unsigned int console_height = 25; @@ -10,8 +12,6 @@ static unsigned int console_column; static unsigned char console_color; -static unsigned short *console_buffer; - static unsigned char vga_entry_color(enum vga_color fg, enum vga_color bg); static unsigned short vga_entry(unsigned char uc, unsigned char color); static void console_putentryat(char c, unsigned char color, unsigned int x, unsigned int y); @@ -20,7 +20,6 @@ void console_initialize() { console_row = 0; console_column = 0; console_color = vga_entry_color(VGA_COLOR_LIGHT_GREY, VGA_COLOR_BLACK); - console_buffer = (unsigned short*)0xB8000; for (unsigned int y = 0; y < console_height; y++) { for (unsigned int x = 0; x < console_width; x++) {