add rust kernel stub

This commit is contained in:
andromeda
2026-03-03 22:01:49 +01:00
parent d879df630f
commit 1b6f76488d
11 changed files with 635 additions and 3 deletions

20
src/lib.rs Normal file
View File

@@ -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
)}}
}

8
src/linker.ld Normal file
View File

@@ -0,0 +1,8 @@
SECTIONS
{
. = 0x00010000;
.text : {
*(.text._start)
*(.text*)
}
}