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="k";
for (int k=0;k8;k++)
ali(k)=32*ali(k);
for (int k=0;k8;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
image text in transcribed

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

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

Question 3 of 4

Answered: 1 week ago