Answer the question
In order to leave comments, you need to log in
Reading and writing to memory (RAM) on FASM?
Hello,
I recently started writing in Fasm, now I'm trying to understand the role - '[]'
For example:
MyVar dq 0
mov rax, MyVar
MyVar dq 0
mov MyVar, rax
MyVar dq 0
mov [MyVar], rax
MyVar dq 0
mov rax, [MyVar]
Answer the question
In order to leave comments, you need to log in
MyVar dq 0
mov rax, MyVar ; put into rax address MyVar
MyVar dq 0
mov [MyVar], rax ; write the contents of register rax to address MyVar
MyVar dq 0
mov rax, [MyVar] ; read into register rax the value at address MyVar
MyVar dq 0
mov MyVar, rax ; assign the address (constant number) the value from register rax ?? - mistake
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question