kernel: e9 port output

This commit is contained in:
Matheus
2023-04-08 02:01:58 -03:00
parent ee4e5e5b13
commit 056481bedb
3 changed files with 25 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <arch/io.h>
// TODO compile time options for disabling output to port e9h
void arch_e9_putc(char c) {
outb(0xe9, c);
}
void arch_e9_puts(char *c) {
while (*c) {
outb(0xe9, *c++);
}
}
+3
View File
@@ -1,4 +1,7 @@
#include <arch/e9.h>
void kernel_entry() {
arch_e9_puts("Hello, world!\n");
asm("cli");
asm("hlt");
}
+7
View File
@@ -0,0 +1,7 @@
#ifndef _E9_H
#define _E9_H
void arch_e9_putc(char);
void arch_e9_puts(char *);
#endif