summaryrefslogtreecommitdiff
path: root/userspace/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/crt0.S')
-rw-r--r--userspace/crt0.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/userspace/crt0.S b/userspace/crt0.S
index 9f7dab1..e3bfa3b 100644
--- a/userspace/crt0.S
+++ b/userspace/crt0.S
@@ -1,9 +1,23 @@
.global _start
+
.extern main
.extern exit
+
_start:
+
+push $0
+call sbrk
+
+push $[_BSS_END_]
+call sbrk
+
call main
+
+
+push %eax
call _exit
+
+# this should never be reached anyway!
.wait:
hlt
jmp .wait