Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an assembly code to calculate and print the result of an expression entered by user. Here are the details of your code: 1- You

Write an assembly code to calculate and print the result of an expression entered by user. Here are the details of your code: 1- You should use the emulator emu8086. 2- Your code should ask the user to input an arithmetic expression, then the code will print the result on the screen. 3- Your code allow the following operations ONLY: Addition (+) Subtraction (-) Multiplication (*) Division (/) Mod (%) Factorial (!) 4- Your 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. 8- This assignment will be done in groups; two students for each group. 9- The deadline for this assignment will be on Wednesday (6-1-2021) at 11:59 PM. You should submit your code on the eLearning before the deadline.

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 Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

2. How can competencies be used in employee development?

Answered: 1 week ago