Exercise 1: If / Else Statement High-level code if (i == j) f = g + h; else f = f i; MIPS assembly code # $$0 = f, $s1 = g, $s2 = h # $$3 = i, $s4 = j %3D %3D

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 12PP
icon
Related questions
Topic Video
Question

Please write the Assembly code tests for the opposite case (i != j) for the submitted pictures.

Exercise 1: If / Else Statement
High-level code
if (i == j)
f = g + h;
%3D
else
f = f - i;
MIPS assembly code
# $s0 = f, $s1 = g, $s2 = h
# $$3 = i, $s4 = j
%3D
%3D
Transcribed Image Text:Exercise 1: If / Else Statement High-level code if (i == j) f = g + h; %3D else f = f - i; MIPS assembly code # $s0 = f, $s1 = g, $s2 = h # $$3 = i, $s4 = j %3D %3D
Exercise 1: If Statement
High-level code
if (i == j)
f = g + h;
f = f - i;
%D
%3D
MIPS assembly code
# $$0 = f, $s1 = g, $s2 = h
# $$3 = i, $s4 j
%3D
%3D
%3D
Assembly code tests for the opposite case (i != j)
Transcribed Image Text:Exercise 1: If Statement High-level code if (i == j) f = g + h; f = f - i; %D %3D MIPS assembly code # $$0 = f, $s1 = g, $s2 = h # $$3 = i, $s4 j %3D %3D %3D Assembly code tests for the opposite case (i != j)
Expert Solution
steps

Step by step

Solved in 6 steps with 2 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning