change dev env, format rust

This commit is contained in:
andromeda
2026-03-05 21:00:18 +01:00
parent f52da82650
commit 846c54653b
2 changed files with 17 additions and 10 deletions

View File

@@ -31,7 +31,10 @@
};
};
devShells.${system}.default = pkgs.mkShell {
inputsFrom = [self.packages.${system}.default];
inputsFrom = [
self.packages.${system}.bootle
self.packages.${system}.bootler
];
};
};
}

View File

@@ -12,11 +12,13 @@ pub extern "C" fn _start() -> ! {
fn print_serial(s: &str) {
let mut bytes = s.bytes();
while let Some(b) = bytes.next() {
unsafe {core::arch::asm!(
unsafe {
core::arch::asm!(
"out dx, al"
, in("al") b
)};
)
};
}
}
fn println_serial(s: &str) {
@@ -28,7 +30,11 @@ fn welcome_serial() {
print_serial(ANSI_PINK);
println_serial("\nWelcome to Bootle OS");
println_serial("All code GPL licensed and freely available on git.mtgmonkey.net");
print_serial("Enjoy your time! Press "); print_serial(ANSI_RED); print_serial("ctrl+a x"); print_serial(ANSI_PINK); println_serial(" to escape Qemu");
print_serial("Enjoy your time! Press ");
print_serial(ANSI_RED);
print_serial("ctrl+a x");
print_serial(ANSI_PINK);
println_serial(" to escape Qemu");
print_serial(ANSI_CLEAR);
}
@@ -39,9 +45,7 @@ fn panic(_: &PanicInfo) -> ! {
}
fn halt() -> ! {
unsafe {core::arch::asm!(
"hlt"
)};
unsafe { core::arch::asm!("hlt") };
halt()
}