From 7d07ff825dc7cff7ee80b04346e0d2c49a91e190 Mon Sep 17 00:00:00 2001 From: scratko Date: Sun, 31 Mar 2024 21:05:36 +0300 Subject: Initial commit --- start.asm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 start.asm (limited to 'start.asm') 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 -- cgit v1.2.3