From a822afc278e7855dea55bcd0de2e402d5bf43508 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 20 Nov 2014 23:28:17 +0100 Subject: fixed loading and runnnng progs (clear bss) --- userspace/crt0.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'userspace/crt0.S') 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 -- cgit v1.2.3