Question: Task 2 : The Maximum of an Array The second task is to write ( in Assembly x 8 6 - 6 4 ) the

Task 2: The Maximum of an Array
The second task is to write (in Assembly x86-64) the function:
unsigned long array_max(unsigned long n, unsigned long *items)
This function will return the maximum value of an array of long integers >=0. The first argument provided is the number of elements, the second argument is the address of the first element.
You do not need to write a C version of this function, but we recommend doing so.
We have provided the driver program in array-max-main.c, which processes the command line arguments and calls the array_max function. The Makefile will compile both array-max-main.c and your implementation of the array_max function to produce the executable array-max. Once compiled, the interactions with array-max should look as follows:
$ ./array-max 12
2
$ ./array-max 421
42
$ ./array-max 3158248201
20
Your program must compile without any modification to the provided array-max-main.c file, using the provided Makefile. The command make array-max will combine array-max-main.c (provided by us) and array-max.s (written by you) into the executable array-max.
Task 2 : The Maximum of an Array The second task

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