From c742be9c738c91703a7be787639cad167de3a6b1 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 17 Aug 2018 02:28:02 +0200 Subject: started reviving my fool os --- userspace/crt0.S | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 userspace/crt0.S (limited to 'userspace/crt0.S') diff --git a/userspace/crt0.S b/userspace/crt0.S new file mode 100644 index 0000000..4c08f89 --- /dev/null +++ b/userspace/crt0.S @@ -0,0 +1,29 @@ +.global _start + +_start: + +pop %eax +mov %eax, environ + +pop %eax +#mov %eax, _impure_ptr + +#mov $61, %eax # write syscall +#mov $1,%edx # stdout +#mov .hellostr,%ecx +#mov 9,%ebx # string length +#int $0x80 + +call main + +push environ +push %eax +call _exit2 + +# this should never be reached anyway! +.wait: + hlt +jmp .wait + +.hellostr: +.ascii "Hello Ass" -- cgit v1.2.3