Question: Assembly code is required to calculate and print the result of an expression entered by user. Here are the details of the code: 1- Code

Assembly code is required to calculate and print the result of an expression entered by user. Here are the details of the code:

1- Code should use the emulator emu8086.

2- Code should ask the user to input an arithmetic expression, then the code will print the result on the screen.

3- Code allow the following operations ONLY:

Addition (+)

Subtraction (-)

Multiplication (*)

Division (/)

Mod (%)

Factorial (!)

4- Code should contains 6 procedures (one procedure per operation). Here are the procedures that should be included in your code:

Addition: This function add two integer numbers.

Subtraction: This function subtract two integer numbers.

Multiplication: This function multiply two integer numbers.

Division: This function divide two integer numbers.

Mod: This function calculate the reminder of division operation between two integer numbers.

Factorial: This function calculate the factorial of a positive integer number. For example:

4! = 4*3*2*1= 24

5! = 5*4*3*2*1 = 120

5- Assume the range of numbers that entered by the user is (-127 - +127)

6- PAY ATTENTION: NOT allowed to use MUL, IMUL, DIV or IDIV instructions in your code.

7- If the user enter any operation or character other than the allowed operation, your code should print Error: The operation is not valid.

OUTPUT SHOULD BE LIKE THIS

Assembly code is required to calculate and print the result of an

The question is already answered by a chegg expert but its wrong...Plz provide the code(Solution) According to the instructions given above

Please Enter your expression: 10+5 The result of the 10+5 is 15 Please Enter your expression: 10-5 The result of the 10-5 is 5 Please Enter your expression: 10*5 The result of the 10*5 is 50 Please Enter your expression: 10/5 The result of the 10/5 is 2 Please Enter your expression: 10%5 The result of the 10%5 is 0 Please Enter your expression: 5! The result of the 5! is 120 Please Enter your expression: 10@5 Error: The operation is not valid

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!