For some reason, while I was debugging it stopped at mov al,data1[si] and gave me an exception
Exception thrown at 0x00D53668 in Week 5.exe: 0xC0000005: Access violation reading location 0x01AA6000.
May I know what was the reason?
INCLUDE Irvine32.inc
.data
data1 byte "MILK",0
data2 byte 4 dup('*'),0
.code
main proc
mov CX,4
mov si,0
l1:
mov al,data1[si] <<EXCEPTION THROWN AT THIS LINE>>
mov data2[si],al
inc si ; before go in the loop l1, cx will auto deduct by 1, then cx==0?
loop l1
mov EDX, offset data2
call WriteString
exit
main endp
end main