0

If I have an instruction:

imull $eax, $ecx

so that it is multiplying what is stored in the two registers, where is the answer stored?

4
  • Read the question. I know what the operation is performing. Where is it being stored. Back into $eax possibly? Feb 12, 2014 at 5:52
  • Batter explanation here csi.ucd.ie/staff/jcarthy/home/alp/alp2-3.html Feb 12, 2014 at 5:53
  • 1
    The inputs and outputs are documented along with each instruction in Intel's Developer's Manual. Since you're using AT&T syntax rather than Intel, the ordering of the operands is different, which affects instructions with explicit destinations, like the one in your question. Adrian's answer is correct, but I wouldn't call it the property of the assembler, more a property of the assembler dialect being used.
    – DCoder
    Feb 12, 2014 at 6:00

1 Answer 1

1

Different assemblers work differently. For the GNU Assembler the result will go in $ecx. This is the opposite convention from most windows assemblers.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.