Solutions of the ACOS Workshops' problems by Oleg M.
//The first and second tasks are skipped as trivial, since they only required to become used to basics of RISC-V assembler
//Tasks have been done in order, presented on the DSBA ACOS course site
//Each task (from 3rd to 11th) are presented in this repository in .asm extension
//In case of any questions, remarks, additions, please contact me via telegram: @olegmaxus
//No special notes
//In the second task the array has been implemented using stack (.space directive), elements are stored in memory in reverse order
//In the third task exception for zero division was added
//In the last task case 0^0 gives 1 (python-like explicit definition)
//The first two tasks required me to translate C code into risc-v assembly code
//I have done it two ways: by hand (my own translation), and using risc-v toolchain through linux command line (shell):
acos@acos-vm:~/Desktop/acos_materaials$ riscv64-unknown-linux-gnu-gcc sample_name.c -S//The 'no_dups.s' task was quite hard to implement
//There may be a prettier implementation of fprint2.s, using bit shifts, that is less bit_print loops are used
// C-tasks are located in WS3_C subfolder
Part 1
// Note: original_[static/dynamic].sh are for Task 1 in Part 1, improved_[static/dynamic].sh are for Homework Task 2, where we have to improve original Task
// I have added bash files (.sh) with linux shell for simplicity
// In CMD_EXAMPLE.txt you may find the sequence of console commands, which will give access for .sh files to be executed
// Please, before executing my .sh files, make sure that all the bash files, as well as all function files (fred.c, etc.) are in same folder
// Please, reach me out in telegram in case, there are some issues with execution of the bash files, i provided
// P.S.: in order to provide access for a bash file to be executed one may use the following command:
acos@acos-vm:~/Desktop/acos_materaials/OSSP_WS4$ chmod u+x bash_name.sh
acos@acos-vm:~/Desktop/acos_materaials/OSSP_WS4$ ./bash_name.sh