adds a utility to dump the gdt, adds serial printing for printf in testing

This commit is contained in:
2025-05-30 13:49:37 -04:00
parent 1a60e91745
commit 47056f7d9a
4 changed files with 25 additions and 9 deletions

View File

@ -2,12 +2,18 @@
#if defined(__is_libk)
#include <kernel/tty.h>
#ifdef __TESTING__
#include <kernel/serial.h>
#endif
#endif
int putchar(int ic) {
#if defined(__is_libk)
char c = (char) ic;
terminal_write(&c, sizeof(c));
#ifdef __TESTING__
serial_write(&c, sizeof(c));
#endif
#else
// TODO: Implement stdio and the write system call.
#endif