blob: 6ca5bbcddf8bb3602afe4d7e8d5f1eb681cb4915 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/*
* 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));
|