back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/start.asm
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
committerscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
commit7d07ff825dc7cff7ee80b04346e0d2c49a91e190 (patch)
treef3bf4c72c22107b0d74143f09af39b0071106540 /start.asm
downloadarithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.gz
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.bz2
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.zip
Initial commit
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