Author Topic: AT&T asm help  (Read 1599 times)

Offline airc

  • Multiple posting newcomer
  • *
  • Posts: 34
AT&T asm help
« on: November 22, 2012, 05:18:05 pm »
hi all
i've the following function and i want access to its parametres through the ebp register but the function always return 0

Code: [Select]
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: AT&T asm help
« Reply #1 on: November 22, 2012, 05:27:31 pm »
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!]