wm: teppich

ref: 189fb3be1c27333f46853fcc68c800379348d026
dir: /pc/x86.c/

View raw version
#include <u.h>

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

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