After trying my OS on real hardware for the first time, I discovered a weird bug with the cursor:
Its x position is offset by 3 characters
So, naturaly, disabled everything that happens on boot and started to re-enabling them
one after another and narrowed down the problem the function that enables the cursor:
Code: Select all
void Terminal_Class::showCursor(uint8_t thickness) {
outb(0x3D4, 0x09);
uint8_t end = inb(0x3D5) & 0b00011111; // Get the max scanline
uint8_t start = end - thickness;
outb(0x3D4, 0x0A);
outb(0x3D5, (inb(0x3D5) & 0xC0) | start);
outb(0x3D4, 0x0B);
outb(0x3D5, (inb(0x3E0) & 0xE0) | end);
}
Here is how it looks like in BOCHS (what is should look like):
And how it looks on real hardware:
Do anyone know what's happening ?