Enable bochs terminal output.

This commit is contained in:
Drew Galbraith 2025-05-06 22:26:00 -07:00
parent 5a20c23569
commit 0dfa6008ec
3 changed files with 8 additions and 3 deletions

View file

@ -5,14 +5,18 @@
#define COM1 0x3f8
#define BOCHS_DBG 1
namespace {
bool is_transmit_empty() { return (inb(COM1 + 5) & 0x20) != 0; }
void dbgputchar(char c) {
while (!is_transmit_empty())
;
while (!is_transmit_empty());
outb(COM1, c);
#if BOCHS_DBG
outb(0xe9, c);
#endif
}
void dbg(const glcr::StringView& str) {