Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A programmer is asked to translate the following HLL code into MIPS Assembly language short ali ( ) = { 1 0 , 2 0

A programmer is asked to translate the following HLL code into MIPS Assembly language
short ali()={10,20,-5,-15,40,-88,19,-33};
string mus="***";
for (int k=0;k<8;k++)
ali(k)=32*ali(k);
for (int k=0;k<8;k++)
cout ali (k) mus ; // print value
return 0 ;
The programmer asked you to help him complete the missing 10 statements in the MIPS code. In your
answers, please separate the opcode and the operands by ONE space only as follows: sub $t9,$t8,$t5
.data
ali: .half 10,20,-5,-15,40,-88,19,-33
mus: .asciiz " t "
text
.globl bonus
bonus:
la $to,ali
li $t1,8
next: Ih $t7,0($t0)
Blank 1
sh $t7,0($t0)
addi $t0,$t0,2
Blank 2
bnez $t1,next
la $to,ali
Blank 3
Go: Ih $a0,0($t0)
li $vv0,1 # print integer
syscall
la $a0,mus
li $vv0,4
syscall
Blank 4
addi $t1,$t1,-1
Blank 5
/bar ( Blank 6) # exit program
syscall

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

=+a) What assumptions and/or conditions are violated by this model?

Answered: 1 week ago