Question: Write an assembly language program that generates a transcript for a student. It should start by reading from the keyboard a number of courses N
Write an assembly language program that generates a transcript for a student. It should start by reading from the
keyboard a number of courses N between and and the student ID as well as the course codes and the scores
of that student in those N courses. The student ID must be an integer between and each course code
must be formed of four letters and four digits eg COMP and each course score must be an integer between
and The program must then display a list containing for each course: the course code, the course score and
the grade A B C D or F as shown in the sample run on the back page. The grade is determined according to
the following table:
Score Range Grade
Score A
Score B
Score C
Score D
Score F
Your program must define and use the following procedures:
Procedure ReadInput: This procedure reads the value of N courses, the ID of a student, and course codes
and scores of N courses. If the user enters an invalid out of range value for N an ID or a course score then
it displays the error message Error value out of range. Try again! and allows the user to enter the value
again and again until the entered value is valid. If the user enters an invalid value for a course code then it
displays the error message Error course code is not correct. Try again! and allows the user to enter the
value again and again until the entered value is valid. This procedure makes use of the procedure CheckInt
which checks if a value is out of range and procedure CheckCourseCode which checks if a value is not
formatted correctly
Procedure CheckInt: This procedure takes as input parameters an integer value in EAX, a minimum value
in EBX and a maximum value in ECX. If the value of EAX is between the values of EBX and ECX, this
procedure returns in BL the value Otherwise, it displays the error message Error value out of range. Try
again! and returns in BL the value
Procedure CheckCourseCode: This procedure takes as input parameters a string in buffer as entered from
keyboard and its length in byteCount. If the value of buffer starts with characters and digits, this
procedure returns in BL the value Otherwise, it displays the error message Error course code is not
correct. Try again! and returns in BL the value
Procedure FindGrade: This procedure takes as input parameter in EAX a course score and returns in EDX
the offset of one of the following strings ABCD or F based on the range of the given exam
score according to the above table.
Procedure PrintTranscript: Displays the transcript of student with an ID by listing the course codes,
scores and their grades in the format shown in the sample run on the back page. It makes use of the procedure
FindGrade defined below.
Submission
Submit your program on Moodle. Use HWXXXasm as file name, where XXX is your student ID
Grading Table:
Grading Item Points
Style naming comments spacing indentation and correct naming of submission file
Procedure Main with correct call sequences and program title Student Transcript
Procedure ReadInput use of message variables correct loop display of messages read
integers from EAX into variables
Procedure CheckInt correct input in EAX and EBX correct BL output display error
message
Procedure CheckCourseCode correct input in EAX and EBX correct BL output display
error message
Procedure FindGrade correct grading calculation
Procedure PrintTranscript correct input in EAX and EBX correct loop correct if else
logic correct execution output
Total
Sample Run:
Student Transcript
Enter the number of Courses between and :
Error, value out of range. Try again!
Enter the number of Courses between and :
Error, value out of range. Try again!
Enter the number of Courses between and :
Enter the student ID between and :
Error, value out of range. Try again!
Enter the student ID between and :
Error, value out of range. Try again!
Enter the student ID between and :
Enter a course code letters and digits: cmp
Error, course code is not correct. Try again!
Enter a course code letters and digits: comp
Error, course code is not correct. Try again!
Enter a course code letters and digits: comp
Enter the student score between and :
Error, value out of range. Try again!
Enter the student score between and :
Error, value out of range. Try again!
Enter the student score between and :
Enter a course code letters and digits: comp
Enter the student score between and :
Enter a course code letters and digits: comp
Enter the student score between use x processor massam code
main PROC
mov ecx,
mov
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
