FENIX_libc/arch/i386/inb.c
2020-12-18 12:39:04 -06:00

12 lines
No EOL
275 B
C

#include <sys/io.h>
/*
This was practically copied from musl, but it's
not like there's much there to copy anyways.
-Kat
*/
unsigned char inb(unsigned short int port) {
unsigned short val;
__asm__ volatile("inb %1,%0" : "=a" (val) : "dN" (port));
return val;
}