Programming Homework Help

Programming Homework Help. Help with my current MASM code

I am struggling with the average part and do not know if what I have is right or how to go about it .I know I do not have any code to find Min or Max.

My code is available upon acceptance.

PROGRAM DESCRIPTION

Write and test a MASM program to perform the following tasks:

  1. Display the program title and programmer’s name.
  2. Get the user’s name, and greet the user.
  3. Display instructions for the user.
  4. Repeatedly prompt the user to enter a number.
    1. Validate the user input to be in [-200, -100] or [-50, -1] (inclusive).
    2. Notify the user of any invalid negative numbers (negative, but not in the ranges specified)
    3. Count and accumulate the valid user numbers until a non-negative number is entered. Detect this using the SIGN flag.
      (The non-negative number and any numbers not in the specified ranges are discarded.)
  5. Calculate the (rounded integer) average of the valid numbers and store in a variable.
  6. Display:
    1. the count of validated numbers entered
      NOTE: if no valid numbers were entered, display a special message and skip to (f)
    2. the sum of valid numbers
    3. the maximum (closest to 0) valid user value entered
    4. the minimum (farthest from 0) valid user value entered
    5. the average, rounded to the nearest integer
      1. -20.01 rounds to -20
      2. -20.5 rounds to -20
      3. -20.51 rounds to -21
      4. -20.99 rounds to -21
    6. a parting message (with the user’s name)

PROGRAM REQUIREMENTS

  1. The program must be fully documented and laid out according to the CS271 Style Guide. This includes a complete header block for identification, description, etc., and a comment outline to explain each section of code.
  2. The main procedure must be modularized into commented logical sections (procedures are not required this time)
  3. The four value limits must be defined as constants.
  4. The user input loop should terminate depending on the value of the SIGN flag.
  5. The Min, Max, Count, Sum, and Average must all be stored in named variables as they are calculated.

output should look like attachmentI am struggling with the average part and do not know if what I have is right or how to go about it .I know I do not have any code to find Min or Max.

My code is available upon acceptance.

PROGRAM DESCRIPTION

Write and test a MASM program to perform the following tasks:

  1. Display the program title and programmer’s name.
  2. Get the user’s name, and greet the user.
  3. Display instructions for the user.
  4. Repeatedly prompt the user to enter a number.
    1. Validate the user input to be in [-200, -100] or [-50, -1] (inclusive).
    2. Notify the user of any invalid negative numbers (negative, but not in the ranges specified)
    3. Count and accumulate the valid user numbers until a non-negative number is entered. Detect this using the SIGN flag.
      (The non-negative number and any numbers not in the specified ranges are discarded.)
  5. Calculate the (rounded integer) average of the valid numbers and store in a variable.
  6. Display:
    1. the count of validated numbers entered
      NOTE: if no valid numbers were entered, display a special message and skip to (f)
    2. the sum of valid numbers
    3. the maximum (closest to 0) valid user value entered
    4. the minimum (farthest from 0) valid user value entered
    5. the average, rounded to the nearest integer
      1. -20.01 rounds to -20
      2. -20.5 rounds to -20
      3. -20.51 rounds to -21
      4. -20.99 rounds to -21
    6. a parting message (with the user’s name)

PROGRAM REQUIREMENTS

  1. The program must be fully documented and laid out according to the CS271 Style Guide. This includes a complete header block for identification, description, etc., and a comment outline to explain each section of code.
  2. The main procedure must be modularized into commented logical sections (procedures are not required this time)
  3. The four value limits must be defined as constants.
  4. The user input loop should terminate depending on the value of the SIGN flag.
  5. The Min, Max, Count, Sum, and Average must all be stored in named variables as they are calculated.

output should look like attachment

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"