NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Siko7 on January 19, 2019, 01:18:04 PM
-
Can someone explain, why the value of the register R9 = 0x200000000000000 and not 0x1 is?
Tanks a lot.
SECTION .data
var1: dq 0 ; Variable 1 is initialized to 0
SECTION .text
_start:
mov R9, [var1+1]
-
It looks like you are trying to add 1 to var1 then load the result in r9.
What you are actually doing is load r9 with the value stored at the memory location starting at the second byte of var1.