Question: Write a 64-bit x86-64 assembly language program that given a collection of N numbers will find the smallest value, the frequency of the smallest value

Write a 64-bit x86-64 assembly language program that given a collection of N numbers will find the smallest value, the frequency of the smallest value (i.e., the number of times the smallest value appears in the collection), and the average of the negative numbers in the collection.(intel processors)

  1. Get the value of N from the user.
  2. If N
  3. Read the values as entered from the user. (If N =5, then there are 5 values the user is going to enter).
  4. Find the smallest, the frequency of the smallest value, and the average the negative numbers in the collection.

  1. Write a 64-bit x86-64 assembly language program that given a collection of

Hint: To find the smallest value, read the first value before the loop then assume that this first value entered by the user is the smallest value and its frequency is 1. Within the loop compare the assumed smallest value with other values read inside the loop and change the smallest value and frequency accordingly. Note: Your solution must not use arrays and data files. Sample program runs: Enter the number of values to consider: Enter a value: 3 Enter a value: 5 Enter a value: 7 Enter a value: 3 Enter a value: 12 Enter a value: 4 The smallest valueis 3 The frequency of the smallest value is 2 No negative values entered Enter the number of values to consider: 5 Enter a value: -2 Enter a value: 6 Enter a value: 3 Enter a value:-3 Enter a value: 3 The smallest value is -3 The frequency of the smallest value is 3 The average of negative values is -2.75 Enter the number of values to consider: 8 Error Invalid input. Hint: To find the smallest value, read the first value before the loop then assume that this first value entered by the user is the smallest value and its frequency is 1. Within the loop compare the assumed smallest value with other values read inside the loop and change the smallest value and frequency accordingly. Note: Your solution must not use arrays and data files. Sample program runs: Enter the number of values to consider: Enter a value: 3 Enter a value: 5 Enter a value: 7 Enter a value: 3 Enter a value: 12 Enter a value: 4 The smallest valueis 3 The frequency of the smallest value is 2 No negative values entered Enter the number of values to consider: 5 Enter a value: -2 Enter a value: 6 Enter a value: 3 Enter a value:-3 Enter a value: 3 The smallest value is -3 The frequency of the smallest value is 3 The average of negative values is -2.75 Enter the number of values to consider: 8 Error Invalid input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!