Im new to asembly in general and im trying to learn but i kind of not get a lot of stuff in IA32
how do I convert this:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%edx
movl 12(%ebp),%eax
movl %ebp,%esp
movl (%edx),%edx
addl %edx,(%eax)
movl %edx,%eax
popl %ebp
ret
to C ?
what i got from this was something like
int fun6(int *ap, int *bp)
{
*ap = *ap + *bp ;
}
and how do i convert this:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%eax
sall $4,%eax
addl 8(%ebp),%eax
addl %eax,%eax
movl %ebp,%esp
popl %ebp
ret
to C ?
and for this one something like
int fun6(int ap)
{
int x = ap << 4 ;
x = x + ap ;
x = x + x ;
return x ;
}