关于win32汇编的问题,为什么我的win32汇编程序编译通过,当我调试到while循环时就出错
错误提示:Project.exe中的0x0040101C 处未处理的异常:0xC00000005:读取位置0x0080a034时发生访问冲突。
TITLE College Registration Example (Regist.asm)
; Simple demonstration of MASM's .IF,
; .ENDIF, and .ELSEIF directives.
; Last update: 06/01/2006
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