The UART 16550 you're programming here is why `qemu -serial stdio` and real hardware debug cables both work identically — serial output is often the only way to debug a kernel before VGA or any other driver is initialized. Forgetting to poll the Line Status Register before sending a byte is a common bug that silently drops characters when the transmit buffer isn't actually empty yet.