aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/asm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/asm.h b/src/utils/asm.h
new file mode 100644
index 0000000..0929afa
--- /dev/null
+++ b/src/utils/asm.h
@@ -0,0 +1,11 @@
+#ifndef ASM_H
+#define ASM_H
+
+#define outb(port,value) \
+ asm volatile ("outb %%al, %%dx" :: "a"(value), "d" (port) )
+
+#define outbj(port,value) \
+ asm volatile ("outb %%al, %%dx;" :: "a" (value), "d"(port) )
+
+
+#endif \ No newline at end of file