Question

Implement the following pseudo instructions using the appropriate MIPS instructions: Divi $s0, $s1, imm (imm is...

Implement the following pseudo instructions using the appropriate MIPS instructions:

  1. Divi $s0, $s1, imm (imm is a 16-bit value)

  2. Mul $s1, $s2, imm (imm is a 16-bit value)

  3. Li $t0, imme (load the 32-bit value into register $t0)

  4. Blt $to, imme, L (imm is a 16-bit value)

  5. Divu $s0, $s1, $s2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

.data
.text
.global main
.main
Li St0,imm # load value of 16 bit immediate value into temporary register $t0
Li $t1,imme # load value of 32 bit immediate into temporary register $t1
Divi $S0,$S1,St0 # divide immediate instruction
Mul $S1, $S2,$t0 # multiplication r type
blt $t1, $t2,target #branch to target if $t0<=$t1.
Divu $S0,$S1,$S2 # unsigned divide

li $v0,10 #terminate program
syscall # system call interrupt

IF YOU HAVE ANY QUERY PLEASE COMMENT DOWN BELOW

PLEASE GIVE A THUMBS UP

Add a comment
Know the answer?
Add Answer to:
Implement the following pseudo instructions using the appropriate MIPS instructions: Divi $s0, $s1, imm (imm is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT