IA-32 Assembly: Impact of 8-Bit Operations on 32-Bit Registers

During my computer science course, I gave me a binary file and the task of figuring out what it does using reverse engineering techniques (i.e., parse the file and analyze it). I came across one line of IA-32 instruction:

add    %esi,%ecx

      

I found out that suffixed instructions l

work on 32-bit registers, those with a suffix w

work on 16-bit registers, and I think (but don't know) that non-suffixed operators work on 8-bit registers. Edit: See Ross Ridge's comment which falsifies my assumption.

So my questions are:

  • Is my guess above correct?
  • If so, what is the effect (as opposed to addl

    ) of the instructions above - and what are the effects of other operations such as sub

    , mov

    etc.?

Thanks in advance!

+3


source to share


1 answer


Typically the suffix is ​​ignored / irrelevant if the correct register names are specified. So the above instruction is a 32-bit instruction because esi and ecx are 32-bit registers.



+4


source







All Articles