哪位高手帮我看看下面的win32汇编程序为什么会出错???
;程序的功能是求数组中小雨50的和并输出来
;此程序编译通过,运行时会出错,出错的语句是mov ebx,[esi+index],为什么?????
INCLUDE Irvine32.inc
.data
samplesdword50
arraysdword10,60,20,33,72,89,45,65,72,18
ArraySizesdword($-array) / type sample
indexsdword0
sumsdword0
.code
main PROC
mov eax,ArraySize
mov esi,offset array
.whileindex < eax
mov ebx,[esi+index]
.if ebx <= sample
add sum,ebx
.endif
inc index
.endw
;显示求和结果
mov eax,sum
call writedec
exit
main ENDP
END main