From fcdc14f939a25189988e21f53dc24d5aed560504 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 5 Apr 2021 20:50:58 +0200 Subject: Cleaning Makefile and creating asm macros --- src/utils/asm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/utils/asm.h (limited to 'src/utils/asm.h') 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 -- cgit v1.2.3