
FibN
By:
Fisyuk on
May 29th, 2012 | syntax:
ASM (NASM) | size: 0.45 KB | hits: 29 | expires: Never
extern ExitProcess
%include "c:\myprog\asm\2\io.inc"
global fibonacci
section .data
n dd 7
section .text use32
..start:
mov ecx,[n]
push ecx
call fibonacci
call outi
fibonacci:
pop edx
push edx
xor eax,eax
xor ebx,ebx
mov edx,1
fibloop:
mov ebx,eax
add ebx,edx
mov edx,eax
mov eax,ebx
pop ecx
dec ecx
jnz fibloop
pop edx
push edx
push eax
ret
push dword 0
call ExitProcess