I am using an assembly compiler to try and print the first 12 numbers. I have succeeded in adding, but it won't print some of the numbers.
I want. 1 1 2 3 5 8 13 21 34 55 89 144
BUT GET. 1 2 5 13 34 89 233 610 as my out put.
I am missing some numbers like 3 and 8 ....
Here is my code
TITLE Fibonacci sequence with loop
; Prints first 12 numbers of fibonacci sequence with loop.
INCLUDE Irvine32.inc
.code
main PROC
; mov ax, 0
mov ecx, 12 ; how many times it should loop
mov eax, 1
mov ebx, 0
L1:
add eax, ebx
add ebx, eax
; add ebx, eax
CALL WriteInt
loop L1
exit
main ENDP
END main