I have written a small syscall function in NASM that works so far.
global _start
section .text
_start:
mov rcx, text
mov rdx, 7
mov rbx, 1
mov rax, 4
int 0x80
mov rax, 1
mov rbx, 0
int 0x80
text:
db "ABCDEFG",0x0a
This give me the output : ABCDEFG
When i use this way:
global _start
section .text
_start:
mov rcx, 0x0a47464544434241
push rcx
mov rcx, rsp
mov rdx, 7
mov rbx, 1
mov rax, 4
int 0x80
mov rax, 1
mov rbx, 0
int 0x80
This version prints nothing :( Can anyone tell me exactly why this is? I have already spent a few hours in the debugger but without success.