aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.dats
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-15 18:04:00 +0200
committerXander <xander@biltopia.org>2023-07-15 18:04:00 +0200
commite2f3bfc0973c151951531b1715c53d14e8656d92 (patch)
tree68700f0e65a29285a41435eedb7ff41ec686e68a /kernel/main.dats
parentab383485291164f7bc78b88787271dd1b85c0d73 (diff)
downloadats-os-e2f3bfc0973c151951531b1715c53d14e8656d92.tar.xz
ats-os-e2f3bfc0973c151951531b1715c53d14e8656d92.zip
Print memory mappings
Diffstat (limited to 'kernel/main.dats')
-rw-r--r--kernel/main.dats24
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/main.dats b/kernel/main.dats
index 7e6bfe7..67afb7c 100644
--- a/kernel/main.dats
+++ b/kernel/main.dats
@@ -3,14 +3,11 @@
#define ATS_DYNLOADFLAG 0
staload "kernel/interrupts/idt.sats"
-staload "kernel/multiboot.sats"
+staload "kernel/bootinfo/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");
@@ -23,16 +20,13 @@ extern fun breakpoint() :void = "mac#"
extern fun main(p : Ptr1) : void = "ext#"
implement main(p) = let
-in
-
- clear_screen();
- println!("Start");
+ val () = clear_screen()
// Initialize boot info struct
- let
- val bootptr = boot_info_init(p)
- prval () = bootptr.1(bootptr.0)
- in end;
+ val bootptr = boot_info_init(p)
+in
+
+ print_memory_mappings(bootptr);
// Initialize interrupt table
idt_init();
@@ -40,6 +34,12 @@ in
// Throws breakpoint exception
breakpoint();
+
println!("End");
+ let
+ prval () = bootptr.1(bootptr.0)
+ in end
+
+
end