Write an assembly language program that evaluates the polynomial: y = ax 3 -bx 2 + cx -d for x values between 5 and 10 in increments of 1. The program should allow the user to enter integer values for the coefficients a, b, c, and d (each between 1 and 10) from the keyboard, then displays the results in a table form as shown in the following example.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 21PE
icon
Related questions
icon
Concept explainers
Question

Write an assembly language program that evaluates the polynomial:
y = ax
3
-bx
2 + cx -d
for x values between 5 and 10 in increments of 1. The program should allow the user to enter integer values
for the coefficients a, b, c, and d (each between 1 and 10) from the keyboard, then displays the results in a
table form as shown in the following example. 

Write an assembly language program that evaluates the polynomial:
у — ах -bx? + сх -d
for x values between 5 and 10 in increments of 1. The program should allow the user to enter integer values
for the coefficients a, b, c, and d (each between 1 and 10) from the keyboard, then displays the results in a
table form as shown in the following example.
y
175
6.
325
7
541
8.
835
9.
1219
10
1705
Additional Requirements:
1. Include in your program error checking for the entered values for a, b, and c. Each of them must be
between 1 and 10. In case of an invalid value, your program should (repeatedly) display the following
error message: “Invalid value, it must be between 1 and 10. Try again." and then allow the user to
enter another value until a correct value is entered.
2. Use the multiplication instruction MUL for unsigned numbers and assume that the result of the
multiplication always fits in the EAX register only.
3. The input and output for your program must be in the format shown in the sample run on the next page.
Transcribed Image Text:Write an assembly language program that evaluates the polynomial: у — ах -bx? + сх -d for x values between 5 and 10 in increments of 1. The program should allow the user to enter integer values for the coefficients a, b, c, and d (each between 1 and 10) from the keyboard, then displays the results in a table form as shown in the following example. y 175 6. 325 7 541 8. 835 9. 1219 10 1705 Additional Requirements: 1. Include in your program error checking for the entered values for a, b, and c. Each of them must be between 1 and 10. In case of an invalid value, your program should (repeatedly) display the following error message: “Invalid value, it must be between 1 and 10. Try again." and then allow the user to enter another value until a correct value is entered. 2. Use the multiplication instruction MUL for unsigned numbers and assume that the result of the multiplication always fits in the EAX register only. 3. The input and output for your program must be in the format shown in the sample run on the next page.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage