AMD64 ASSEMBLY TUTORIAL
In 2006 when the x86-64
(amd64
) architecture was hot stuff, I wrote a tutorial on how to write assembly code for the x86-64
architecture. Assembly language can be a lot of fun but tedious.
The original code was developed on a 64-bit Slackware clone called Slamd64, and now we have changed it slightly to work on Debian jessie
in the year 2020. Most of the assembly code stays the same as it was in 2006, except for the Hilbert Matrix which has
been fixed.
Here is the table of contents:
- Introduction
- x86-64 ABI
- YASM Assembler
- x86-64 Calling Conventions
- CPUID
- Hello World!
- Input/Output Functions
- Multiplication & Division
- Find Prime Numbers
- Bit Shifting Operations
- Conditional Operations Without Branching
- Calculate Factorial With Recursion
- Doubly Linked List: Labouchere System
- Labouchere System using C
- Labouchere System using only registers in Assembly
- Hilbert Matrix