2 years ago

#369

test-img

Julian mind

Assembly MOV and dereferencing

I came across this line from a textbook.

mov var, 10                   ;var contains 1 at 0xA

mov RAX, [var+5]              ;This will add 5 to the address already held by var, then dereference the new address and put whatever is at that address into RAX.

So the steps taken will be

  1. Calculate new Address
  2. Dereference new address to get value stored in memory location

For step1, will they use (0x1 from the value(1) + 5)
OR (10 from address(0xA) + 5)?
What would be the answer for Step1 ?

assembly

x86-64

dereference

0 Answers

Your Answer

Accepted video resources