Write a program that calculates the sum of all odd numbers in the Fibonacci sequence between 0 and 1,000,000.
MASM
NASM
; The result (sum) should be 1,089,154
; The result (sum) should be 1,089,154
.386
.MODEL FLAT, stdcall
.STACK 4096
ExitProcess PROTO, dwExitCode:DWORD
SECTION .data
a: DD 0
b: DD 1
sum: DD 0
.data
a DWORD 0
b DWORD 1
sum DWORD 0
SECTION .text
global _main
_main:
; TO DO
.code
_main PROC
mov eax, 1
mov ebx, 0
int 80h
; TO DO
INVOKE ExitProcess, 0
_main ENDP
END