Question
MASM Assembly Program ONLY using Irvine32.inc The program will use floating point instructions to compute the root solutions to the quadratic formula. The program must
MASM Assembly Program ONLY using Irvine32.inc
The program will use floating point instructions to compute the root solutions to the quadratic formula.
The program must repeat the calculation 1 million times calculating the time required to solve the formula.
The program should measure performance (Duration) of the program using the FPU instructions.
MAIN
1) Prompt for the coefficients ax^2 +bx +c.
2) Establish loop (ecx register =1000000)
3) Calculate start time (t1)
a) INVOKE GetTickCount
b) mov t1, eax
4) Using FPU instructions calculate
a) b + Sqrt(b^2 -4*a*c)/2*a
b) b - Sqrt(b^2 -4*a*c)/2*a
5) Repeat step4 until ecx==0
6) Calculate start time (t2)
a) INVOKE GetTickCount
b) mov t2, eax
7) Display the roots
8) Display the running time
Example Output:
Pat Programmer's Quadratic Formula Solver
Solve x^2-3x-4 with quadratic Formula using FPU
Enter a coefficient
1
Enter b coefficient
-3
Enter c coefficient
-4
Real Roots:
+4.0000000E+000
-1.0000000E+000
Computational time: +15
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started