From 9d6cbd98bf5397041454d2871a352e14c53d9ba0 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Thu, 5 Aug 2021 14:42:35 +0000 Subject: i386: make outb() --- kernel/i386.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 kernel/i386.h (limited to 'kernel') 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 */ -- cgit v1.2.3-18-g5258