change dev env, format rust
This commit is contained in:
@@ -31,7 +31,10 @@
|
||||
};
|
||||
};
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
inputsFrom = [self.packages.${system}.default];
|
||||
inputsFrom = [
|
||||
self.packages.${system}.bootle
|
||||
self.packages.${system}.bootler
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
16
src/lib.rs
16
src/lib.rs
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user