/* * asm/io.h * * Provides acces to x86 I/O functions */ #define inb(port) ({ \ unsigned char _val; \ asm volatile ("inb %%dx, %%al" : "=a" (_val) : "d" (port)); \ _val; \ }) #define outb(port, val) \ asm volatile ("outb %%al, %%dx" : : "d" (port), "a" (val));