Triple-fault by deliberately dividing by zero with no handler

This commit is contained in:
greg 2019-07-11 02:44:26 -07:00
parent 41dfe6215d
commit 596bb35697

View File

@ -1,4 +1,4 @@
#![feature(abi_x86_interrupt)]
#![feature(abi_x86_interrupt, asm)]
#![no_std]
#![no_main]
@ -24,6 +24,10 @@ 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");