diff options
Diffstat (limited to 'src/kernel/vga.c')
-rw-r--r-- | src/kernel/vga.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/vga.c b/src/kernel/vga.c index 42da312..6ae1588 100644 --- a/src/kernel/vga.c +++ b/src/kernel/vga.c @@ -12,6 +12,11 @@ void vga_set_color(uint8_t new_color) { mask = new_color << 8; } +void vga_swap_color(uint16_t pos) { + uint8_t *color_byte = (uint8_t *)(VGA_START + (pos >> 8) * VGA_COLUMNS + (pos & 0xff)) + 1; + *color_byte = (*color_byte << 4) + (*color_byte >> 4); +} + static void vga_scroll() { for (uint32_t *i = (uint32_t *)VGA_START; i < (uint32_t *)(VGA_END - VGA_COLUMNS); ++i) *i = *(i + VGA_COLUMNS / 2); |