Question: Problem 2 : ( 4 marks ) Write program in assembly language a ) If the register values and memory location values as follows, update

Problem 2: (4 marks) Write program in assembly language
a) If the register values and memory location values as follows, update their values after finishing executing the following MIPS (2 marks)
add $s4, $s2, $s1
Iw $s3,12($s1)
addi $s2, $s3,-12
sw $s2,-4($s4)
\table[[Register,Value,\table[[Last],[value]],Memory Location,Value,\table[[Last],[value]]],[S1,12,,12,16,],[S2,16,,16,20,],[S3,20,,20,24,],[S4,24,,24,26,]]
b) Assuming $s1=00004000 find the content of the destination registers in the following statements: (2 marks)
Iw $s2,0($s1),$s2=
addi $s3,$s2,34,$s3=
lh $s 4,4($s1),#$s4=
3(Please explain the steps )
 Problem 2: (4 marks) Write program in assembly language a) If

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!