X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fadd_digits_asm.s;h=8144acc0ed8722291df104640c63e1b60e50afdc;hp=39f4af9acf5817eeed0a80cb22be8a09d703461d;hb=29f315953466e71fc76b1b05c79c1231e5c83074;hpb=e4c05570709db2718a983c27322942769eab4c86 diff --git a/src/add_digits_asm.s b/src/add_digits_asm.s index 39f4af9..8144acc 100644 --- a/src/add_digits_asm.s +++ b/src/add_digits_asm.s @@ -9,6 +9,7 @@ # Result in %rax is the final result in the carry flag # Exploits the fact that inc and dec do not affect the carry flag add_digits: + addq $0, %rax loop: movq (%rsi), %rax # Temporarily store digit from second array adcq %rax, (%rdi) # Add digits in second and first array, store in first