diff --git a/moon/src/arch/x86_64/cpu.rs b/moon/src/arch/x86_64/cpu.rs index ff8e4f44..16b3a9eb 100644 --- a/moon/src/arch/x86_64/cpu.rs +++ b/moon/src/arch/x86_64/cpu.rs @@ -24,4 +24,8 @@ pub fn halt() -> ! { pub fn wait_for_interrupt() -> () { unsafe { asm!("hlt"); } +} + +pub fn breakpoint() -> () { + unsafe { asm!("int3"); } } \ No newline at end of file diff --git a/moon/src/main.rs b/moon/src/main.rs index b51f7744..5d6e5760 100644 --- a/moon/src/main.rs +++ b/moon/src/main.rs @@ -15,8 +15,6 @@ mod log; use arch::cpu; use arch::interrupts; -use x86_64::instructions::interrupts::int3; - use video::Color; #[no_mangle] @@ -35,7 +33,7 @@ pub extern "C" fn _start() -> ! { interrupts::enable(); - int3(); + cpu::breakpoint(); println!("Still here!");