wm: teppich

ref: 48cc33b5b8717b83c4dea9130c4396b451480c56
dir: /pc/x86.c/

View raw version
#include <u.h>

extern inline void
outb(uint16 port, uint8 data)
{ 
	asm volatile("out %0, %1" : : "a" (data), "d" (port));
}

extern inline uint8
inb(uint16 port) {
	uint8 data;
	asm volatile("in %1, %0" : "=a" (data) : "d" (port)); 
	return data;
}