Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Language Programming 7. (10 pt) The C code on the left is coded in MIPS on the right. Fill in the branch condition in

Assembly Language Programming
image text in transcribed
7. (10 pt) The C code on the left is coded in MIPS on the right. Fill in the branch condition in b and write the MIP instruction for ptr>next-head; # Sao has ptr, Sal has head lw St0, (Sa0) lw Stl, (Sal) truct node ( int c struct node "next;) void prob3(struct node "ptr, struct node "head)t Sto,st 1, Li if (ptr->c head->c)l ptr->next -head; head ptr Sal, Sa0, $0 or (10 pt) The table on the right is declared in the data segment of a MIPS program. Consider an instruction 'jalr,' which is identical to 'jal Ss2 (namely, the target address is in Ss2) except that the return address is saved in Sv1 instead of returns it from the function. The return value in $s0 is an integer between l and 6 0 8. Sra. Assume that either FUNO or FUN1 updates $s0 and r FUNO 01 01 01 01 01 01 FUN1 la $s1, 00 li $s0,1 00: word word rept: lw $s2, (Ss1) jalr $v1, $s2 word sll $0, $s0, 2 add $s1, $$1, $s0 lw $$1, (Ss1) ai: word b rept word Q0 Q0 FUNO: word word FUN1: a. When 'b rept instruction completes its execution for the first time, what values will be in Ss1 and Ss2? Ss1: Ss2:_ b. When 'b rept' instruction completes execution for the 2nd time, what values will be in Ss1 and Ss2? Ss

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

Why has the progress of the WTO been slow?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago