ratio submodule

This commit is contained in:
2024-09-07 14:40:46 +02:00
parent 1894987afc
commit d270657fc9
24 changed files with 534 additions and 4 deletions

16
libbozo/headers/sys/io.h Normal file
View File

@ -0,0 +1,16 @@
#pragma once
static inline void outb(uint16_t port, uint8_t val)
{
__asm__ volatile ( "outb %b0, %w1" : : "a"(val), "Nd"(port) : "memory");
}
static inline uint8_t inb(uint16_t port)
{
uint8_t ret;
__asm__ volatile ( "inb %w1, %b0"
: "=a"(ret)
: "Nd"(port)
: "memory");
return ret;
}