-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathprint.rs
More file actions
23 lines (20 loc) · 832 Bytes
/
print.rs
File metadata and controls
23 lines (20 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::hal::{self, Machinelike};
use core::fmt::{self, Write};
pub struct Printer;
impl Write for Printer {
fn write_str(&mut self, s: &str) -> fmt::Result {
hal::Machine::print(s).map_err(|_| fmt::Error)?;
Ok(())
}
}
pub fn print_header() {
kprintln!("****************************************************************");
kprintln!(" ___ _ _ ____ _____ ___ ____ ");
kprintln!(" / _ \\ ___(_)_ __(_)___ | _ \\_ _/ _ \\/ ___| ");
kprintln!("| | | / __| | '__| / __| | |_) || || | | \\___ \\ ");
kprintln!("| |_| \\__ \\ | | | \\__ \\ | _ < | || |_| |___) | ");
kprintln!(" \\___/|___/_|_| |_|___/ |_| \\_\\|_| \\___/|____/ ");
kprintln!("");
kprintln!("****************************************************************");
kprintln!("");
}