Implement print!/println! macros

This commit is contained in:
Philipp Oppermann
2019-01-25 13:22:33 +01:00
parent c1e3fa57c6
commit c43d6191c5
2 changed files with 18 additions and 9 deletions

View File

@@ -7,15 +7,7 @@ mod vga_buffer;
#[no_mangle]
pub extern "C" fn _start() -> ! {
use core::fmt::Write;
vga_buffer::WRITER.lock().write_str("Hello again").unwrap();
write!(
vga_buffer::WRITER.lock(),
", some numbers: {} {}",
42,
1.337
)
.unwrap();
println!("Hello World{}", "!");
loop {}
}