Question: I need help fixing my code for this 6 4 - bit by 6 4 - bit multiplier that develops an assembly program which receives

I need help fixing my code for this 64-bit by 64-bit multiplier that develops an assembly program which receives two 64-bit numbers x =0x4A023201BA01DE11and y =
0x8AA0BB00CC001230,performs multiplication, and produces a 128-bit product.
Each register should be 32 bit. I got some help earlier but couldnt fully understand what was wrong with the code I originally had.
Can I please get some insight and help on whats wrong with my code?
loop
; main program loop
; insert your code here
; x =0x4A023201 BA01 DE11
; y =0x8AA0 BB00 CC001230
LDR r0,=0xBA01DE11 ; LSB32(x)
LDR r1,=0x4A023201 ; MSB32(x)
LDR r2,=0xCC001230 ; LSB32(y)
LDR r3,=0x8AA0BB00 ; MSB32(y)
; Clear the upper bits register
MOV r12, #0
; Perform the multiplications
UMULL r4, r5, r0, r2
UMULL r6, r7, r1, r2
UMULL r8, r9, r0, r3
UMULL r10, r11, r1, r3
; Combine the results
ADDS r7, r7, r9 ; Add the middle parts
ADCS r11, r11, #0 ; Add the carry to the most significant part
ADDS r6, r6, r8 ; Add the lower parts
ADCS r7, r7, #0 ; Add the carry to the middle parts
ADDS r11, r11, r6 ; Add to the second most significant part
ADCS r12, r12, r7 ; Finally, add the carry to the most significant part
; Store the results in registers
MOV r9, r5 ; Least significant part
MOV r10, r11 ; Second least significant part
MOV r11, r12 ; Most significant part
B loop ;
I need help fixing my code for this 6 4 - bit by

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 Programming Questions!