Return value of a C function to ASM

后端 未结 3 1991
盖世英雄少女心
盖世英雄少女心 2021-02-14 02:51

I\'m trying to call a function from within ASM. I know how to call it, but i\'m having trouble finding how to get the return value of this function. An example follows:

3条回答
  •  故里飘歌
    2021-02-14 03:17

    The return value is in eax. If you've called a C function from asm, you can read the return value from eax. If you're trying to return from an asm function to C, store the intended return value in eax.

    Things get a little bit more complicated for returning floating point values, long long values, or structures, so ask if you need that and someone (maybe me) will help you.

提交回复
热议问题