I'm getting Exception thrown on mov ax, num[si] after loop 1. It shows that "Exception thrown at 0x00091021 in Lab14.exe: 0xC0000005: Access violation reading location 0x00124000". What does this mean? how can I fix it?
.386
.model flat, stdcall
.stack 4096
ExitProcess PROTO, deExitCode:DWORD
.data
num dw 1111h, 2222h,3333h, 4444h
len dw ($-num)/2
res dw 0000h
.code
main PROC
mov ax, ds
mov ds, ax
mov si, 00h
mov cx, len
loop1:
mov ax, num[si]
L1:
add si, 02h
add ax, num[si]
Loop L1
mov res, ax
mov ah,4ch
int 21h
;INVOKE ExitProcess, 0
main ENDP
END main
User contributions licensed under CC BY-SA 3.0