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;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 $t0,ali
li $t1,8
next: Ih $t7,0($t0)
Blank 1
sh $t7,0($to)
addi $t0,$t0,2
Blank 2
bnez $t1,next
la $t0,ali
Blank 3
Go: Ih $a0,0($t0)
li $v0,1 # print integer
syscall
la $a0,mus
li $v0,4
syscall
Blank 4
addi $t1,$t1,-1
Blank 5
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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions