Question: I ' m writing code to add two 6 4 bit integers together using 3 2 bit registers in assembly. I ' m not sure

I'm writing code to add two 64 bit integers together using 32 bit registers in assembly. I'm not sure what is wrong with my code, but I'm failing tests and having issues compiling. Here it is: .global start
.equ wordsize, 4
.data
num1: .long 1,1
num2: .long 1,1
.text
_start:
movl num1,%eax #eax = first half num1
movl num2,%ecx #ecx = first half num2
addl %ecx, %eax
movl (%eax),%ecx #ecx = second half num1
movl (%ebx),%edx #edx = second half num2
addl %ecx, %edx
jnc end_carry
carry:
addl $1,%eax
end_carry:
nop
done:
nop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!