Question: I need help with this MIPS problem, Im using the MARS Simulator. 1. Design a calculator in MIPS. User input two integers and operators and
1. Design a calculator in MIPS. User input two integers and operators and code will calculate the result. Operations are addition, subtraction, multiplication, and division. You need to write separate functions for each operation. Operators will be inputted by user as +, -, , / symbols. Hint: Define each operator in the data segment and compare the user operator with the defined operator and branch to that function. data Add: .asciiz+ Sub: .asciz Mul: .asciiz.*" Div: .asciiz Sample executions: Integer 1: 45 Operator: + Integer 2: 25 Result = 70 Integer 1: 5 Operator: Integer 2: 10 Result = 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
