33 lines
491 B
Rust
33 lines
491 B
Rust
#![feature(abi_x86_interrupt)]
|
|
#![no_std]
|
|
#![no_main]
|
|
|
|
#[macro_use]
|
|
mod vga_buffer;
|
|
mod interrupts;
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
#[panic_handler]
|
|
fn panic(info: &PanicInfo) -> !{
|
|
println!("{}", info);
|
|
loop {}
|
|
}
|
|
|
|
pub fn init() {
|
|
interrupts::init_idt();
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn _start() -> ! {
|
|
|
|
init();
|
|
x86_64::instructions::interrupts::int3();
|
|
|
|
println!("Gamarjoba, munde: {}", 1);
|
|
println!("Gamarjoba, munde: {}", 2);
|
|
panic!("A bad thing happened");
|
|
loop {}
|
|
}
|
|
|