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 3 and 6) 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 10000 and 99999, each course code
must be formed of four letters and four digits (e.g. COMP3501) and each course score must be an integer between
0 and 100. 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
90<= Score A
80<= Score <90 B
70<= Score <80 C
60<= Score <70 D
Score <60 F
Your program must define and use the following procedures:
Procedure Read_Input: 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 Check_Int
(which checks if a value is out of range) and procedure Check_CourseCode (which checks if a value is not
formatted correctly).
Procedure Check_Int: 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 1. Otherwise, it displays the error message Error, value out of range. Try
again! and returns in BL the value 0.
Procedure Check_CourseCode: 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 4 characters and 4 digits, this
procedure returns in BL the value 1. Otherwise, it displays the error message Error, course code is not
correct. Try again! and returns in BL the value 0.
Procedure Find_Grade: This procedure takes as input parameter in EAX a course score and returns in EDX
the offset of one of the following strings A,B,C,D, or F, based on the range of the given exam
score according to the above table.
Procedure Print_Transcript: 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
Find_Grade defined below.
Submission
Submit your program on Moodle. Use HW3XXX.asm as file name, where XXX is your student ID.
Grading Table:
Grading Item Points
Style (naming=1, comments=1, spacing=1, indentation=1, and correct naming of submission file=1)5
Procedure Main with correct call sequences =1 and program title >>>>>> Student Transcript
<<<<<<<=1
2
Procedure Read_Input (use of message variables=1, correct loop + display of messages=2, read
integers from EAX into variables =2)
5
Procedure Check_Int (correct input in EAX and EBX=2, correct BL output =1, display error
message=1)
4
Procedure Check_CourseCode (correct input in EAX and EBX=2, correct BL output =1, display
error message=1)
4
Procedure Find_Grade (correct grading calculation =2)2
Procedure Print_Transcript (correct input in EAX and EBX =1, correct loop =2, correct if else
logic=2, correct execution output=3)
8
Total 30
Sample Run:
>>>>>> Student Transcript <<<<<<<
Enter the number of Courses (between 3 and 6): 2
Error, value out of range. Try again!
Enter the number of Courses (between 3 and 6): 7
Error, value out of range. Try again!
Enter the number of Courses (between 3 and 6): 3
Enter the student ID (between 10000 and 99999): 9999
Error, value out of range. Try again!
Enter the student ID (between 10000 and 99999): 100000
Error, value out of range. Try again!
Enter the student ID (between 10000 and 99999): 10000
Enter a course code (4 letters and 4 digits): cmp1111
Error, course code is not correct. Try again!
Enter a course code (4 letters and 4 digits): comp11111
Error, course code is not correct. Try again!
Enter a course code (4 letters and 4 digits): comp1111
Enter the student score (between 0 and 100): -1
Error, value out of range. Try again!
Enter the student score (between 0 and 100): 101
Error, value out of range. Try again!
Enter the student score (between 0 and 100): 55
Enter a course code (4 letters and 4 digits): comp1112
Enter the student score (between 0 and 100): 87
Enter a course code (4 letters and 4 digits): comp1113
Enter the student score (between 0 use x86 processor massam .code
main PROC
mov ecx,2
mov

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 Accounting Questions!