Assignment Description: Develop and test an Intel 8086 assembly program that reads two decimal numbers x and...

80.2K

Verified Solution

Question

Electrical Engineering

Assignment Description:
Develop and test an Intel 8086 assembly program that reads twodecimal numbers x and y. Your program
should display the result of their:
1) Addition: x+y
2) Subtraction: x-y
3) Multiplication: x*y
4) Division: x / y
Notes:
 x and y are two-digit decimal numbers (i.e. 0-99).
 The program should display an error message if the value of y iszero, in the case of division.
 You can assume only positive numbers but you will get a bonus ifyour program can read and handle
negative numbers.
 You will get higher mark if your program accepts only two decimaldigits (0-9) for each number and
print error message when the user tries to enter non-decimal digits(e.g. A-Z, or a-z, or any special
character).
Your program output should be similar to the followingexamples:
Example1: (x>y)
Please enter two 2-digit decimal
number:
X= 48
Y= 26
X + Y = 74
X – Y = 22
X * Y = 1248
X /Y = 1 with Remainder 22
Example2: (xPlease enter two 2-digit decimal
number:
X= 12
Y= 37
X + Y = 49
X – Y = -25
X * Y = 444
X /Y = 0 with Remainder 12
Example3: (y=0)
Please enter two 2-digit decimal
number:
X= 56
Y= 00
X + Y = 56
X – Y = 56
X * Y = 00
X /Y = error overflow

Answer & Explanation Solved by verified expert
4.4 Ratings (672 Votes)
Hey Hope youre having a great day If this helps please dont forget to leave a thumbs up The following code uses the Irvine32 library so make sure its installed in your system TITLE MASM Template mainasm INCLUDE Irvine32inc data Please choose either of the following operations 13100 szMenu db Now what do you want to do with    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students