compiler: nasm
asm: x64
OS: Debian x64
Hello, I'm starting to get deeper and deeper into the assembly, and in this case I want to train a bit with a pile.
I wanted to push the value "AAAAAA" onto the stack and just display it with the sys_write system call, but after compiling the code nothing displays.
.text:
        global _start
_start:
        mov rax,'AAAAAAA'
        push rax
        mov rax,0x1
        mov rdx, 9
        mov rsi, [rsp+4*rsi]
        mov rdi,1
        syscall
        ;exit
        mov rax, 60
        mov rdi, 0
        syscall
before, I tried yet with this version
        mov rax,0x1
        mov rdx, 9
        pop rsi
        mov rdi,1
        syscall
but still not working, I miss some important detail in my knowledge, I feel that I'm getting closer but I can't get it out :(
Could this thread be a potential cause of my problem? :): Why do system calls use a different stack?
 
    