diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-03 20:38:28 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-03 20:38:28 +0530 |
commit | 70d67f088a2131466c22f6dadbe388a3ee1d5efb (patch) | |
tree | 819f93e0295e4e6682cea25e718cc998eeaaf216 /kernel/drivers | |
parent | a52729a44eb1a42f10544e67eecc5cc85b9e99c2 (diff) |
libk: Start work on custom liballoc
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/vga_text_buffer.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/drivers/vga_text_buffer.cc b/kernel/drivers/vga_text_buffer.cc index 6d1c0e1..69b1fe3 100644 --- a/kernel/drivers/vga_text_buffer.cc +++ b/kernel/drivers/vga_text_buffer.cc @@ -32,11 +32,11 @@ namespace VGATextBuffer { -static uint16_t *buffer = (uint16_t *) 0xB8000; -static uint8_t row = 0; -static uint8_t column = 0; -static uint8_t color = vga_entry_color(VGATextBuffer::COLOR_LIGHT_GREY, - VGATextBuffer::COLOR_BLACK); +static uint16_t *l_buffer = (uint16_t *) 0xB8000; +static uint8_t l_row = 0; +static uint8_t l_column = 0; +static uint8_t l_color = vga_entry_color(VGATextBuffer::COLOR_LIGHT_GREY, + VGATextBuffer::COLOR_BLACK); ALWAYS_INLINE static void write_entry_at(const char c, @@ -45,7 +45,7 @@ write_entry_at(const char c, const uint8_t y) { size_t index = y * VGA_WIDTH + x; - buffer[index] = vga_entry(c, color); + l_buffer[index] = vga_entry(c, color); } void @@ -60,22 +60,22 @@ initialize(void) for (uint8_t y = 0; y < VGA_HEIGHT; y++) for (uint8_t x = 0; x < VGA_WIDTH; x++) - write_entry_at(' ', color, x, y); + write_entry_at(' ', l_color, x, y); } void write_char(const char c) { if (c == '\n') { - row++; - column = 0; + l_row++; + l_column = 0; } else { - write_entry_at(c, color, column, row); + write_entry_at(c, l_color, l_column, l_row); - if (++column == VGA_WIDTH) { - column = 0; - if (++row == VGA_HEIGHT) - row = 0; + if (++l_column == VGA_WIDTH) { + l_column = 0; + if (++l_row == VGA_HEIGHT) + l_row = 0; } } } |