blob: 1a68f08b4ea7d2abe44cc126f2f123ec14613b23 (
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));
}
|