Do offsets in assembly represent addresses or bits?

-1

I am a bit confused, will inc [esi + 8] (lets say [esi] points to 0x0000001F in 8-bit memory) increment 0x00000027 or will it affect 0x00000020? I have seen a video implying it will affect the latter whereas regular pointers in ram go by addresses, not bits.

assembly
x86
memory-address
addressing-mode
asked on Stack Overflow Apr 15, 2021 by Real Name • edited Apr 15, 2021 by Peter Cordes

1 Answer

1

Addresses are bytes. This will increment 0x00000027.

This doesn't assemble because you're missing the size though. inc {byte|word|dword|qword} ptr [esi + 8] is what you want. (Operand size is required)

answered on Stack Overflow Apr 15, 2021 by Joshua

User contributions licensed under CC BY-SA 3.0