diff options
author | Marvin Borner | 2019-09-19 19:56:59 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-19 20:05:38 +0200 |
commit | 05e1fedcc9cd30d1a34a65e640da45e980b4f859 (patch) | |
tree | 9cfb7620907ac126f26cdfe9363cb73ed74ea179 /src/io/io.c | |
parent | ffd82e18b5259fab477ad375a7af8550fac526d8 (diff) |
Moved source to kernel directory
Diffstat (limited to 'src/io/io.c')
-rw-r--r-- | src/io/io.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/io/io.c b/src/io/io.c deleted file mode 100644 index 7bddb13..0000000 --- a/src/io/io.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <stdint.h> - -unsigned char receive(unsigned short port) { - unsigned char value; - __asm__ __volatile__ ("inb %1, %0" : "=a" (value) : "dN" (port)); - return value; -} - -void send(unsigned short port, unsigned char data) { - __asm__ __volatile__ ("outb %1, %0" : : "dN" (port), "a" (data)); -} - -void reboot() { - uint8_t good = 0x02; - while (good & 0x02) - good = receive(0x64); - send(0x64, 0xFE); - loop: - asm volatile ("hlt"); - goto loop; -}
\ No newline at end of file |