I have assignment to calculate GCD of two no. by using stack frame & I write code for this -
.text
GCD:
push ebp
mov ebp,esp
1: cmp ebx,eax
je 3f
ja 2f
sub ebx,eax
jmp 1b
2: sub eax,ebx
jmp 1b
3: leave
ret
I got the answer of this code but i have question without taking memory location like [ebp+8]
how program run or how this program execute ?