High Level Assembly (HLA)
PROGRAM 10: Angle Conversion
Believed to have originated in France, a gradian is a unit of measure of an angle that is equivalent to 1/400th of a turn or 9/10th of a degree. The formula for this conversion solving for Gradian is:
Gradian = 400 * turn or Gradian = 1.111 * degree
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper NowPrompt the user for a value and displays the Gradian value you calculate, if the original value was a degree or a turn. A sample program dialogue is shown below.
What’s your number: 10.0
Assuming you entered a turn amount, here’s your Gradian: 4000.000
Assuming you entered a degree amount, here’s your Gradian: 11.110
What’s your number: 15.12
Assuming you entered a turn amount, here’s your Gradian: 6048.000
Assuming you entered a degree amount, here’s your Gradian: 16.798
PROGRAM 11: Quadratic Equation
Write an HLA Assembly language program that factors an equation of the form ax2 + bx + c = 0 by using the quadratic equation. The formula you need to calculate is shown below:.
quadratic.jpg
Your program should prompt for the values a, b and c, each which are to be real32 values. A sample program dialogue is shown below.
(Note: Please assume that b2 – 4 a c (what is referred to as the “discriminant”) will always be positive so that you do not need to worry about any imaginary roots.)
Gimme a value for a: 1
Gimme a value for b: 3
Gimme a value for c: -4
The solutions are x = -4.000 and x = 1.000
Gimme a value for a: 2
Gimme a value for b: -4
Gimme a value for c: -3
The solutions are x = -0.580 and x = 2.580