Im using x86-64 NASM on WSL Ubuntu.
I'm trying to use push/pop for function params, but for some reason it makes my program return " ".
section .text
global _start
_start:
mov edx, len
mov ecx, msg
push ecx
push edx
call println
mov eax, 1
int 0x80
println:
pop edx
pop ecx
mov ebx, 1
mov eax, 4
int 0x80
ret
section .data
msg db "Hello world!",0xa
len equ $ - msg
this returns:
Command terminated by signal 11
Not too sure what's causing this. Does anyone know? I would like to add that removing both the pushes and both the pops makes the program run perfectly fine again.