diff options
author | David <dbphillipsnz@gmail.com> | 2013-08-13 20:31:28 +1200 |
---|---|---|
committer | David <dbphillipsnz@gmail.com> | 2013-08-13 20:31:28 +1200 |
commit | bc6b1dde4d5a9fd2779c6328b43553488f46fa45 (patch) | |
tree | 1232ec59e38ca92372c65143c1e8c0a945c5d324 /lowlevel.c | |
download | toast-bc6b1dde4d5a9fd2779c6328b43553488f46fa45.tar.xz |
Initial Commit
Diffstat (limited to 'lowlevel.c')
-rw-r--r-- | lowlevel.c | 24 |
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 |