Question
For Assembly language? Make an x86 program that inputs a value N, which is the number of terms in the summation, and outputs the sum,
For Assembly language?
Make an x86 program that inputs a value N, which is the number of terms in the summation, and outputs the sum, the runtime, and some intermediate values as shown in the sample execution below. Make a driver program that calls the assembly program. As usual the driver is not part of the solution. The driver doesnt know the actions of the called program.
It should execute the following(example):
Welcome to fast number crunching by programmer.
This is a very fast platform running a AMD Verizon at 3.2GHz.
Please enter the number of terms to be included in the harmonic sum: 40
The clock is now 42654985129 tics and the computation will begin immediately.
With 4 terms the sum is 2.0833333333
With 8 terms the sum is 2.7178571429
With 12 terms the sum is 3.1032106782
With 16 terms the sum is 3.3807289932
With 20 terms the sum is 3.5977396571
With 24 terms the sum is 3.7759581778
With 28 terms the sum is 3.9271710390
With 32 terms the sum is 4.0584951954
With 36 terms the sum is 4.1745591968
With 40 terms the sum is 4.2785430389
Final sum is 4.2785430389
The clock is now 58754103487 and the computation is complete.
The elapsed time was 16099118358 tics.
At 3.2GHZ that is 5.030974487 seconds.
This assembly program will now return the harmonic sum to the driver program.
The driver has received the number 4.2785430389.
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