Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# test program .text main: ori $s7,$0,4097 # put a memory location in $s7 sll $s7,$s7,16 # ori $s0,$0,0x2 # put 2 into $s0 and

# test program .text main: ori $s7,$0,4097 # put a memory location in $s7 sll $s7,$s7,16 # ori $s0,$0,0x2 # put 2 into $s0 and $s0,$s0,$zero # clear $s0 ori $s0,$zero,0x2 # put 2 back into $s0 nor $s0,$s0, $zero # complement $s0 ori $s0,$zero,0x2 # put 2 back into $s0 ori $s1,$0,0x3 # put 3 into $s1 add $s2,$s0,$s1 # add beq $s2,$zero, exit sw $s2, 4($s7) # store the result to memory j exit ori $s0,$zero,0x2 # pretend like we might do nor $s0,$s0, $zero # other work after jump

# exit gracefully exit: addi $v0,$0,10 # load exit syscall # exit

## end of file

Write down what it does. What is the result and where is the result stored? Explain how it gets there.

Why are they using the ori instruction? Why a complement operation is used in this code?

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

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago