Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .model flat
- option casemap :none
- .data
- .code
- fibonacci:
- push ebp
- mov ebp, esp
- sub esp, 10h
- cmp dword ptr [ebp + 8h], 0h
- je default_0
- cmp dword ptr [ebp + 8h], 1h
- je default_1
- cmp dword ptr [ebp + 8h], 2h
- je default_1
- push dword ptr [ebp + 8h]
- dec dword ptr [esp]
- add eax, ecx
- mov ebx, eax
- mov eax, ecx
- mov ecx, ebx
- call fibonacci
- mov eax, ecx
- jmp ocisti
- default_0:
- mov eax, 0h
- ret
- default_1:
- mov eax, 1h
- ret
- ocisti:
- add esp, 10h
- pop ebp
- retn 4h
- _start:
- mov ebx, 1h
- mov ecx, 1h
- mov eax, 1h
- push 0h
- call fibonacci
- ret
- end _start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement