From b14f83f53dfb1f4bf1b5eeb8162891a9aeeaff1c Mon Sep 17 00:00:00 2001 From: Xander Date: Fri, 7 Jul 2023 16:07:49 +0200 Subject: Default interrupts --- kernel/main.dats | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'kernel/main.dats') diff --git a/kernel/main.dats b/kernel/main.dats index 0a325ff..26db859 100644 --- a/kernel/main.dats +++ b/kernel/main.dats @@ -1,6 +1,23 @@ #include "kernel/kernel_prelude.hats" +staload "kernel/interrupts/idt.sats" + +%{^ + void breakpoint(){ + __asm__("int3"); + } +%} + +extern fun breakpoint() :void = "mac#" + implement main0 () = ( - println!("Hello World"); - println!("Hello World"); + println!("Start"); + + // Initialize interrupt table + idt_init(); + + // Throws breakpoint exception + breakpoint(); + + println!("End"); ) -- cgit v1.2.3