user2101494
user2101494

Reputation: 21

movzbl arguments

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?

Upvotes: 2

Views: 3163

Answers (1)

Alexey Frunze
Alexey Frunze

Reputation: 62096

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.

Upvotes: 1

Related Questions