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
xz_007 [3.2K]
3 years ago
8

Given a high-level code you should be able to write the corresponding MIPS assembly code. Simple loop in C; A[ ] is an array of

ints do { g = g + A[i]; i = i + j; while (i != h) } Rewrite this as: Loop: g = g + A[i]; i = i + j; if (i != h) goto Loop; Using the mapping: g: $s1, h: $s2, i: $s3, j: $s4, base of A: $s5; write the corresponding assembly instructions
Computers and Technology
1 answer:
nevsk [136]3 years ago
4 0

Answer:

Explanation:

The code for the given problem is written below

.data

A : .word 1 2 3 4 5 6 7 8 9 10

.text

la $s5,A

li $s1,0 # load g

li $s2,10 # load h

li $s3,0 # load i

li $s4,1 # load j

loop:

mul $s6,$s3,4

add $s6,$s6,$s5 #address of A[i]

lw $s6,($s6) #get value of A[i] in s3

add $s1,$s1,$s6 #g = g+A[i]

add $s3,$s3,$s4 # i = i+j

bne $s3,$s2,loop #if i!=h jump to loop

You might be interested in
1. Name a two methods for creating text in Adobe Illustrator.
Fittoniya [83]

Answer:

Point type is a horizontal or vertical line of text that begins where you click and expands as you enter characters. Each line of text is independent—the line expands or shrinks as you edit it, but doesn’t wrap to the next line. Entering text this way is useful for adding a few words to your artwork.

Select the Type tool  or the Vertical Type tool .

The pointer changes to an I-beam within a dotted box. The small horizontal line near the bottom of the I-beam marks the position of the baseline, on which the text rests.

(Optional) Set text-formatting options in the Control panel, Character panel, or Paragraph panel.

Click where you want the line of text to begin.

Explanation:

4 0
3 years ago
Will creates an entry in his calendar and marks it as an all-day instance. Which item has he created?
Hatshy [7]

Answer:

The answer u looking for is event

5 0
3 years ago
Read 2 more answers
The secure evidence locker is located at the ____.
olga55 [171]
The data recovery lab

Data recovery can be done in special rooms called data recovery labs. Data that has been salvaged, lost, or inaccessible from removable media or secondary storage can be accessed in a normal way. Recovery of this kind may be required due to the physical damage caused.

 

 

 





5 0
3 years ago
What are three different reasons why people access networks? <br> Give an example of each reason
denpristay [2]

Communication: Communication is one way to be connected to the network and use the internet. It helps maintains communication with other network users. A few examples include email, IM services, video conferencing, Skype and many more.

File sharing: Easily sharing files and data. From businesses to schools to friends, everyone sends files to through internet and this has become an essential part of life. Various services like Gmail and yahoo mail are used.

Social networking: This is an essential medium to communicate with friends and family members. Examples include Facebook, Twitter, and Instagram.






3 0
4 years ago
What is the predecessor for the internet??
Gennadij [26K]
The predecessor for the Internet is ARPANET . ARPANET was developed under the direction of the U.S. Advanced Research Projects Agency (ARPA) and first published in 1967.It was <span>designed to facilitate communication between ARPA computer terminals .</span>This network was the first fully operational packet-switching network.
4 0
3 years ago
Other questions:
  • Write a program that reads a floating-point number from the user and prints "zero", "positive" or "negative"
    13·1 answer
  • Someone help ASAP! Match the type of information system with its description.
    13·2 answers
  • Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
    7·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • Which is the most portable memory media? Mention its features in detail.
    10·1 answer
  • What means the data is still saved even if you turn the computer off or unplug it?​
    5·1 answer
  • What is considered appropriate dress for men and women in the workplace? Select all that apply.
    6·2 answers
  • How to play Drinkopoly game?
    12·1 answer
  • Define the terms network, LAN, WAN, and Internet.
    11·1 answer
  • A program is required to three (3) numbers. calculate and print their total
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!