mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
kernel: e9 port output
This commit is contained in:
@@ -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++);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
#include <arch/e9.h>
|
||||||
|
|
||||||
void kernel_entry() {
|
void kernel_entry() {
|
||||||
|
arch_e9_puts("Hello, world!\n");
|
||||||
asm("cli");
|
asm("cli");
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _E9_H
|
||||||
|
#define _E9_H
|
||||||
|
|
||||||
|
void arch_e9_putc(char);
|
||||||
|
void arch_e9_puts(char *);
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user