From 65a859ac5b721c8d3e0123351ad99690e2e7a876 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 21 Nov 2014 15:37:45 +0100 Subject: preparing switch to ELF userspace --- userspace/sys/crt0.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 userspace/sys/crt0.S (limited to 'userspace/sys/crt0.S') diff --git a/userspace/sys/crt0.S b/userspace/sys/crt0.S new file mode 100644 index 0000000..48eadd9 --- /dev/null +++ b/userspace/sys/crt0.S @@ -0,0 +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 -- cgit v1.2.3