Just as the title says I have a question with a program I am doing. I am just starting out using MASM assembly and kind of stuck any help would be great.
I need to calculate the sums and differences of arrays that are shown below. The little bit of code i have now is
.data
x sword 10,20,30,40,50,60,70,80
y sword -80,-70,-60,-50,-40,-30,-20,-10
a sword 8 dup (?)
b sword 8 dup (?)
.code
begin:
mov esi,offset x
mov edi,offset a
mov ecx,lengthof x
mov ebx,offset y
mov edi,offset b
mov ecx,lengthof y
next:
mov ah,[esi]
mov [edi],ah
add esi
add edi
loop next
else:
move al,[ebx]
mov [edi],al
add ebx
add edi
loop else
invoke exitProcess,0
end begin