X86 Assembly
From Wikibooks, the open-content textbooks collection
Contents
• 1 Introduction
• 1.1 Why Learn Assembly?
• 1.2 Who is This Book For?
• 1.3 How is This Book Organized?
• 2 Basic FAQ
• 2.1 How Does the Computer Read/Understand Assembly?
• 2.2 Is it the Same On Windows/DOS/Linux?
• 2.3 Which Assembler is Best?
• 2.4 Do I Need to Know Assembly?
• 2.5 How Should I Format my Code?
• 3 X86 Family
• 3.1 Intel x86 Microprocessors
• 3.2 AMD x86 Compatible Microprocessors
• 4 X86 Architecture
• 4.1 x86 Architecture
• 4.1.1 General Purpose Registers (GPR)
• 4.1.2 Segment Registers
• 4.1.3 EFLAGS Register
• 4.1.4 Instruction Pointer
• 4.1.5 Memory
• 4.1.6 Two's complement representation
• 4.1.7 Addressing modes
• 4.2 Stack
• 4.3 CPU Operation Modes
• 4.3.1 Real Mode
• 4.3.2 Protected Mode
• 4.3.2.1 Flat Memory Model
• 4.3.2.2 Multi-Segmented Memory Model
• 5 Comments
• 5.1 Comments
• 5.2 HLA Comments
• 6 16 32 and 64 Bits
• 6.1 The 8086 Registers
• 6.1.1 Example
• 6.2 The A20 Gate Saga
• 6.3 32-Bit Addressing
• 7 X86 Instructions
• 7.1 Conventions
• 8 Data Transfer
• 8.1 Data transfer instructions
• 8.1.1 Move
• 8.1.2 Data Swap
• 8.1.3 Move and Extend
• 8.1.4 Move by Data Size