From 44f9642bfc9ce9f740d508670befb569e06621a2 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Mon, 19 Oct 2026 11:06:32 -0400 Subject: add debug console. start work on userland pagedir manipulation tools --- arch/x86_64/hal/serial_com.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'arch/x86_64/hal/serial_com.c') diff --git a/arch/x86_64/hal/serial_com.c b/arch/x86_64/hal/serial_com.c index c571057..ec39d21 100644 --- a/arch/x86_64/hal/serial_com.c +++ b/arch/x86_64/hal/serial_com.c @@ -10,26 +10,26 @@ serial_com_recv(uint16_t port) return inb(SERIAL_COM_LSR(port)) & 1; } -static char -serial_com_getc(uint16_t port) -{ - while(serial_com_recv(port) == 0); - return inb(port); -} - static int serial_com_put_ready(uint16_t port) { return inb(SERIAL_COM_LSR(port)) & 0x20; } -static void +void serial_com_putc(uint16_t port, char c) { while(serial_com_put_ready(port) == 0); outb(port, c); } +char +serial_com_getc(uint16_t port) +{ + while(serial_com_recv(port) == 0); + return inb(port); +} + int serial_com_init_port( uint16_t port, -- cgit v1.2.3