inline uint32_t inportb(uint16_t port)
{
uint32_t ret_val;
__asm__ volatile ("inb %w1,%b0" : "=a"(ret_val) : "d"(port));
return ret_val;
}
inline void outportb(uint16_t port, uint32_t val)
{
__asm__ volatile ("outb %b0,%w1" : : "a"(val), "d"(port));
}
als Beispiel.