From a16a4dc9ed895c3a2934c2e14e1ab515f4899971 Mon Sep 17 00:00:00 2001 From: Clément Sibille Date: Mon, 4 Oct 2021 22:57:05 +0200 Subject: Provide an interface for drawing on the screen in VGA text mode This interface allows the user to write strings and move the cursor in VGA text mode. This closes #1. --- kernel/src/io.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 kernel/src/io.rs (limited to 'kernel/src/io.rs') diff --git a/kernel/src/io.rs b/kernel/src/io.rs new file mode 100644 index 0000000..b6b4cc7 --- /dev/null +++ b/kernel/src/io.rs @@ -0,0 +1,7 @@ +pub fn out8(address: u16, value: u8) { + unsafe { + asm!( + "out dx, al", in("dx") address, in("al") value + ) + } +} \ No newline at end of file -- cgit v1.2.3