NASM Coding: Basics

We can also access smaller portions of each of the registers that we listed on the previous slide. For example, for the register

rax
, the following parts have names:

Register Size What Part
eax
32-bit Lower (rightmost) 32 bits of
rax
ax
16-bit Lower (rightmost) 16 bits of
rax
ah
8-bit Higher (leftmost) 8 bits of
ax
al
8-bit Lower (rightmost) 8 bits of
ax
Named parts of the rax register: eax, ax, ah, and al

Named parts of the rax register. Taken from Raw Linux Threads via System Calls, Public Domain.