first commit

This commit is contained in:
RaphProductions 2025-05-06 20:19:48 +02:00
commit cab7a75780
264 changed files with 5833 additions and 0 deletions

17
kernel/src/sys/arch/x86_64/io.c Executable file
View file

@ -0,0 +1,17 @@
// Copyright (C) 2024 Sipaa Projects
// This code is part of the Soaplin kernel and is licensed under the terms of
// the MIT License.
#include <stdint.h>
uint8_t inb(uint16_t port) {
uint8_t ret;
__asm__ volatile("inb %w1, %b0" : "=a"(ret) : "Nd"(port) : "memory");
return ret;
}
void outb(uint16_t port, uint8_t val) {
__asm__ volatile("outb %b0, %w1" : : "a"(val), "Nd"(port) : "memory");
}
void io_wait(void) { outb(0x80, 0); }