NASM x86_64 assembly in 32-bit mode: Why does this instruction produce RIP-Relative Addressing code?
问题 [bits 32] global _start section .data str_hello db "HelloWorld", 0xa str_hello_length db $-str_hello section .text _start: mov ebx, 1 ; stdout file descriptor mov ecx, str_hello ; pointer to string of characters that will be displayed mov edx, [str_hello_length] ; count outputs Relative addressing mov eax, 4 ; sys_write int 0x80 ; linux kernel system call mov ebx, 0 ; exit status zero mov eax, 1 ; sys_exit int 0x80 ; linux kernel system call The fundamental thing here is that I need to have