INCLUDE Irvine16.inc
.data
byteArray BYTE 6 DUP(?)
listSize = ($ - byteArray)
aSum WORD 0
soffset = 0
.code
main PROC
mov ax, @data
mov ds, ax
mov cx, listSize
Loop1:
mov ax, 0
movzx ax, [byteArray + soffset]
add aSum, ax
soffset = soffset + 1
loop Loop1
exit
main ENDP
END main
The error I'm getting is error "A2074:cannot access label through segment registers"
I'm trying to use the soffset to loop through the byteArray.