INCLUDE Irvine32.inc
.data
array DWORD 10,20,30,40,50
sum DWORD 0
.code
main PROC
mov EDI,offset array
mov ECX,5
mov EAX,0
HERE:
add eax,[edi]
add edi,TYPE array
dec ecx
jnz HERE
mov sum,eax
exit
main ENDP
END main
What does TYPE mean inside the loop line: edi, TYPE array? Is it the TYPE of variable we are using in the array that it replaces?
This is the TYPE operator, which will return the type of the expression it is used with (in this particular case,
array)For further reference: MASM operators