# How can I get the correct offset from that instruction?

I have the following instructions: The registers' values in the First instruction are:

• RAX=0000000033307EE0
• RCX=0000000000000000

The registers' values in the Second instruction are:

• RAX=0000000033307EE0
• RCX=00000000377F1FD0

What I did is:

The first instruction offset is `[rax + rcx*8] = RCX(00000000) * 8 = 8`
So, the final result is `Address(33307EE0) + Offset(8)`.

And the second instruction offset is `[rax + rcx*8] = RCX(377F1FD0) * 8 = BBF8FE80`
So, the final result is `Address(33307EE0) + Offset(BBF8FE80)`.

Are those results true? because I found the address is correct but the offset is still wrong.

[RAX=0x33307EE0 + RCX=0x0 * 0x8] == [0x33307EE0+0x0] = `0x33307EE0`
compare whatever is at Address `0x33307EE0` with r9 register
[RAX=0x33307EE0 + RCX=0x377F1FD0 * 0x8] == [ 0x33307EE0 + 0x1bbf8fe80] = `0x1ef297d60`
mov into rcx whatever is there at `0x1ef297d60`
• At present, I read several books about assembly, although I have seen that form before `[eax+ecx*5]`, etc, but I didn't understand it but after your answer, I understood what it means. Jun 18, 2021 at 23:26