Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Name: MIPS Programming Assignment 6 (Analyzing MIPS Assembly Code) 1. Given the following segment of MIPS2. Given the following segment of MIPS Assembly code. Before

image text in transcribed
Name: MIPS Programming Assignment 6 (Analyzing MIPS Assembly Code) 1. Given the following segment of MIPS2. Given the following segment of MIPS Assembly code. Before running the code. Sts-4, St 1=1, St2-2, and Sso-3. What are the values of St1, S12, and Ss0 after running the code? Assembly code. Before running the code, Sal 1 and Sa2-7 What are the values of Sal and Sa2 after running the code? while: bge Sal, Sa2, done bgez St8, else addi Ss0, $t8,-5 addi St1, St1, 2 b next addi Sal, Sal, 1 addi Sa2, Sa2,-1 b while else: move Ss0, St8 done: addi $t2, S12, 3 next: 3. Given the following MIPS Assembly program. What are the values of registers Stl and St2 after running the program? What is the value at memory location unitX after running the program? 4. Given the following MIPS Assembly program. What are the values of registers $13 and St4 after running the program? What is the value at memory location unitX after running the program? word 28 num: initA: word-20 30-40 50 0-60 80 unitX: word? initA: word-20 30-40 500-60 80 unitX: word? .text la St0, initA lw Stl, num(S0) add $12, StO, St li St3, 0 addi $12, $t2, -4 .text la StO, initA li Stl, 0 loop: lw S12,0(St0) beqz $12, done add St1, St1, S12 addi $t0, St0, 4 b loop loop: blt S12, StO, done lw St4, 0($12) add $t3, S13, $t4 addi $t2, $12,-4 b loop done: sw St1, unitX(S0) done: sw St3, unitX(SO)

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

Students also viewed these Databases questions

Question

Give the common names of the following compounds

Answered: 1 week ago