aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.dats
diff options
context:
space:
mode:
authorXander <xander@icth.xyz>2023-07-07 16:07:49 +0200
committerXander <xander@icth.xyz>2023-07-07 16:07:49 +0200
commitb14f83f53dfb1f4bf1b5eeb8162891a9aeeaff1c (patch)
tree402bfe2a7702e29be97ea479aadacdcdcbf6635f /kernel/main.dats
parentcd8a202caac232c7a5b05ad11eb5059d9ad3f002 (diff)
downloadats-os-b14f83f53dfb1f4bf1b5eeb8162891a9aeeaff1c.tar.xz
ats-os-b14f83f53dfb1f4bf1b5eeb8162891a9aeeaff1c.zip
Default interrupts
Diffstat (limited to 'kernel/main.dats')
-rw-r--r--kernel/main.dats21
1 files changed, 19 insertions, 2 deletions
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");
)