Line-by-line analysis of assembly code of C code. C code creates an array with insertion of integers, linked list as well s pointers and sorting these data types. The assembly code is interpreted from this C code in order to give thorough explanation of each line of assembly and its function in the program to see "under-the-hood" how higher level languages go down into smaller level languages and similarities in arithmetics as well as differences. This project allowed me to gain some knowledge in C as well as a lot more of a understanding of assembly code.
The Breakdown:
Functionality Wise This Is Quite A Straight Forward C -> Assembly Program In Which I Saw Myself Intrepreting Line-By-Line What Each Part Of Assembly Was Doing For A C Program By Converting It To The Language.
This Includes A Program For A Sort Function In Which Sorts A Given Array In C Using A Simple Swap Algorithm. This Is Then Interpreted Into Assembly.
Another Program Is A Pointer Program In Which In C We Define A Pointer And Print Each Of Its Individual Parts (I.E. ptr [value], *ptr [dereferenced value], &ptr [reference value]). This Is Then Also Interpreted Into Assembly
Finally We Have A Linked List Program In C In Which Creates A Linked List Structure And Connects The Nodes Then Traverses Through Them Printing Their Value. We Then Interpreted This Into Assembly.
While Functionally This Is Quite Close-Ended, It Was A Huge Learning Opporunity As I Saw How Annoying Assembly Was But Also How Powerful And Intuitive It Can Be In Many Cases If You Are Accustomed To The Registers And Their Mainly Defined Usages.
Features:
Sort C vs Assembly:
Pointer C vs Assembly:
Array C vs Assembly:
Linked List C vs Assembly: