#![feature(abi_x86_interrupt, asm)] #![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(); unsafe { asm!("mov dx, 0; div dx" ::: "ax", "dx" : "volatile", "intel") } println!("Gamarjoba, munde: {}", 1); println!("Gamarjoba, munde: {}", 2); panic!("A bad thing happened"); loop {} }