Add a debug output utility.

This commit is contained in:
Drew Galbraith 2023-05-17 20:42:59 -07:00
parent c2af2eee97
commit 872e6f3392
4 changed files with 24 additions and 4 deletions

13
zion/debug/debug.cpp Normal file
View file

@ -0,0 +1,13 @@
#include "debug/debug.h"
#include "common/port.h"
#define COM1 0x3f8
void dbgln(const char* str) {
while (*str != 0) {
outb(COM1, *str);
str++;
}
outb(COM1, '\n');
}

3
zion/debug/debug.h Normal file
View file

@ -0,0 +1,3 @@
#pragma once
void dbgln(const char *str);