Question: Please answer in assembly code (not mips) thanks! Write a program that can evaluate ONE mathematical expression. The mathematical expression could be addition, subtraction, multiplication

Please answer in assembly code (not mips) thanks! Please answer in assembly code (not mips) thanks! Write a program

Write a program that can evaluate ONE mathematical expression. The mathematical expression could be addition, subtraction, multiplication or division. The input is just 1 line. The output is the result of that line. Look below for examples: for the input: 1 + 1 The program should output 2 for input 2*2 the program should output 4 for input 4/2 the program should output 2 For invalid operators, you should display "Invalid Operator" message. So for this input: 5$ 6 Invalid Operator ASSUMPTIONS YOU MUST FOLLOW: . When applying division, only division that results in NO REMAINDER will be used. So do NOT worry about remainder. For example, I'll test your code with 5/1 or 6/2 or 8/2 Output is ALWAYS 9 or less. I will NOT test your code with any numbers that result in a number higher than 9 . Always read numbers in 2 bytes. with multiplication, I will only test small numbers where the result is 9 or less. So I will only multiply 2*2 or at most 4*2. I will NOT test multiplication where the result is more than 9 Write a program that can evaluate ONE mathematical expression. The mathematical expression could be addition, subtraction, multiplication or division. The input is just 1 line. The output is the result of that line. Look below for examples: for the input: 1 + 1 The program should output 2 for input 2*2 the program should output 4 for input 4/2 the program should output 2 For invalid operators, you should display "Invalid Operator" message. So for this input: 5$ 6 Invalid Operator ASSUMPTIONS YOU MUST FOLLOW: . When applying division, only division that results in NO REMAINDER will be used. So do NOT worry about remainder. For example, I'll test your code with 5/1 or 6/2 or 8/2 Output is ALWAYS 9 or less. I will NOT test your code with any numbers that result in a number higher than 9 . Always read numbers in 2 bytes. with multiplication, I will only test small numbers where the result is 9 or less. So I will only multiply 2*2 or at most 4*2. I will NOT test multiplication where the result is more than 9

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!