ArraySum
Include Irvine32 . inc .data array dword 11 , 22 , 44 , 5 theSum dword ? . code main proc mov esi , offset array mov ecx , lengthof array call SumInt mov theSum , eax call writedec main endp ;------------------ SumInt proc push esi push ecx mov eax , 0 L1 : add eax , [ esi ] add esi , type dword loop L1 pop esi pop ecx ret SumInt endp end main 11 + 22 + 44 + 5 = 82