I am trying to make the c++ code of adding 512 bit (big int) converted into masm inline assembler in visual studio. Carry is very important as the C++ shown in the link below.I do need to represent the c++ into masm inline assembler in visual studio
I tried to do this in masm but it is slow it took mearly 700 ms for my masm code
C++ code Here. C++ Takes 300 ms for addition
Masm code
_asm {
mov edx, summand
mov eax, [edx]
mov ebx, this
add eax, [ebx]
mov [ebx], eax
mov ecx, 4
mov eax, [edx + ecx]
adc eax, [ebx + ecx]
mov [ebx + ecx], eax
mov ecx, 8
mov eax, [edx + ecx]
adc eax, [ebx + ecx]
mov [ebx + ecx], eax
mov ecx, 12
mov eax, [edx + ecx]
adc eax, [ebx + ecx]
mov [ebx + ecx], eax
}