Usermode/AxWin3 - Fiddling
[tpg/acess2.git] / Usermode / Libraries / crt0.o_src / crt0.x86.asm
deleted file mode 120000 (symlink)
index 084206aa89d1e41d886e8029d9b8473b9f26d133..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-crt0.asm
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..531a3783ef31fe5404eaadb5452ba8c70cff2573
--- /dev/null
@@ -0,0 +1,30 @@
+;
+; Acess2
+; C Runtime 0
+; - crt0.asm
+
+[BITS 32]
+[section .text]
+
+
+[global _start]
+[global start]
+[extern main]
+[extern _exit]
+_start:
+start:
+       call main
+       push eax
+
+       mov eax, [_crt0_exit_handler]
+       test eax, eax
+       jz .exit
+       call eax
+       
+.exit:
+       call _exit
+       jmp $   ; This should never be reached
+[section .bss]
+[global _crt0_exit_handler]
+_crt0_exit_handler:
+       resd    1

UCC git Repository :: git.ucc.asn.au