Computer Architectures projects (Fibonacci, Simple Calculator, Ackermann Function) implemented in ARMv8 assembly language.
Run Environment: DS-5 Workspace
Fibonacci Number:
TASK: Write LEGv8 assembly code for a function that returns nth Fibonacci number.
long int fib (long int n)
{
...
}
Example:
fib(1) and fib(2) should return 1
fib(3) should return 2
fib(4) should return 3
fib(5) should return 5
etc.
Extensive instructions for LEGv8 simulations can be found here:
https://bitbucket.org/HarryBroeders/legv8/wiki/Home
This is the working link for toolchain download: https://releases.linaro.org/components/toolchain/binaries/7.1-2017.08/aarch64-elf/gcc-linaro-7.1.1-2017.08-i686-mingw32_aarch64-elf.tar.xz
Simple Calculator:
TASK: For this project, you will write a small calculator. Your calculator will have the capability to do the following operations on 4-digit decimal numbers (result is bound to 4 digits):
-
multiply
-
add
-
subtract
-
factorial (Accept only 1-digit numbers for factorial as input. If more than 1 digit is entered, return an error).
-
an operation of your choice. (I choose integer division)
Your calculator.exe will continuously accept input, until you press the X button at any time.
Ackermann Function:
http://mathworld.wolfram.com/AckermannFunction.html