2
votes

So I know that movzbl 0x1(%esi,%eax), %ecx

Would zero extend a byte to a long using the esi+eax+1 and save it in ecx. But I'm confused as to what movzbl 0x1(%esi,%eax,1),%ecx would do? Would it just use esi+eax+2 or am I missing something on how movzbl works?

1

1 Answers

1
votes

That number in the parens is the scale (or shift) factor for the last (index) register, it's not just a constant to be added to the rest.

Learn memory operands. They are described in the Intel/AMD manuals.