back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/start.asm
diff options
context:
space:
mode:
Diffstat (limited to 'start.asm')
-rw-r--r--start.asm14
1 files changed, 14 insertions, 0 deletions
diff --git a/start.asm b/start.asm
new file mode 100644
index 0000000..b685867
--- /dev/null
+++ b/start.asm
@@ -0,0 +1,14 @@
+global _start
+extern main
+
+section .text
+_start: mov eax, [esp] ; argc
+ mov edx, esp
+ add edx, 4 ; argv
+ push edx
+ push eax
+ call main
+ add esp, 8
+ mov ebx, eax ; return value from main
+ mov eax, 1
+ int 80h