io.h (289B)
1 #ifndef PC_IO_IO_H 2 #define PC_IO_IO_H 3 4 #define inb(port) \ 5 ({ \ 6 uint8 ret; \ 7 asm volatile ("inb %w1,%0" \ 8 : "=a" (ret) \ 9 : "i" (port) ); \ 10 ret; \ 11 }) 12 13 #define outb(port, val) \ 14 asm volatile ("outb %b0,%w1" \ 15 : \ 16 : "a" (val), "i" (port) ) 17 18 typedef char EtatIo; 19 20 #endif