section .text
extern printf
global main
main:
push 10 ; Parameter
push mymsg ; Adresse
call printf
;add rsp, 8
mov rax, 1 ; sys_exit
mov rbx, 0 ; return 0 (success)
int 80h
section .data
mymsg db 'Hello World %d!', 0xa
Compiling it @Linux64Bit
nasm -f elf64 printf.asm
gcc printf.o -o printf
./printf
--> Error: Segmentation fault (code dumped)
Whats wrong with that code?