aboutsummaryrefslogtreecommitdiff
path: root/lowlevel.c
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2013-08-13 20:31:28 +1200
committerDavid <dbphillipsnz@gmail.com>2013-08-13 20:31:28 +1200
commitbc6b1dde4d5a9fd2779c6328b43553488f46fa45 (patch)
tree1232ec59e38ca92372c65143c1e8c0a945c5d324 /lowlevel.c
downloadtoast-bc6b1dde4d5a9fd2779c6328b43553488f46fa45.tar.xz
Initial Commit
Diffstat (limited to 'lowlevel.c')
-rw-r--r--lowlevel.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/lowlevel.c b/lowlevel.c
new file mode 100644
index 0000000..b305ea4
--- /dev/null
+++ b/lowlevel.c
@@ -0,0 +1,24 @@
+#ifndef LOWLEVEL_C
+#define LOWLEVEL_C
+
+#include <toast.h>
+
+void outb(uint16_t p,uint8_t val)
+{
+ asm("outb %%al,%%dx;"
+ :
+ :"d"(p),"a"(val)
+ );
+}
+
+void disable_ints()
+{
+ asm("cli");
+}
+
+void enable_ints()
+{
+ asm("sti");
+}
+
+#endif \ No newline at end of file