This commit is contained in:
Ben
2019-04-25 14:43:38 +01:00
parent d83a4444e5
commit d65d1a6e74
11 changed files with 146 additions and 38 deletions

View File

@@ -1,13 +1 @@
#include "kernio.h"
inline void outb(uint16_t port, uint8_t b) {
asm("outb %0, %1" : : "a"(b), "Nd"(port));
}
inline uint8_t inb(uint16_t port) {
uint8_t ret;
asm volatile ( "inb %1, %0"
: "=a"(ret) // Output
: "Nd"(port)); // Input
return ret;
}