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
- Calculate new Address
- 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 ?