mirror of
https://github.com/pixelyblah/florid-os.git
synced 2026-05-15 11:38:40 +00:00
11 lines
No EOL
208 B
C
11 lines
No EOL
208 B
C
#ifndef IO_H
|
|
#define IO_H
|
|
#include <stdint.h>
|
|
|
|
static inline uint8_t inb(uint16_t port) {
|
|
uint8_t ret;
|
|
__asm__ volatile ( "inb %w1, %b0" : "=a"(ret) : "Nd"(port) : "memory");
|
|
return ret;
|
|
}
|
|
|
|
#endif |