PROGRAM 10: Grade Converter! For this program, I would like you to create a function which returns a character value based on a floating point value as shown below: Percentage Letter Grade 90.0-100.0 A 80.0-89.99 B 70.0-79.99 C 60.0-69.99 D <= 59.99 F Write an HLA Assembly language program that implements the following function: procedure grader( percentage : real32 ); @nodisplay; @noframe; Your function should return in AL the converted character value, as shown in the chart above.  (Hint: Since the run-stack doesn't allow for a byte-sized argument to be pushed and popped, you will need to envelope the argument in a larger eight bit argument.  The converted letter should be stored into AL) (Another Hint: Please review the Sample Programs in Floating Point unit to see how to compare floating point values.  You need to use the floating point instruction fcomp as shown on the second example program.) Feed Me: 94.5 that's the grade: A Feed Me: 78.3 that's the grade: C

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false: a. To use a predefined function in a program, you...
icon
Related questions
Question

PROGRAM 10: Grade Converter!

For this program, I would like you to create a function which returns a character value based on a floating point value as shown below:

Percentage Letter Grade
90.0-100.0 A
80.0-89.99 B
70.0-79.99 C
60.0-69.99 D
<= 59.99 F


Write an HLA Assembly language program that implements the following function:

procedure grader( percentage : real32 ); @nodisplay; @noframe;

Your function should return in AL the converted character value, as shown in the chart above. 

(Hint: Since the run-stack doesn't allow for a byte-sized argument to be pushed and popped, you will need to envelope the argument in a larger eight bit argument.  The converted letter should be stored into AL)
(Another Hint: Please review the Sample Programs in Floating Point unit to see how to compare floating point values.  You need to use the floating point instruction fcomp as shown on the second example program.)

Feed Me: 94.5
that's the grade: A

Feed Me: 78.3
that's the grade: C

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
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