summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/portio.h6
-rw-r--r--kernel/printf.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/portio.h b/kernel/portio.h
new file mode 100644
index 0000000..06e0802
--- /dev/null
+++ b/kernel/portio.h
@@ -0,0 +1,6 @@
+#ifndef PORTIO_H
+#define PORTIO_H
+
+#define outb(port, value) asm volatile("out %b0,%w1" : : "a" (value), "d" (port));
+
+#endif
diff --git a/kernel/printf.c b/kernel/printf.c
index 4b3a632..0b51f8d 100644
--- a/kernel/printf.c
+++ b/kernel/printf.c
@@ -1,7 +1,6 @@
#include "printf.h"
#include "types.h"
-
-#define outb(port, value) asm volatile("out %b0,%w1" : : "a" (value), "d" (port));
+#include "portio.h"
void putchar(char c) {
if(c == '\n') {