This assignment gives practice writing x86_64 assembly code that:
- uses a system call to dynamically allocate memory
- represents data as an array of pointers
- traverses an array of pointers to solve a problem
In completing this assignment you MAY use/access the following resources:
You may NOT use/access:
- Resources not expressly listed above, including, but not limited to,
the following ...
- Source code not provided as part of this assignment. (Obviously, this
includes, but is not limited to, source code written by other students
whether current or in the past).
- Code-generating tools (of which ChatGPT is one of many examples).
- Any web sites not directly linked to from the homework assignment.
Failure to abide by these guidelines will result in a zero for the assignment
and the incident will be reported to the university provost as a violation of
the university academic integrity policy. A second incident of academic
dishonesty (whether from this course or another computer science course) will
result in an F in the course.
The SWOPSC has expressed gratitude for your hard work in writing an assembly
language program to find the heaviest and tallest wrestler. Imagine their
dismay, however, to learn that the data was being reserved as a giant block
rather than having individual records allocated dynamically! They have requested
a rewrite of the code immediately to remedy this shortcoming. They have also
requested that you print the stats for the tallest and heaviest wrestlers rather
than simply printing the array index.
Continue your work from lab day as follow. Your array in this program will be
an array of addresses. For each line of the data file you will:
- reserve memory for your record (based on the the size of the record)
- store the address of the newly reserved record in the array
- store the data from the line into the newly reserved memory
After the array of pointers has been built you will (using a separate loop)
traverse the array as before to find the index of the tallest and heaviest
wrestlers. After you find the index of each wrestler, display the wrestler's
name, rank, height, and weight.
Commit progress as you go and push your completed code to your bitbucket
repository before the due date.
Your program will be graded according to the following criteria:
| Correctness/Completeness |
16 |
pts |
| Documentation |
2 |
pts |
| x86 Conventions |
2 |
pts |
| Total |
20 |
pts |
See the previous assignment for instructions on proper documentation and on
x86 assembly language conventions.