Hello. I've started to learn assembly this week, and I found a example that I couldn't understand, so, if anyone could explain it to me, I would appreciate.
int increment(int x) {
x = x + 1;
return(x);
}
and this got translated to:
pushl %ebp
movl %esp, %ebp
incl 8(%ebp)
movl 8(%ebp), %eax
popl %ebp
ret
So my question is, why incl/movl 8, and not 4 ? doesnt esp "move it" 4 places ?
Thank you very much