Exception thrown at 0x00091021 in Lab14.exe: 0xC0000005: Access violation reading location 0x00124000

0

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
assembly
x86
visual-studio-2019
x86-16
masm
asked on Stack Overflow Dec 10, 2020 by terry • edited Dec 10, 2020 by 1201ProgramAlarm

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0