Question: Convert the given C++ code into MIPS assembly. sumarr: .word 1 .word 3 .word 44 .word 66 .word 88 .word 90 .word 9 .word 232

Convert the given C++ code into MIPS assembly.

sumarr: .word 1 .word 3 .word 44 .word 66 .word 88 .word 90 .word 9 .word 232 .word 4325 .word 2321

.text

# sum --> $s0 # address of sumarr --> $s1 # i --> $t0

Convert:

Main:

{

int sum=0;

int size = 10; int sumarr[] = {1,3,44,66,88,90,9,232,4325,2321}; for(int i = 0; i < size; i++){

sum = sum + sumarr[i];

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!