1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marrrta [24]
3 years ago
11

Write a MIPS assembly language program that finds maximum element in an array of integers. Print the Result Array. You do not ne

ed to read elements of array from keyboard, Just declare them.
Computers and Technology
1 answer:
qwelly [4]3 years ago
3 0

Answer and Explanation:

The program using Assembly language to calculate maximum value in array is given as below:

.data

space: .asciiz " "

X: .word 31, 17, 92, 46, 172, 208, 13, 93, 65, 112

N: .word 10

.text

main: la $a0, X #$a0=load address of array X

lw $a1, N #$a1=10 --number elements

jal readArray #call readArray

li $v0, 10 #exit program

syscall

readArray:

li $t0, 0 #$t0=0

li $t1, 0 #$t1=0

buc: bge $t0, $a1, final #if $t0 >= $a1 then goto final

lw $a0, X($t1) #$a0 = X(i)

li $v0, 1 #Print integer

syscall

la $a0, space #load a space: " "

li $v0, 4 #print string

syscall

addi $t1, $t1, 4 #Every 4 bytes there is an integer in the array

addi $t0, $t0, 1 #$t0=$t0+1

b buc #goto buc

final:

jr $ra #return

The algorithm which are the steps used above is:

Declares array of integers

Calls declared array

Reads declared array and compares integer values stored with if statements to make swap

prints array

Exits

You might be interested in
Which certification can help enhance your job prospects in the role of a computer programmer?
natita [175]
There are a range of different certifications - common ones are <span>Microsoft Applications, Java Programming, Linux Professional, <span>CNC Programming ones. </span></span>
7 0
3 years ago
Read 2 more answers
The purpose of font formatting within a search log is to identify key words, important information, and______
Bad White [126]
I believe it would be the letter b, because you are searching for something particular and that provides you with assistance.
6 0
3 years ago
Read 2 more answers
Metamorphic rock can form from _____.
Alex Ar [27]
Sedimentary rock; under intense heat and pressure.
3 0
4 years ago
Read 2 more answers
_____ was the first search engine to use page ranking.​
Thepotemich [5.8K]
Yahoo! Was the first one
5 0
3 years ago
Monitors display images by using a grid made up of millions of tiny dots, called ________.
goldfiish [28.3K]

Answer:

Pixels

Explanation:

In computing the term pixels is actually a short for picture element. It refers to a single point (a dot) in an image. Computer monitors display images by dividing the screen into several pixels (dots) which are arranged in an x,y axis (rows and columns). The arrangement of the dots are so close to each other that they will appear as though the are connected.

It is important to note that on color monitors (which are by far the commonest), every pixel is made of three dots (red, blue and green) otherwise called the RBG all converging at same point.

8 0
3 years ago
Other questions:
  • What is the major problem with using pneumatics for robots, and how do we correct it?
    6·1 answer
  • For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
    14·1 answer
  • An instance of an object is (Points : 2) a block of COBOL code
    10·1 answer
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • What is an example of a use for an icon set?
    6·1 answer
  • If you are going to refer to a few dozen classes in your application, how do<br> you do it?
    6·1 answer
  • Question 1 of 30
    13·1 answer
  • Write a program that ask a user to input radius of a circle and display circumference of a circle
    13·1 answer
  • In cell J6, insert a formula using the OR function that returns TRUE if the rating (cell 16) equals "A" or the email reminder (c
    5·1 answer
  • Please i need your help
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!