I am trying to fill an array with values of the Fibonacci sequence. The line that I am having trouble with is one in which I am trying to determine whether or not the requested Fibonacci number is even. Something like modulus would possibly make sense.. I have been searching the web and am unable to find the solution. Also if any one could provide pointers on other places I may be going wrong in the code, it would be much appreciated as I have tried but I have no doubt there are other mistakes.
.386
.model flat, stdcall
.stack 4096
INCLUDE Irvine32.inc
ExitProcess PROTO, dwExitCode: DWORD
.data
array DWORD size DUP 3 (99h)
.code
main PROC
mov eax, 0
mov ecx, 1
L1:
sub ebx, 2
cmp ebx, 0
jz Finish
add eax + ecx
add ecx + eax
LOOP L1
FINISH
;If eax and 1 is false jump to finish even need help here
mov edx, eax
ret
FINISHEVEN
mov edx, ecx
ret
call DumpMem
INVOKE ExitProcess, 0
main ENDP
END main