Duke Nukem
Duke Nukem

Reputation: 329

Ollydbg : sign extending with Movsx

Movsx sign-extends a register with 1 right?

So why in Ollydbg i got this :

I should have FFFFFF65 instead of 00000065 in ECX no?

Thank you !

Upvotes: 2

Views: 174

Answers (1)

Fifoernik
Fifoernik

Reputation: 9899

The byte at the memory location has the value 65h. This is a positive number and thus the extension will fill the 3 highest bytes of ECX with zero giving 00000065h .

Upvotes: 3

Related Questions