diff options
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -1,31 +1,29 @@ #![allow(dead_code)] #![allow(unused_imports)] - #![no_std] #![no_main] mod arch; +mod io; mod machine; use core::panic::PanicInfo; use machine::cgascr::CGAScreen; +#[cfg(not(test))] #[panic_handler] -fn panic(_info: &PanicInfo) -> ! { +fn panic(info: &PanicInfo) -> ! { + println!("{}", info); loop {} } #[no_mangle] pub extern "C" fn _entry() -> ! { - let mut scr = CGAScreen::new(); - scr.show_coners(); - scr.setattr(0x1f); - scr.clear(); - scr.show_coners(); - - scr.print("--RuStuBs--\n"); - scr.print(" _._ _,-'\"\"`-._ ~Meow\n"); - scr.print(" (,-.`._,'( |\\`-/|\n"); - scr.print(" `-.-' \\ )-`( , o o)\n"); - scr.print(" `- \\`_`\"'-\n"); - scr.print("it works!\n"); + io::set_attr(0x1f); + io::clear(); + println!("--RuStuBs--"); + println!(" _._ _,-'\"\"`-._ ~Meow"); + println!(" (,-.`._,'( |\\`-/|"); + println!(" `-.-' \\ )-`( , o o)"); + println!(" `- \\`_`\"'-"); + println!("it works!"); loop {} } |
