/risc-v-exercises-2020

some exercises written in Assembly RISC-V @ Sapienza 2020

Primary LanguageAssembly

risc-v-exercises-2020

This repo contains some exercises written in Assembly RISC-V language.

I'm publishing them for archiving purpose and for your pure entertainment since there are not so many examples available about RISC-V (there are a lot of exercises on MIPS but not on RISC-V unfortunately).

Though I wrote every program in my native languagem and personally I don't mantain the sources, feel free to improve the code if you find something that is not working!

Requirements:


Table of content

Italian name English Name Description
20200312_PrimaStampa.asm 20200312_FirstOutput.asm It prints -3 because it performs 5 - 8
20200312_PrimaStampaProc.asm 20200312_FirstOutput2.asm Same as above, but using a different syntax
20200312_SommaDueNumeri.asm 20200312_TwoNumberSum.asm Print the sum between 5 and 8
20200312_SommaElVettoriProc.asm 20200312_VectorElementSum.asm Sums element in a vector
20200312_SommaElVettoriProcStack.asm 20200312_VectorElementSum2.asm BUGGY: Same as above, but using a different syntax
20200316_Fattoriale.asm 20200316_Factorial.asm Print factorial of x
20200316_HelloWorld.asm 20200316_HelloWorld.asm Self explanatory
20200316_InputStampaNumero.asm 20200316_InputNumberAddOne.asm Given a number, add 1 and print it on the terminal
20200316_ListaTrovaDimProc.asm 20200316_NumberOfNodesInALinkedList.asm Print how many nodes a linked list has
20200316_NumPariDispari.asm 20200316_EvenOdd.asm Given a number, print if the number is even or odd
20200319_SommaListaRicorsiva.asm 20200319_RecursiveSumList.asm Given a list, print the sum of all numbers
20200319_StampaListaInvertitaRicorsiva.asm 20200319_ReverseList.asm Given a list, print it backwards
20200319_StampaListaSemplice.asm 20200319_PrintList.asm Print list using a while loop
20200323_Albero.asm 20200323_Tree.asm Print sum of nodes in a double linked list (tree)
20200323_Fibonacci.asm 20200323_Fibonacci.asm Print Fibonacci(6)
20200323_FibonacciDaInput.asm 20200323_FibonacciInput.asm Print Fibonacci(n), where n is given by input
20200323_Matrice.asm 20200323_Matrix.asm Print sum of each cell in a matrix
20200326_NumeroFoglieAlberone.asm 20200326_TreeLeavesNumber.asm Print number of leaves in a big tree
20200402_FunzioneAltezzaAlbero.asm 20200402_FunzioneAltezzaAlbero.asm Print tree's height
20200402_SommaDiagonale_percasa.asm 20200402_DiagonalMatrixSum.asm Print sum of each element in the diagonal of a matrix
20200514_AlberoCovid.asm 20200514_CovidTree.asm BUGGY: Return 1 if 1 is in the tree. It is called CovidTree because, 1 means infected node, 0 healthy node
20200521_SoluzioneHw2.asm 20200521_Hw2Sol.asm Same as before, but it prints the height of the nearest infected node