I am learning x86-64 assembly, using SASM IDE and I have this question.
%include "io64.inc"
section .data
string2 db "hello",0
section .text
global CMAIN
CMAIN:
mov rbp, rsp; for correct debugging
mov rsi, string2
xor rax, rax
ret
Since I mov rsi, string2
, I thought rsi
and string2
hold the same thing, an address .
When debugging, I watch $rsi
and check the "address" box, it shows the char array correctly. But when I also watch string2
and check "address", it gives Wrong variable or address: "string2"
. If I uncheck "address", it shows the char array correctly.
Why $rsi
and string2
behaves differently? Did I miss something?