learn ia32 for C
- by David Lee
I am trying to translate the following:
Action:
pushl %ebp
movl %esp, %eax
subl $32, %esp
movl $0, -8(%eax)
movl $0, -4(%eax)
movl -4(%eax), %eax
cmpl 32(%eax), %ebp
movl -4(%ebp), %eax
sall $2, %ebp
addl 8(%ebp), %ebp
movl (%ebp), %ebp
addl %ebp, -8(%eax)
addl $1, -4(%eax)
What is the best way to learn assembly and translating this code?