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
7. Suppose that a RISC machine uses 5 register windows. a. How deep can the procedure calls go before registers must be saved in
Semenov [28]

Answer:

bbbbbbbbbbbbnbbnnnnnnnnnnnnnnnnn

6 0
2 years ago
What is the size of the key space if all 8 characters are randomly chosen 8-bit ascii characters?
Slav-nsk [51]
21...............................
4 0
3 years ago
Optimal page replacement ______.A. is the page-replacement algorithm most often implementedB. is used mostly for comparison with
deff fn [24]

Answer:

A. Is the page-replacement algorithm most often implemented.

Explanation:

This algorithm is used when a page that is not present in memory is called, leading to the Operating System to replace one of the existing pages with the needed one. There are different replacing algorithms in order to decide which page will be replaced.

This algorithm is implemented to reduce the number of failures and provide a better funcionality and speed the process by discarding pages that won't be used for a long period of time.

8 0
3 years ago
What must be true before a motherboard can take advantage of the triple memory channels on the board?
sergeinik [125]

Answer:

The motherboard must be configured to accept a particular type of memory.

Explanation:

The motherboard must be configured to accept a particular type of memory, especially when dealing with multi-channel memory. On motherboard, different modes can be configured to run simultaneously . For motherboard to take advantage of  the triple memory channels on the board. You can also check the manual that came with the motherboard to know how to configure it.

7 0
3 years ago
Which type of network cover a large geographical area and usually consists of several smaller networks, which might use differen
nlexa [21]

Answer: WIDE AREA NETWORK (WAN)

Explanation: hopes this helps

7 0
3 years ago
Other questions:
  • Which routine is configured to be called by another routine?
    10·1 answer
  • How do ethics affect people?
    15·1 answer
  • Select the statements that are true regarding the future of technology. Select 2 options.
    10·2 answers
  • Analytical CRM systems are the input for operational CRM systems.<br><br> True<br><br> False
    11·1 answer
  • Olivia is trying to save for a new laptop computer. To help her save, she should start a _____. database financial statement per
    7·2 answers
  • An application programming interface (API) is ________. Select one: A. the code to interface between an application and RAM B. t
    15·1 answer
  • Any fact or set of facts, such as the words in a letter to a friend or the notes in a song, can become computer ____.
    7·1 answer
  • Pls help me<br> first one to answer correctly gets brainly points
    6·2 answers
  • Could someone please help?​
    10·1 answer
  • Which network device sends data to every device that is connected to it?.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!