From 4567b48f6611f7dc49ae5d12a7749328a8fcf285 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Sat, 28 Feb 2026 15:58:57 +0500 Subject: [PATCH] Update path to images Signed-off-by: Alexander Kuleshov --- content/asm_1.md | 2 +- content/asm_2.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/asm_1.md b/content/asm_1.md index 9d5f9c1..0987421 100644 --- a/content/asm_1.md +++ b/content/asm_1.md @@ -189,7 +189,7 @@ A CPU executes different operations on data. But where is data stored? While the Each register has a specific size and purpose. For `x86_64` CPUs, general-purpose registers include: -![registers](/content/assets/registers.png) +![registers](assets/registers.png) We can consider each register as a very small memory slot that can store a value with a size specified in the table above. For example, the `rax` register can contain a value of up to `64` bits, the `ax` register may contain a value of up to `16` bits, and so on. In the next posts, we will learn more about `rax`, `rdi`, `rbx`, and other registers. For now, it is enough to consider them just as small memory slots that a CPU can access fast. Despite these registers are called **general-purpose registers**, does it mean that we may use any register for any purpose? The simple answer is yes. We can use them to perform arithmetic, logical, data transfer and other basic operations. However, there are specific cases when you should use these registers as specified in the [Application Binary Interface](https://en.wikipedia.org/wiki/Application_binary_interface) and the [calling conventions](https://en.wikipedia.org/wiki/X86_calling_conventions) documents. Since these posts are focused on assembly for Linux `x86_64`, the registers have the following meanings: diff --git a/content/asm_2.md b/content/asm_2.md index 82bfd2d..c799f2e 100644 --- a/content/asm_2.md +++ b/content/asm_2.md @@ -55,7 +55,7 @@ There are different types of registers on the `x86_64` processors: You can find a detailed description of registers in the [Intel software developer manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html). For now, we will focus only on the **general purpose registers** as we will use them in most examples. If we will use other registers, I will mention it beforehand. We already saw a table with general purpose registers in the [previous chapter](asm_1.md#cpu-registers-and-system-calls): -![registers](/content/assets/registers.png) +![registers](assets/registers.png) There are 16 registers of 64 bits size, from `rax` to `r15`. Each register also has smaller parts with their own names. For example, as we may see in the table above, the lower 32 bits of the `rax` register are called `eax`. Similarly, the lower 16 bits of the `eax` register are called `ax`. Finally, the lower 8 bits of the `ax` register are called `al`, while the higher 8 bits are called `ah`. We can visualize this as: