Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago