67 245
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #18618 in Assembler for davood farajzade

Question #18618
write a program that multiply 64 bit number by 32 bit register in assembly
Expert's answer
& main:
li $s0, 5& #load 5 into register s0
li $s1, 4& #load 4 into register s1

MULTIPLY:
li $s3, 1& #counter to control how many times we go through loop
add $s4, $s0, $s4
add $s5, $s3, $s5

bne $s5, $s1, MULTIPLY& #if control and s1 aren't equal re-enter loop
j EXIT #otherwise jump to EXIT

EXIT:
li $v0, 1
la $a0, ($s4)
syscall & #system call to print out result

jr $31 #end program

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
15.11.12, 15:20

You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!

davood farajzade
15.11.12, 09:42

tanks alot

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions