Can this project be done in 5 hours?
© 2021 Robin Pottathuparambil Page 1 of 2
Programming Assignment #3
CSCE 2610 – Assembly Language and Computer Organization
Spring 2021
100 Points
Due: 03/18/2021, 11:55 PM
Instructions: Compile and simulate the assembly program (.S file) using DS-5 simulator
and make sure it’s working. Comment your assembly code. Create an assignment folder
with folder name as euid_PA3 (example: xyz0202_PA3) and add all the source files (.S
file) and the readme file to the folder. Please create a zip archive of your assignment
folder and upload the zip file to Canvas. Not following the above instructions could
result in not accepting your work. Late submissions are not allowed.
1. Write an ARMv8 assembly program to generate the Tribonacci series and compute
the sum of the generated Tribonacci series. Assume the user input n is the number of
terms of the series which is a 64-bit non-zero positive integer stored in X20. Compute
the sum of the generated Tribonacci series and store the sum in X21. For example, a
Tribonacci series with 7 terms (0, 1, 1, 2, 4, 7, 13) has a sum of 28. The first three
terms (0, 1, and 1) are considered as default terms. Do not use recursion. Assemble,
test, and simulate the assembly code using DS-5 simulator. Do not upload the entire
DS-5 project. Only upload the assembly file (.S file) from the DS-5 project to Canvas.
Comment your assembly code. (30 Points)
2. Write an ARMv8 assembly program to compute the sum of squares of first n even
natural numbers and store the sum. Write an ARMv8 assembly function to compute
𝑥𝑥𝑦𝑦 and use the function to compute the sum of squares of first n even natural numbers.
The input n is in X20 and is 64-bit, non-zero positive integer less than 1001. Store the
sum in X21. Assume all the registers are used by the caller function to store some
data before calling the function. Do not use the divide instruction. Assemble, test, and
simulate the assembly code using DS-5 simulator. Do not upload the entire DS-5
project. Only upload the assembly file (.S file) from the DS-5 project to Canvas.
Comment your assembly code. (35 Points)
3. Write an ARMv8 assembly function to compute the sum of first n odd natural numbers
using recursion. The input n is in X1 and is 64-bit, non-zero positive integer less than
1001. Store the sum in X0. Assemble, test, and simulate the assembly code using DS-
5 simulator. Do not upload the entire DS-5 project. Only upload the assembly file (.S
file) from the DS-5 project to Canvas. Comment your assembly code. (35 Points)
© 2021 Robin Pottathuparambil Page 2 of 2
An example assembly code (func_code.S) is posted on canvas that shows how to create
a function and call the function.
Deliverables:
1. Commented assembly code for question 1, 2, and 3
2. A readme file that describes how to compile, execute, and test the assembly code.