Begin work for exceptions post

This commit is contained in:
Philipp Oppermann
2016-05-13 15:54:19 +02:00
parent 7c565abba8
commit 431bb39fdb
4 changed files with 96 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
#![feature(lang_items)]
#![feature(const_fn, unique)]
#![feature(alloc, collections)]
#![feature(asm)]
#![no_std]
extern crate rlibc;
@@ -29,6 +30,7 @@ extern crate collections;
#[macro_use]
mod vga_buffer;
mod memory;
mod interrupts;
#[no_mangle]
pub extern "C" fn rust_main(multiboot_information_address: usize) {
@@ -50,6 +52,14 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
format!("Some String");
}
interrupts::init();
unsafe { *(0xdeadbeaf as *mut u32) = 42};
unsafe {
asm!("xor eax, eax; idiv eax" :::: "intel");
}
println!("It did not crash!");
loop {}