Skip to content

Instantly share code, notes, and snippets.

@siviae
Created March 22, 2014 12:38
Show Gist options
  • Save siviae/9706549 to your computer and use it in GitHub Desktop.
Save siviae/9706549 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <conio.h>
int __cdecl float_fact(int);
int main(){
int num=10;
printf("%f", float_fact(num));
_getch();
return 0;
}
_________
section .text
global _fact
_fact:
mov ecx, [esp+4]
mov eax,1
jmp for
for:
mul ecx
dec ecx
jnz for
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment