Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

Recursive function in x86 Assembly

$
0
0
Hi,
How can I write that function in x86 assembly?
I have tried to write it but I could not.
I am going to call it from a C function.

Thanks.

[color=Purple]int stirling(int n,int k)
{

if((n==0)&&(k==0))
return 1;

else if((n>=1)&&(k>0))
return stirling(n-1,k-1)-(n-1)*stirling(n-1,k);

else if(n>0)
return 0;

return 0;
}[/color]

Viewing all articles
Browse latest Browse all 152

Trending Articles