Added simple asciiart command and changed console color to green
This commit is contained in:
parent
71713b5e40
commit
cfd4fc1151
12
src/main.rs
12
src/main.rs
|
@ -45,7 +45,6 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
|||
.expect("heap initialization failed");
|
||||
|
||||
let mut executor = Executor::new();
|
||||
//executor.spawn(Task::new(example_task()));
|
||||
//executor.spawn(Task::new(keyboard::print_keypresses()));
|
||||
executor.spawn(Task::new(keyboard::return_keychar()));
|
||||
|
||||
|
@ -58,17 +57,6 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
|||
gros::hlt_loop();
|
||||
}
|
||||
|
||||
/*
|
||||
async fn async_number() -> u32 {
|
||||
42
|
||||
}
|
||||
|
||||
async fn example_task() {
|
||||
let number = async_number().await;
|
||||
println!("async number: {}", number);
|
||||
}
|
||||
*/
|
||||
|
||||
/// This function is called on panic.
|
||||
#[cfg(not(test))]
|
||||
#[panic_handler]
|
||||
|
|
|
@ -140,7 +140,15 @@ fn command_func(input_command: String) {
|
|||
}
|
||||
"echo" => {
|
||||
println!("{} ", args);
|
||||
}
|
||||
}
|
||||
"asciiart" => {
|
||||
println!(" _____ _____ ____ _____ ");
|
||||
println!(" / ____| __ \\ / __ \\ / ____|");
|
||||
println!(" | | __| |__) | | | | (___ ");
|
||||
println!(" | | |_ | _ /| | | |\\___ \\ ");
|
||||
println!(" | |__| | | \\ \\| |__| |____) |");
|
||||
println!(" \\_____|_| \\_\\\\____/|_____/ ");
|
||||
}
|
||||
command => {
|
||||
println!("{}: command not found", command);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ impl fmt::Write for Writer {
|
|||
lazy_static! {
|
||||
pub static ref WRITER: Mutex<Writer> = Mutex::new(Writer {
|
||||
column_position: 0,
|
||||
color_code: ColorCode::new(Color::Yellow, Color::Black),
|
||||
color_code: ColorCode::new(Color::Green, Color::Black),
|
||||
buffer: unsafe { &mut *(0xb8000 as *mut Buffer) },
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue