#include "./prelude/kernel_prelude.hats" #define ATS_DYNLOADFLAG 0 staload "kernel/interrupts/idt.sats" staload "kernel/multiboot.sats" staload "lib/SATS/writer.sats" staload UN = "prelude/SATS/unsafe.sats" extern praxi c (p : ptr) : [l : agz] strptr l extern prfun eat(p : strptr) : void %{^ void breakpoint(){ __asm__("int3"); } %} extern castfn char_arr2string {n:nat} (arr : &(@[char][n])) : string n extern fun breakpoint() :void = "mac#" extern fun main(p : Ptr1) : void = "ext#" implement main(p) = let in clear_screen(); println!("Start"); // Initialize boot info struct let val bootptr = boot_info_init(p) prval () = bootptr.1(bootptr.0) in end; // Initialize interrupt table idt_init(); // Throws breakpoint exception breakpoint(); println!("End"); end