From 1b6f76488dcc01c8e6c0efbe07751ebeea18c33b Mon Sep 17 00:00:00 2001 From: andromeda Date: Tue, 3 Mar 2026 22:01:49 +0100 Subject: add rust kernel stub --- src/lib.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..c6cb39e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,20 @@ +#![no_std] +#![no_main] + +use core::panic::PanicInfo; + +#[unsafe(no_mangle)] +pub extern "C" fn _start() -> ! { + // 'k' + loop{unsafe {core::arch::asm!( + "out dx, al", in("al") 0x6Bu8 + )}} +} + +#[panic_handler] +fn panic(_: &PanicInfo) -> ! { + // 'p' + loop{unsafe {core::arch::asm!( + "out dx, al", in("al") 0x70u8 + )}} +} -- cgit v1.3.1