summaryrefslogtreecommitdiffstats
path: root/kernel/boot.s
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/boot.s')
-rw-r--r--kernel/boot.s15
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/boot.s b/kernel/boot.s
index 281e1ca..11175af 100644
--- a/kernel/boot.s
+++ b/kernel/boot.s
@@ -1,11 +1,16 @@
section .text
-extern main
-extern _estack
-global _start:function (_start.end - _start)
+extern main, _estack, _init
+global _start:function
_start:
- mov esp, _estack
+ ; Stack setup
+ mov eax, _estack
+ ; Align stack to odd address
+ and eax, 0xFFFFFFFE
+ mov esp, eax
+
+ call _init
call main
cli
.hang: hlt
jmp .hang
-.end:
+; .end: