mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Test the two-stage exception handler in code
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#![feature(alloc, collections)]
|
||||
#![feature(asm)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![no_std]
|
||||
|
||||
extern crate rlibc;
|
||||
@@ -56,7 +57,7 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
|
||||
unsafe { asm!("mov dx, 0; div dx" ::: "ax", "dx" : "volatile", "intel") }
|
||||
}
|
||||
|
||||
//println!("{:?}", divide_by_zero());
|
||||
println!("{:?}", divide_by_zero());
|
||||
|
||||
// provoke a page fault inside println
|
||||
println!("{:?}", unsafe { *(0xdeadbeaf as *mut u64) = 42 });
|
||||
|
||||
Reference in New Issue
Block a user