Calling C function in assembly code (gas)
问题 I found an example and was editing it for gas. extern printf .global _start .data hello: db "Hello", 0xa, 0 .text _start: mov %rdi, hello mov %rax, 0 call printf mov %rax, 0 ret But it doesn't work. What's wrong? What does this mean: hello: db "Hello", 0xa, 0 I understand what it scope of memory, but I don't understand this string db "Hello", 0xa, 0 And here _start: mov %rdi, hello mov %rax, 0 call printf mov %rax, 0 ret os: linux (debian). intel 64-bit 回答1: It's is the null-byte-terminattor.