Commit ea9e5f7f authored by Mathieu Maret's avatar Mathieu Maret

Fix cursor

parent 146a06f0
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment