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:
parent
fb53f60e4f
commit
912a622ad4
2 changed files with 4 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -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)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue