In this comprehensive tutorial, you will learn the fundamentals of writing 64-bit assembly language, an essential skill for understanding low-level programming and computer architecture. While the primary focus is on 64-bit assembly, much of the knowledge and techniques discussed here can also be applied to 32-bit systems, making this tutorial versatile for various use cases.
This tutorial is specifically tailored for Linux-based environments, ensuring you gain hands-on experience with tools and practices common to this platform. However, if you are using Windows, you can follow along by setting up a Linux-like environment through WSL (Windows Subsystem for Linux) or Cygwin.
To get the most out of this tutorial, you should already have a basic understanding of a compiled programming language such as C, C++, or Rust. These languages will provide a foundation for grasping the concepts and syntax of assembly language, as they share many underlying principles. By the end of this tutorial, you will have a solid understanding of 64-bit assembly and be able to apply it effectively in your projects.
- Installation
- The
exit
system call - Hello world
- Calling from C
- Registers
- Machine code โ
- Basic Arithmetic โ
- Labels and Unconditional Jumps โ
- Flags, Comparisons and Conditional Jumps โ
- Logical and Bitwise Operations โ
- Data Types, Memory Addressing and the
.data
Section โ - The Stack โ
- The
call
instruction โ - Calling External Functions โ
- Using the Heap โ
- Special
mov
instructions โ - Arithmetics part 2 โ
- Manipulating Strings โ
- Floating point arithmetic โ
- NASM local labels โ