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 ❌