-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.

Edit: so sorry for this incredibly stupid question please restore my right to post

  • 1
    The video you saw is wrong, or you misinterpreted it. (e.g. possibly it was talking about a microcontroller like 8051 where part of the address space is a bit-addressable view of regular physical memory (https://what-when-how.com/8051-microcontroller/bit-addresses-for-io-and-ram), but that wouldn't have a register called ESI.) – Peter Cordes Apr 15 '21 at 20:52
  • 1
    X86 is a byte machine, so each address represents one byte. – fuz Apr 15 '21 at 22:23

1 Answers1

2

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)

Joshua
  • 40,822
  • 8
  • 72
  • 132