al_homework repository.
You may NOT use/access:
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.
array_int.asm and array_str.asm.
The programs will read data from provided input files named
numbers.txt
and names.txt,
respectively, store the data into arrays, and then traverse the arrays.
Begin by pulling the most recent version of the homework repository and do your work in the hw05 directory. The required input files are found in the data directory of the repository. Also recall that you can find sample code that uses the I/O macros to read from a data file (in the demos directory of the repository).
You may assume that the file contains no more than 10,000 numbers and that the numbers are signed and will fit in a range appropriate for 32-bit signed values. The input file will have exactly one integer value per line. The numbers may be positive or negative (and the average can therefore be negative ... take a look at the commands cdq, cwd, cbw).
NOTE: I am fully aware that the program can be written more efficiently without storing the values into the array. However, the point of the assignment is for you to practice using arrays in a simple environment.
The fget_str IO macro returns the length of the read string in EAX.
You can either store the lengths in a parallel array as you read in the
names or you can recalculate the string lengths in the following loop.
To determine the length of the string move one character at a time
through the string counting as you go, stopping when to reach the zero byte.
You may assume that the file contains no more than 10,000 names and that no name will be longer than 26 characters. The input file will have exactly one name per line. There is no need to try to separate first and last name in this assignment.