Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MIPS Assembly fillin the blanks and answer questions at bottome. Thank Starting from the element i in A, read m elements at position i and

MIPS Assembly fillin the blanks and answer questions at bottome. Thank image text in transcribed
image text in transcribed
Starting from the element i in A, read m elements at position i and below, and write them to array Bstarting from the position k and up. Fill in the blanks. , data A: . word 101112131415161718192021222324 i: word 7 B:.word 404550556065 k:.word 1 mi.word5 \# how manyf: word 15 \#size of A g:. word 6 \#size of B .text globl main main: \# load registers for array A \# load registers for array B la $s1,B \#load address of B Iy. $s3,k \#load word k into s3 \#how many to overwrite Iw $s4,m \#load word g (how many) into s4 \# initialize registers to get \#what is the A index to stop? Let's put it into 55 \#Loop through A and B Loop: # use sit to compare $s5 and $s2, place the result in beq \$to, \$zero, end \# load A[i] and store into B[k]l,$t0,O($s6) sw $to, 0($s7) Hupdate of the indices addi $s3,$s3, addi $s2,$s2, \#update the address addi $s7,$s7, addi $s6,$s6, j Loop end: gri \$vo, \$zero, 10 \#exit syscall What would have happened if m=6? What would have happened if m=10 ? What kind of tests should be performed in the loop m=6 and m=10

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions