Other meanings of x86
Programming
x86 assembly language is a family of low-level programming languages used to write instructions for Intel and AMD processors based on the x86 architecture. It is a human-readable representation of the machine code that the CPU executes, using mnemonics like MOV, ADD, and JMP to represent operations. Assembly language is specific to the instruction set architecture (ISA), and x86 assembly has evolved over decades, from the 16-bit 8086 to the 32-bit IA-32 and the 64-bit x86-64 (also called AMD64). Programmers use assemblers such as NASM, MASM, and GAS to translate assembly source code into object files. Although high-level languages dominate modern software development, x86 assembly remains essential for operating system kernels, device drivers, embedded systems, and performance-critical routines, as well as for reverse engineering and security research.
The x86 assembly language originated with the Intel 8086 processor, released in 1978, which introduced a 16-bit instruction set with segmented memory addressing1. The 8086 was designed to be source-compatible with the earlier 8080, but it used a more complex set of registers and addressing modes. In 1982, the Intel 80286 added protected mode, enabling multitasking and memory protection, but assembly programming for it remained largely backward-compatible. The 32-bit era began with the Intel 80386 in 1985, which introduced flat memory models and 32-bit registers (EAX, EBX, etc.), and this became the basis for IA-32 assembly. The 64-bit extension, originally developed by AMD as AMD64 and later adopted by Intel as Intel 64, was introduced with the Opteron processor in 2003, adding eight additional general-purpose registers (R8–R15) and 64-bit pointers.
x86 assembly uses two primary syntax families: Intel syntax and AT&T syntax. Intel syntax, used by NASM and MASM, places the destination operand before the source (e.g., MOV EAX, 1), while AT&T syntax, used by GNU assembler (GAS), reverses the order and prefixes registers with % (e.g., movl $1, %eax)2. The programming model includes general-purpose registers, segment registers, an instruction pointer, and a flags register. The 64-bit mode (x86-64) provides 16 general-purpose registers, each 64 bits wide, and supports both 32-bit and 64-bit operand sizes. Addressing modes include register, immediate, direct, and indirect with displacement, scaled index, and base. The stack is used for procedure calls, with the PUSH and POP instructions, and the CALL and RET instructions manage control flow.
The x86 instruction set has grown from the original 8086 instructions to include thousands of variations, with extensions such as MMX, SSE, SSE2, AVX, and AVX-512 for SIMD (single instruction, multiple data) processing3. These extensions add vector registers (XMM0–XMM15, YMM0–YMM15, ZMM0–ZMM31) and instructions for floating-point and integer vector operations. The original x87 floating-point unit, introduced with the 8087 coprocessor, used a stack-based register model (ST0–ST7), but modern compilers typically use SSE for scalar floating-point arithmetic. Other notable instructions include CPUID for processor identification, RDTSC for reading the time-stamp counter, and the SYSCALL/SYSRET pair for fast system calls in 64-bit mode. The instruction encoding is variable-length, ranging from 1 to 15 bytes, which complicates decoding but allows for compact code.
One lesser-known aspect is the existence of the BOUND instruction, introduced in the 80186, which checks array indices against bounds but is rarely used and not supported in 64-bit mode. Another is the AAA and DAA instructions for BCD arithmetic, which are obsolete but still present. The REP prefix can be combined with MOVS, STOS, or CMPS to create efficient string operations. The LEA instruction, often used for arithmetic, does not access memory and can be used to multiply by constants. The NOP instruction is actually an alias for XCHG EAX, EAX in 32-bit mode, and multi-byte NOPs are used for alignment. The INT 0x80 system call interface on Linux is a 32-bit legacy, while 64-bit programs use SYSCALL. Also, the FS and GS segment registers are repurposed in modern OSes for thread-local storage and other kernel data.
x86 assembly language is a low-level programming language specific to the x86 family of processors, used for direct hardware control and performance-critical code.
Help improve the encyclopedia. Reports go straight to the site manager.