diff options
author | Joursoir <chat@joursoir.net> | 2021-08-05 14:42:35 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-08-05 14:42:35 +0000 |
commit | 9d6cbd98bf5397041454d2871a352e14c53d9ba0 (patch) | |
tree | 1ea1788115cd9e55986c69bb52a9c79b44e65329 /kernel | |
parent | caa440daf6e7954cc9515fd090beb64b87493eca (diff) | |
download | mfsos-9d6cbd98bf5397041454d2871a352e14c53d9ba0.tar.gz mfsos-9d6cbd98bf5397041454d2871a352e14c53d9ba0.tar.bz2 mfsos-9d6cbd98bf5397041454d2871a352e14c53d9ba0.zip |
i386: make outb()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/i386.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/i386.h b/kernel/i386.h new file mode 100644 index 0000000..14f89b7 --- /dev/null +++ b/kernel/i386.h @@ -0,0 +1,13 @@ +#ifndef KERNEL_I386 +#define KERNEL_I386 + +static inline void outb(uint16_t port, uint8_t data) +{ + asm volatile ( + "out %0,%1" + : /* no output */ + : "a" (data), "d" (port) + ); +} + +#endif /* KERNEL_I386 */ |