summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/port_io.h
blob: db755b4092b8c5204f4a2e6b0ff5b065f31e091c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdint.h>

inline void port_outb(uint16_t port, uint8_t val) {
	asm volatile("outb %0, %1" : : "a" (val), "Nd" (port));
}

inline uint8_t port_inb(uint16_t port) {
	uint8_t val;
	asm volatile("inb %1, %0" : "=a" (val) : "Nd" (port));
	return val;
}