Question: The purpose of this assignment is to write a program in LC-3 assembly language to sort a list of exam scores, and report the range,

The purpose of this assignment is to write a program in LC-3 assembly language to sort a list of exam scores, and report the range, number of students and median.

The list of exam scores, integers between and including 0 and 100, along with corresponding unique non-zero student ID will be stored in memory starting at address x4003. The ID number and score of each student will be specified as follows:

Bits [15:8] student ID number

Bits [7:0] student score

The end of this list is specified using a student ID of zero, for which exam score could be anything, as sentinel.

After sorting, the exam scores in descending order along with corresponding student IDs must be stored in memory starting at location x4003 and, just as initial list, it needs to be terminated with null student ID. In addition to sorting the list, you are also asked to report the following:

Range as a concatenation of highest score in upper half (bits [15:8]) and lowest score in lower half (bits [7:0]) in location x4000.

Number of students as 16-bit integer in x4001.

Median1 as 16-bit integer in x4002.

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!