Linux x86-64 Hello World and register usage for parameters
问题 I found this page which has a Hello World example for x86-64 on Linux: http://blog.markloiseau.com/2012/05/64-bit-hello-world-in-linux-assembly-nasm/ ; 64-bit "Hello World!" in Linux NASM global _start ; global entry point export for ld section .text _start: ; sys_write(stdout, message, length) mov rax, 1 ; sys_write mov rdi, 1 ; stdout mov rsi, message ; message address mov rdx, length ; message string length syscall ; sys_exit(return_code) mov rax, 60 ; sys_exit mov rdi, 0 ; return 0