Description #
x86 Assembly is the low-level programming language for Intel and AMD’s 32-bit and 64-bit processors. It provides direct control over hardware and system resources, commonly used for system programming, performance-critical applications, and reverse engineering.
History #
The x86 architecture was introduced by Intel in 1978 with the 8086 processor. Since then, it has evolved through several generations, becoming the dominant architecture in personal computers and servers worldwide. Its assembly language has a rich instruction set and complex addressing modes.
Hello World Code #
section .data
msg db "Hello, World!",0
section .text
global _start
_start:
; write syscall
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, 13
int 0x80
; exit syscall
mov eax, 1
xor ebx, ebx
int 0x80
How to Run #
Option 1: Online
Use Online x86 Emulator.
Option 2: Local
- Write code to a file
hello.asm
- Assemble with NASM:
nasm -f elf32 hello.asm -o hello.o
ld -m elf_i386 hello.o -o hello
./hello
Key Concepts #
- Low-level machine instructions for CPU operations
- Registers (eax, ebx, ecx, edx) and flags for control
- Interrupts and syscalls for OS interaction
- Complex instruction set with multiple addressing modes
- Supports both 16-bit, 32-bit, and 64-bit modes
- Used in operating systems, embedded systems, and drivers
- Manual memory management and stack operations
- Inline assembly often used in C/C++ programs
- Extensive ecosystem and tooling (NASM, MASM, GAS)
- Deep knowledge required for optimization and debugging
Try It Online #
Fun Facts #
- x86 is backward compatible with older processors dating back to 1978.
- It’s the most widely used CPU architecture for desktops and servers.
- The interrupt
int 0x80
is used to invoke Linux system calls in 32-bit mode. - Intel’s original 8086 had a 16-bit data bus and a 20-bit address bus.
- Modern x86-64 processors support 64-bit instructions but retain legacy compatibility.