summaryrefslogtreecommitdiff
path: root/userspace/sys/crt.S
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/sys/crt.S')
-rw-r--r--userspace/sys/crt.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/userspace/sys/crt.S b/userspace/sys/crt.S
new file mode 100644
index 0000000..d09f8ca
--- /dev/null
+++ b/userspace/sys/crt.S
@@ -0,0 +1,20 @@
+.global _start
+
+_start:
+
+pop %eax
+mov %eax, environ
+
+pop %eax
+#mov %eax, _impure_ptr
+
+call main
+
+push environ
+push %eax
+call _exit2
+
+# this should never be reached anyway!
+.wait:
+ hlt
+jmp .wait