From 627f05098785327744e666c9149375125499d2ff Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 4 Oct 2026 00:52:49 +0200 Subject: feat: revelfs type shi --- boot/port.zig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'boot/port.zig') diff --git a/boot/port.zig b/boot/port.zig index be760b1..d38f829 100644 --- a/boot/port.zig +++ b/boot/port.zig @@ -17,3 +17,18 @@ pub inline fn inb(port: u16) u8 { : [port] "N{dx}" (port), ); } + +pub inline fn outw(port: u16, val: u16) void { + asm volatile ("outw %[val], %[port]" + : + : [val] "{ax}" (val), + [port] "N{dx}" (port), + ); +} + +pub inline fn inw(port: u16) u16 { + return asm volatile ("inw %[port], %[result]" + : [result] "={ax}" (-> u16), + : [port] "N{dx}" (port), + ); +} -- cgit v1.3