aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.dats
blob: d6e29f48cefee08538714269d18c41a01570d01b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "./prelude/kernel_prelude.hats"

staload "kernel/interrupts/idt.sats"

%{^
  void breakpoint(){ 
    __asm__("int3");
  }
%}

extern fun breakpoint() :void  = "mac#"

implement main0 () = (
  println!("Start");

  // Initialize interrupt table
  idt_init();

  // Throws breakpoint exception
  breakpoint();

  println!("End");
)