; NASM
push 30 ; '0'
mov rax, 4 ; write
mov rbx, 1 ; stdout
mov rcx, rsp ; ptr to character on stack
mov rdx, 1 ; length of string = 1
int 80h
The code above does not print anything to stdout. It works when i give it a ptr to a character in section .data. What am i doing wrong?
amd64uses a different method for system calls thanint 0x80, although that might still work with 32-bit libraries installed, etc. Whereas onx86one would do:on
amd64one would instead do this:For what you want to do, consider the following example: