Question: Write an Aarch 6 4 assembly language main function that tests several. The main function will perform the following tasks: a ) Prompt the user

Write an Aarch64 assembly language "main" function that tests several. The main function will perform the following tasks:
a) Prompt the user to enter their 9-digit ID number. The value of n is based on the ID number according to the following rule (System of Equations).
n=56 if ID# is even
n=53 if ID# is odd
b) You will need two arrays of size n('orig' and 'dup'). Your arrays of n4-byte integers must be allocated on the stack.
c) Call the init_array function to initialize your array orig.
d) Call the print_array function to print out the orig array.
e) Call the copy_array function to make a copy of your array dup-orig.
f) Call the insertion_sort function to sort your dup array.
g) Call the print_array function to print out your sorted dup array.
h) Call the compute_average function to compute the average of the dup array.
i) Print out the average to standard output.
All the above-mentioned arrays have already been created. The main function just needs to call them.
This function is part of a larger Aarch64 assembly language program called arrayproc.s. As such, it must have the appropriate "prologue" and "epilogue" statements to keep track of the call frame. Except for loop control variables, if the function uses local variables, they must be allocated on the stack.
Write an Aarch 6 4 assembly language "main"

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!