sys_write doesn't print a message to the terminal
by Sunless from LinuxQuestions.org on (#4W7HQ)
Hi guys!
I'm trying to explore GNU Assembler using this example: https://0xax.github.io/asm_1/
My code of main.s is
Quote:
Command line preparation:
Quote:
Now, I run ./main But it doesn't print anything and terminal is waiting my next command.
What's going wrong?
In GNU Debugger numbers were successfully stored in registers.
I see result of first syscall "-14" in RAX.


I'm trying to explore GNU Assembler using this example: https://0xax.github.io/asm_1/
My code of main.s is
Quote:
| .data message: .ascii "ASSEMBLY OUTPUT" .text .globl _start _start: movq $1, %rdi movq $1, %rax movq $15, %rdx movq $message, %rsi syscall movq $60, %rax movq $0, %rdi syscall |
Quote:
| as -g -o main.o main.s ld -o main main.o |
What's going wrong?
In GNU Debugger numbers were successfully stored in registers.
I see result of first syscall "-14" in RAX.