Here, you will learn step by step to code fancy and, to some extend, fast code in assembly language x86_64 ! There are, I think, two main reasons you want to code in assembly language (ASM) :
- To write very efficient code (always remember that the algorithms used in compiler arn't perfect) using for example specific CPU feature.
- Writing codes that cannot be write in other programming language (e.g. memory managment, drivers ...)
But here, we will mainly code in assembly language for fun ! Coding efficient assembly code (faster than what can do a compiler) requires very specific skills.
You'll have to solve some problem or do some tasks. Each time, I'll give you the elements you'll need to solve the problem, don't worry. And if you're stuck, you can find some hints in each exercices ! Just read them in order so that you don't spoile yourself completly !
If you want me to check what you've done, you have to create a new branch (before editing anything) with :
$ git branch branch-name
and then you have to switch to this new branch :
$ git switch branch-name
Finally, you can put it online with :
$ git push --set-upstream
Those are kind of borring but unavoidable exercices to get a bit comfortable in ASM :
- make
- initiation
- more-or-less
- lets-play-with-pointers
Here you'll find some fun exercices a bit more difficult but you'll not have to use very advence features of ASM.
- game-of-life
Now I'll introduce to you some more advence concepts and instructions to perform efficients code ! You might also learn about some architecture features of CPU to help you understand certain instructions
- matrix-multiplication