我是装配的新手,并试图创建一个程序,它准备了前10个斐波那契数字。
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
它不起作用。我怎么能解决它?