This will be a series of posts directed at people who want to learn how to read the x86_64 assembly code of their C program. These posts are aimed to provide an understanding of the most important components of x86_64 assembly and how the x86_64 processors manage memory when a C program is executed. This will be achieved using a more practical approach.
Questions You Might Ask
What background knowledge is required?
Before diving into this series you should have some basic programming knowledge such as what are functions, IF statements, arrays and loops.
What are the system requirements?
You would need a system that runs a 64-bit version of Microsoft Windows (I have used Windows 10) or 64-bit version of your favorite Linux distro (I have used Ubuntu 20.04).
Do I need to supplement this knowledge with a book?
Assembly code can be scary to look at first. But with this series you would learn enough to get comfortable reading the assembly of the important components of a C code like functions, IF statements, arrays, loops, etc. If you are interested in more advanced topics, I can recommend the book Assembly Language for x86 processors by Kip Irvine.
What can I expect to learn from these posts?
As stated earlier, the aim of this series is to get you comfortable in understanding the assembly code of a C program. These posts are laid out in such a way that each blog builds onto the knowledge provided in the previous blogs. This is done by first introducing some basic theoretical concepts of x86_64 assembly and memory management. Then we apply these concepts to understand the assembly code of some basic C programs. In the end, we will do a walk through of an assembly code under 100 lines.
In the next post we begin the series with a discussion of some basic concepts of x86_64 assembly that you would require to know to understand the further posts.