Lab03 - Introduction to RISC-V Assembly Programming¶
Code due Tue Sep 9th by 11:59pm in your Lab03 GitHub repo¶
Links¶
Tests: https://github.com/USF-CS315-F25/tests
Autograder: https://github.com/phpeterson-usf/autograder
Requirements¶
- You will develop RISC-V assembly language implementations of the following arithmetic problems. You will be given the C implementations, you need to write the RISC-V implementations.
- Your executable must be compiled with a Makefile
- Before you add files to your repo, do a
$ make cleanso you don't add/commit build products like executables or .o files - We will test the labs using autograder
quadratic: Runs the quadratic equation (ax^2 + bx + c) on the 32-bit integers x, a, b, c and returns the result. Example:
$ ./quadratic 4 3 2 1
C: 57
Asm: 57
min: Calculates the smaller of two 32-bit integers and returns its value. Example:
$ ./min 2 3
C: 2
Asm: 2
sum_array Sums the integer values in an array.
$ ./sumarr 1 2 3 4 5
C: 15
Asm: 15
find_max finds the largest value in an array
$ ./find_max 1 2 99 3 4
C: 99
Asm: 99
Given¶
The Lab03 GitHub repo will contain starter code including a Makefile, the C versions of the functions above, and empty .s files for you to fill in.
Rubric¶
- Your lab will receive the score indicated by the autograder
- To get the test cases,
git pullin the tests repo