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
1
Expert's answer
2012-11-14T06:38:11-0500
& 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

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS