Question: Create an assembly language program (In x86 please) that will read in a set of student records. Each student record will consist of a name,

Create an assembly language program (In x86 please) that will read in a set of student records. Each student record will consist of a name, and an array of grades. Your p rogram will read in a name (Maximum length of 10 characters) and 6 grades (each a whole number from 0 to 100). The input will be on one line with the spaces used to separate the items on a line. The last grade will be followed by the enter key. Up to 20 records may be entered. The end of the data will be signaled b y the word END in upper case. Your program will average the grades for each student and display the student name, ave rage (as a floating point value /C++ double), and letter grade. The display is to be done in alphabetical order by name. The sort should be case insensitive, that is the fact a letter is upper or lower case will not matter in the comparison of names. The letter grade will be calculated as A (90 or higher), B (80 or greater but less than 90), C (70 or greater but less than 80), D (60 or high er but less than 70), or F (less than 60). #include

#include

using namespace std;

extern "C" double Average ( long [6]);

extern "C" char LetterGrade ( double );

extern "C" void Sort ( char [] [11], char [], double [], long );

void main ( ){

double Averages [20];

long Grades [6];

char LetterGrades [20];

char Names [20] [11];

string End ("END");

long i;

long NumStudents;

cout << "Please enter data as Name followed by six whole numbers" << endl;

cout << "End with an enter key as the only entry on a line" << endl;

for (NumStudents = 0; NumStudents < 20; NumStudents++){ cin >> Names [NumStudents];

if ( End == Names [NumStudents] ) break ;

else { for (i = 0; i < 6; i++) cin >> Grades [i];

cin.ignore (1, ' \ n');

Averages [NumStudents] = Average (Grades);

LetterGrades [NumStudents] = LetterGrade (Averages [NumStudents]);

}

}

Sort (Names, LetterG rades, Averages, NumStudents );

for (i = 0; i < NumStudents; i++)

cout << "Student " << '[' << i << "]= " << Names [i] << ' ' << Averages [i] << ' ' << LetterGrades [i] << endl;

}

Can you write the assembly language routines for Average, Sort, LetterGrade? Thank You!

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!