im new to assembly and curently trying to create a program thet couculates the first 10 Fibonacci numbers.
IDEAL
MODEL small
STACK 100h
DATASEG
fibo db 10 dup (0)
indx db 2
indxm db 1
CODESEG
start:
mov ax, @data
mov ds, ax
mov [fibo+1], 1
mov bx, 0
mov cx, 8
next:
mov ax, [fibo+indxm] ;here is the problem
add [fibo+indx], ax ;also here
inc indx
inc indxm
loop next
exit:
mov ax, 4c00h
int 21h
END start
it doesnt work. how can i fix it???