.global _start _start: # environment adress was passed on stack pop %eax mov %eax, environ # call main (argc and argv are on the stack) call main # push exit code and pass to _exit syscall push %eax call _exit # this should never be reached! .wait: hlt jmp .wait