Sale!

# Computing Machinery I Assignment 5

\$30.00

Category:

Computing Machinery I
Assignment 5
Objective
The objective of this assignment is to write modular code in ARMv8 assembly, utilizing subroutines and
value and reference parameters.
New Skills needed for this assignment
• Ability to use subroutines
• Ability to use parameters (passed by value and by reference)
• Ability to use command line arguments in assembly
• Ability to write and read files in assembly
Overview
Re-write Assignment 1 in ARMv8 assembly. For your convenience, we will reproduce the assignment
details below.
Details
Display to the user an N×N table of random digits (positive integer between 0 and 9). N is chosen by the
user using a command-line argument, such as:
./tableSort.o 5
and does not exceed 10.
The displayed table may look like:
0 5 7 8 3
9 3 5 7 2
3 5 3 7 8
2 2 5 7 9
0 9 0 3 4
The user then chooses a column to sort the table by:
Enter a column number: 0
The program sorts the matrix by the values in column 1 and then displays them:
Table sorted by column 0:
0 5 7 8 3
0 9 0 3 4
2 2 5 7 9
3 5 3 7 8
9 3 5 7 2
Use any sorting algorithm. The user can quit the program or choose another column to sort by. A log file
must be created showing: the initial table, which columns the user chose, and the end result before exiting
the program.
You do not need to worry about ties: these can be sorted in any order.
Modularity
Your code must divided into functions as appropriate. At a minimum, you must define the following
functions (we are not showing all necessary arguments):
– initialize(*table)
– randomNum(n,m); n and m are the lower and upper bounds for the random number. You
can use the C library function rand().
– display(*table)
– sort(*table)
– logFile(*table)
Submission
• Note: The TA may provide further submission instructions
• Create a script file and call it assign5.script
• Name your log file assign5.log
• Submit a README file providing extra instructions or information for your TA, such as the
sorting algorithm you are using
• Submit your work to the appropriate dropbox on D2L.
Late Submission Policy
Late submissions will be penalized as follows:
-12.5% for each late day or portion of a day for the first two days
-25% for each additional day or portion of a day after the first two days
Hence, no submissions will be accepted after 5 days (including weekend days) of the announced deadline.
This assignment is to be done by individual students: your final submission must be your own original
work. Teamwork is not allowed. Any similarities between submissions will be further investigated for
academic misconduct. While you are encouraged to discuss the assignment with your colleagues, this must
be limited to conceptual and design decisions. Code sharing by any means is prohibited, including looking
at someone else’s paper or screen. The submission of compiler generated assembly code is absolutely
prohibited. Any re-used code of excess of 5 lines in C and 10 lines in assembly (10 assembly language
instructions) must be cited and have its source acknowledged. Failure to credit the source will also result in
a misconduct investigation.
D2L Marks
Marks posted on D2L are subject to change (up or down).
Computing Machinery I
Assignment 5 Rubric
Student:__________________________________________
Item Max Points Points
Code compiles 5
Code runs 5
Sorting 20
Log file functionality 10
User interface (input validation, implementing all features) 15
Random numbers 10
Modularity 15
Command-line arguments 5
Passing array parameters by reference 5