Question
Please write in assembly language Task 1: maxlength of array = 100 asks the user to enter how many grades they want. Then generate that
Please write in assembly language
Task 1:
maxlength of array = 100
asks the user to enter how many grades they want.
Then generate that number of random numbers between 50-100 and store in the array Grades.
Task 2:
Given information: Grades WORD maxlength DUP (0h)
This array will have necessary information in bits 0 through 7. That information must remain in the array. DO NOT overwrite it.
This procedure (calcGrade) will calculate a letter grade.
Receives: A WORD array offset in EBX. In bits 0 through 7 of each WORD will be a number. Use this number to determine a letter grade as follows
59 and below : F
60-69 : D
70-79 : C
80-89: B
90-100 : A
Return: The array modified so that the letter grade is in the bit 8-15 of the WORD array. You may NOT modify the array in any other way.
Task 3:
Given the following array: Grades WORD maxlength DUP (0h)
Receives the offset to an array in ebx. This array will have a numerical score in bits 0-7 and the associated letter grade in bits 8-15 of each element of the array.
Returns nothing.
This procedure will print a grade and its numerical value in the following format. Use GotoXY
(chapter 5) to create the 5 spaces between the integer and the letter grade. Be sure to account for the case where the score is 100.
SCORE Grade
93 (A)
87 (B)
53 (F)
Task 4
Once task 3 is complete and functioning, copy it to another procedure(gradesColor) and modify it so that it prints the grades in color. You must return the color scheme to the default prior to exiting the procedure.
All numbers will be the default color - LightGray on Black
Print letter grades ONLY using the following scheme.
Note:Only the letter grade shall be in color not the parentheses.
As and Bs in GREEN ON A BLACK BACKGROUND.
Cs in YELLOW ON A BLACK BACKGROUND
Ds in BLACK on a YELLOW BACKGROUND
Fs in RED on a LIGHT GRAY BACKGROUND
Task 5
Create a procedure that asks the user for a letter grade. Make sure to error check the user entry.
This letter grade will be passed to another procedure which will print each score in the array that corresponds to the letter grade entered by the user. For example, the user enters B. All grades 80-89 in the array should be printed in column form. Also inform the user, how many grades there are.
Example:
There are 5 As:
100
99
98
97
97
At the end of the procedure be sure the user has to press a key to continue
Task 6
Create a menu that will ask the user if they want to generate grades or quit.
Once grades have been generated, ask the user if they want to print all the grades or enter a grade.
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