blob: 84298cb26a3ac8f36596b851518cee16c8b4dd52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <types.h>
#include <io.h>
uint8_t inb(uint32_t port)
{
uint8_t ret;
__asm__ volatile ("inb %%dx, %%al" : "=a"(ret) : "d"(port));
return ret;
}
void outb(uint32_t port, uint8_t value)
{
__asm__ volatile ("outb %%al, %%dx" : : "d"(port), "a"(value));
}
|