diff --git a/drivers/vga.c b/drivers/vga.c index 5a0e91a..5784717 100644 --- a/drivers/vga.c +++ b/drivers/vga.c @@ -174,7 +174,7 @@ void printChar(const char str) line--; } } - cursorMove(col - 1, line); + cursorMove(col, line); } void printStringDetails(const char *str, uint color, uint bgColor, int startX, int startY) @@ -206,7 +206,10 @@ void cursorDisable(void) void cursorMove(int x, int y) { + volatile short *vga = (short *)VGA_ADDR; + long int colorAttr = (vgaBgColor << 4 | (vgaColor & 0x0f)) << 8; uint16_t pos = y * VGA_WIDTH + x; + vga[pos] = colorAttr; outb(0x3D4, 0x0F); outb(0x3D5, (uint8_t)(pos & 0xFF));