This commit is contained in:
Philipp Oppermann
2015-09-06 10:15:54 +02:00
parent d27d36fdd0
commit 10ddcead2d
2 changed files with 28 additions and 6 deletions

View File

@@ -34,9 +34,11 @@ pub extern fn rust_main(multiboot_address: usize) {
use vga_buffer::{Writer, Color};
vga_buffer::clear_screen();
let multiboot = unsafe{multiboot2::load(multiboot_address)};
memory::init(multiboot);
if let Some(multiboot) = unsafe{multiboot2::load(multiboot_address)} {
memory::init(multiboot);
} else {
println!("MULTIBOOT INOFORMATION STRUCTURE INVALID");
}
let mut writer = Writer::new(Color::Blue, Color::LightGreen);
writer.write_byte(b'H');