mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Implement print!/println! macros
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -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 {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user