1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-04-14 17:33:13 -04:00

Output to serial port

This commit is contained in:
Braiden Vasco 2017-11-09 16:12:25 +00:00
parent fb53f60e4f
commit 912a622ad4
2 changed files with 4 additions and 1 deletions

View file

@ -52,7 +52,7 @@ OBJS += syscall.c.o
OBJS := $(addprefix src/, $(OBJS))
run: $(IMAGE)
qemu-system-i386 -cdrom $<
qemu-system-i386 -cdrom $< -serial stdio
all: $(KERNEL)

View file

@ -1,6 +1,7 @@
#include "console.h"
#include "stdlib.h"
#include "asm.h"
static unsigned short *const console_buffer = (unsigned short*)0xB8000;
@ -37,6 +38,8 @@ void console_print(const char *const s)
}
void console_putc(const char c) {
outportb(0x3F8, c);
if (c == '\n') {
console_column = 0;