#![no_std]

extern crate rlibc;

mod vga_buffer;

use core::panic::PanicInfo;

pub fn halt() -> ! {
    println!("we've halted");
    loop {
        x86_64::instructions::hlt();
    }
}

#[unsafe(no_mangle)]
pub extern "C" fn rust_main(_multiboot_information_address: usize) {
    println!("Hello World!");
    halt()
}

#[panic_handler]
pub fn panic(info: &PanicInfo) -> ! {
    println!("Panic happened: {}", info);
    halt()
}
