News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

AT&T asm help

Started by airc, November 22, 2012, 05:18:05 PM

Previous topic - Next topic

airc

hi all
i've the following function and i want access to its parametres through the ebp register but the function always return 0


int getParam(int x)
{
    int result;
   asm("mov 8(%ebp),%eax"); // copy x into eax
   asm("mov %eax, -4(%ebp)"); // copy eax into result
   return result;
}


i konw its not CB related , but i hope to get some help

thanks in advance

oBFusCATed

What do you expect to get as an answer other then a locked/deleted topic?

Search the internet or the manual of you compiler how to do this.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]