This manual documents NASM, the Netwide Assembler: an assembler targetting the Intel x86 series of processors, with portable source.
Chapter 1: Introduction
Section 1.1: What Is NASM?
Section 1.1.1: Why Yet Another Assembler?
Section 1.1.2: License Conditions
Section 1.2: Contact Information
Section 1.3: Installation
Section 1.3.1: Installing NASM under MS-DOS or Windows
Section 1.3.2: Installing NASM under Unix
Chapter 2: Running NASM
Section 2.1: NASM Command-Line Syntax
Section 2.1.1: The 
Section 2.1.2: The 
Section 2.1.3: The 
Section 2.1.4: The 
Section 2.1.5: The 
Section 2.1.6: The 
Section 2.1.7: The 
Section 2.1.8: The 
Section 2.1.9: The 
Section 2.1.10: The 
Section 2.1.11: The 
Section 2.1.12: The 
Section 2.1.13: The 
Section 2.1.14: The 
Section 2.1.15: The 
Section 2.1.16: The 
Section 2.1.17: The 
Section 2.1.18: The 
Section 2.1.19: The 
Section 2.1.20: The 
Section 2.1.21: The 
Section 2.1.22: The 
Section 2.1.23: The 
Section 2.1.24: The 
Section 2.1.25: The 
Section 2.1.26: The 
Section 2.1.27: The 
Section 2.1.28: The 
Section 2.2: Quick Start for MASM Users
Section 2.2.1: NASM Is Case-Sensitive
Section 2.2.2: NASM Requires Square Brackets For Memory References
Section 2.2.3: NASM Doesn't Store Variable Types
Section 2.2.4: NASM Doesn't 
Section 2.2.5: NASM Doesn't Support Memory Models
Section 2.2.6: Floating-Point Differences
Section 2.2.7: Other Differences
Chapter 3: The NASM Language
Section 3.1: Layout of a NASM Source Line
Section 3.2: Pseudo-Instructions
Section 3.2.1: 
Section 3.2.2: 
Section 3.2.3: 
Section 3.2.4: 
Section 3.2.5: 
Section 3.3: Effective Addresses
Section 3.4: Constants
Section 3.4.1: Numeric Constants
Section 3.4.2: Character Strings
Section 3.4.3: Character Constants
Section 3.4.4: String Constants
Section 3.4.5: Unicode Strings
Section 3.4.6: Floating-Point Constants
Section 3.4.7: Packed BCD Constants
Section 3.5: Expressions
Section 3.5.1: 
Section 3.5.2: 
Section 3.5.3: 
Section 3.5.4: 
Section 3.5.5: 
Section 3.5.6: 
Section 3.5.7: Unary Operators: 
Section 3.6: 
Section 3.7: 
Section 3.8: Critical Expressions
Section 3.9: Local Labels
Chapter 4: The NASM Preprocessor
Section 4.1: Single-Line Macros
Section 4.1.1: The Normal Way: 
Section 4.1.2: Resolving 
Section 4.1.3: Concatenating Single Line Macro Tokens: 
Section 4.1.4: The Macro Name Itself: 
Section 4.1.5: Undefining Single-Line Macros: 
Section 4.1.6: Preprocessor Variables: 
Section 4.1.7: Defining Strings: 
Section 4.2: String Manipulation in Macros
Section 4.2.1: Concatenating Strings: 
Section 4.2.2: String Length: 
Section 4.2.3: Extracting Substrings: 
Section 4.3: Multi-Line Macros: 
Section 4.3.1: Overloading Multi-Line Macros
Section 4.3.2: Macro-Local Labels
Section 4.3.3: Greedy Macro Parameters
Section 4.3.4: Default Macro Parameters
Section 4.3.5: 
Section 4.3.6: 
Section 4.3.7: Concatenating Macro Parameters
Section 4.3.8: Condition Codes as Macro Parameters
Section 4.3.9: Disabling Listing Expansion
Section 4.3.10: Undefining Multi-Line Macros: 
Section 4.4: Conditional Assembly
Section 4.4.1: 
Section 4.4.2: 
Section 4.4.3: 
Section 4.4.4: 
Section 4.4.5: 
Section 4.4.6: 
Section 4.4.7: 
Section 4.4.8: 
Section 4.5: Preprocessor Loops: 
Section 4.6: Source Files and Dependencies
Section 4.6.1: 
Section 4.6.2: 
Section 4.6.3: 
Section 4.6.4: 
Section 4.7: The Context Stack
Section 4.7.1: 
Section 4.7.2: Context-Local Labels
Section 4.7.3: Context-Local Single-Line Macros
Section 4.7.4: 
Section 4.7.5: Example Use of the Context Stack: Block IFs
Section 4.8: Stack Relative Preprocessor Directives
Section 4.8.1: 
Section 4.8.2: 
Section 4.8.3: 
Section 4.9: Reporting User-Defined Errors: 
Section 4.10: Other Preprocessor Directives
Section 4.10.1: 
Section 4.10.2: 
Section 4.11: Standard Macros
Section 4.11.1: NASM Version Macros
Section 4.11.2: 
Section 4.11.3: 
Section 4.11.4: 
Section 4.11.5: 
Section 4.11.6: 
Section 4.11.7: Assembly Date and Time Macros
Section 4.11.8: 
Section 4.11.9: 
Section 4.11.10: 
Section 4.11.11: 
Section 4.11.12: 
Chapter 5: Standard Macro Packages
Section 5.1: 
Section 5.2: 
Chapter 6: Assembler Directives
Section 6.1: 
Section 6.1.1: 
Section 6.2: 
Section 6.3: 
Section 6.3.1: The 
Section 6.4: 
Section 6.5: 
Section 6.6: 
Section 6.7: 
Section 6.8: 
Section 6.9: 
Chapter 7: Output Formats
Section 7.1: 
Section 7.1.1: 
Section 7.1.2: 
Section 7.1.3: 
Section 7.1.4: Map files
Section 7.2: 
Section 7.2.1: 
Section 7.2.2: 
Section 7.2.3: 
Section 7.2.4: 
Section 7.2.5: 
Section 7.2.6: 
Section 7.2.7: 
Section 7.2.8: 
Section 7.3: 
Section 7.3.1: 
Section 7.3.2: 
Section 7.4: 
Section 7.4.1: 
Section 7.4.2: 
Section 7.5: 
Section 7.6: 
Section 7.7: 
Section 7.7.1: ELF specific directive 
Section 7.7.2: 
Section 7.7.3: Position-Independent Code: 
Section 7.7.4: 
Section 7.7.5: 
Section 7.7.6: 16-bit code and ELF 
Section 7.7.7: Debug formats and ELF 
Section 7.8: 
Section 7.9: 
Section 7.10: 
Section 7.11: 
Section 7.11.1: Requiring a Library: The 
Section 7.11.2: Specifying a Module Name: The 
Section 7.11.3: 
Section 7.11.4: 
Section 7.12: 
Chapter 8: Writing 16-bit Code (DOS, Windows 3/3.1)
Section 8.1: Producing 
Section 8.1.1: Using the 
Section 8.1.2: Using the 
Section 8.2: Producing 
Section 8.2.1: Using the 
Section 8.2.2: Using the 
Section 8.3: Producing 
Section 8.4: Interfacing to 16-bit C Programs
Section 8.4.1: External Symbol Names
Section 8.4.2: Memory Models
Section 8.4.3: Function Definitions and Function Calls
Section 8.4.4: Accessing Data Items
Section 8.4.5: 
Section 8.5: Interfacing to Borland Pascal Programs
Section 8.5.1: The Pascal Calling Convention
Section 8.5.2: Borland Pascal Segment Name Restrictions
Section 8.5.3: Using 
Chapter 9: Writing 32-bit Code (Unix, Win32, DJGPP)
Section 9.1: Interfacing to 32-bit C Programs
Section 9.1.1: External Symbol Names
Section 9.1.2: Function Definitions and Function Calls
Section 9.1.3: Accessing Data Items
Section 9.1.4: 
Section 9.2: Writing NetBSD/FreeBSD/OpenBSD and Linux/ELF Shared Libraries
Section 9.2.1: Obtaining the Address of the GOT
Section 9.2.2: Finding Your Local Data Items
Section 9.2.3: Finding External and Common Data Items
Section 9.2.4: Exporting Symbols to the Library User
Section 9.2.5: Calling Procedures Outside the Library
Section 9.2.6: Generating the Library File
Chapter 10: Mixing 16 and 32 Bit Code
Section 10.1: Mixed-Size Jumps
Section 10.2: Addressing Between Different-Size Segments
Section 10.3: Other Mixed-Size Instructions
Chapter 11: Writing 64-bit Code (Unix, Win64)
Section 11.1: Register Names in 64-bit Mode
Section 11.2: Immediates and Displacements in 64-bit Mode
Section 11.3: Interfacing to 64-bit C Programs (Unix)
Section 11.4: Interfacing to 64-bit C Programs (Win64)
Chapter 12: Troubleshooting
Section 12.1: Common Problems
Section 12.1.1: NASM Generates Inefficient Code
Section 12.1.2: My Jumps are Out of Range
Section 12.1.3: 
Section 12.1.4: 
Section 12.2: Bugs
Appendix A: Ndisasm
Section A.1: Introduction
Section A.2: Getting Started: Installation
Section A.3: Running NDISASM
Section A.3.1: COM Files: Specifying an Origin
Section A.3.2: Code Following Data: Synchronisation
Section A.3.3: Mixed Code and Data: Automatic (Intelligent) Synchronisation 
Section A.3.4: Other Options
Section A.4: Bugs and Improvements
Appendix B: Instruction List
Section B.1: Introduction
Section B.1.1: Special instructions...
Section B.1.2: Conventional instructions
Section B.1.3: Katmai Streaming SIMD instructions (SSE -- a.k.a. KNI, XMM, MMX2)
Section B.1.4: Introduced in Deschutes but necessary for SSE support
Section B.1.5: XSAVE group (AVX and extended state)
Section B.1.6: Generic memory operations
Section B.1.7: New MMX instructions introduced in Katmai
Section B.1.8: AMD Enhanced 3DNow! (Athlon) instructions
Section B.1.9: Willamette SSE2 Cacheability Instructions
Section B.1.10: Willamette MMX instructions (SSE2 SIMD Integer Instructions)
Section B.1.11: Willamette Streaming SIMD instructions (SSE2)
Section B.1.12: Prescott New Instructions (SSE3)
Section B.1.13: VMX Instructions
Section B.1.14: Extended Page Tables VMX instructions
Section B.1.15: Tejas New Instructions (SSSE3)
Section B.1.16: AMD SSE4A
Section B.1.17: New instructions in Barcelona
Section B.1.18: Penryn New Instructions (SSE4.1)
Section B.1.19: Nehalem New Instructions (SSE4.2)
Section B.1.20: AMD SSE5 instructions
Section B.1.21: Intel SMX
Section B.1.22: Geode (Cyrix) 3DNow! additions
Section B.1.23: Intel new instructions in ???
Section B.1.24: Intel AES instructions
Section B.1.25: Intel AVX AES instructions
Section B.1.26: Intel AVX instructions
Section B.1.27: Intel Carry-Less Multiplication instructions (CLMUL)
Section B.1.28: Intel Fused Multiply-Add instructions (FMA)
Section B.1.29: VIA (Centaur) security instructions
Section B.1.30: Systematic names for the hinting nop instructions
Appendix C: NASM Version History
Section C.1: NASM 2 Series
Section C.1.1: Version 2.04
Section C.1.2: Version 2.03.01
Section C.1.3: Version 2.03
Section C.1.4: Version 2.02
Section C.1.5: Version 2.01
Section C.1.6: Version 2.00
Section C.2: NASM 0.98 Series
Section C.2.1: Version 0.98.39
Section C.2.2: Version 0.98.38
Section C.2.3: Version 0.98.37
Section C.2.4: Version 0.98.36
Section C.2.5: Version 0.98.35
Section C.2.6: Version 0.98.34
Section C.2.7: Version 0.98.33
Section C.2.8: Version 0.98.32
Section C.2.9: Version 0.98.31
Section C.2.10: Version 0.98.30
Section C.2.11: Version 0.98.28
Section C.2.12: Version 0.98.26
Section C.2.13: Version 0.98.25alt
Section C.2.14: Version 0.98.25
Section C.2.15: Version 0.98.24p1
Section C.2.16: Version 0.98.24
Section C.2.17: Version 0.98.23
Section C.2.18: Version 0.98.22
Section C.2.19: Version 0.98.21
Section C.2.20: Version 0.98.20
Section C.2.21: Version 0.98.19
Section C.2.22: Version 0.98.18
Section C.2.23: Version 0.98.17
Section C.2.24: Version 0.98.16
Section C.2.25: Version 0.98.15
Section C.2.26: Version 0.98.14
Section C.2.27: Version 0.98.13
Section C.2.28: Version 0.98.12
Section C.2.29: Version 0.98.11
Section C.2.30: Version 0.98.10
Section C.2.31: Version 0.98.09
Section C.2.32: Version 0.98.08
Section C.2.33: Version 0.98.09b with John Coffman patches released 28-Oct-2001
Section C.2.34: Version 0.98.07 released 01/28/01
Section C.2.35: Version 0.98.06f released 01/18/01
Section C.2.36: Version 0.98.06e released 01/09/01
Section C.2.37: Version 0.98p1
Section C.2.38: Version 0.98bf (bug-fixed)
Section C.2.39: Version 0.98.03 with John Coffman's changes released 27-Jul-2000
Section C.2.40: Version 0.98.03
Section C.2.41: Version 0.98
Section C.2.42: Version 0.98p9
Section C.2.43: Version 0.98p8
Section C.2.44: Version 0.98p7
Section C.2.45: Version 0.98p6
Section C.2.46: Version 0.98p3.7
Section C.2.47: Version 0.98p3.6
Section C.2.48: Version 0.98p3.5
Section C.2.49: Version 0.98p3.4
Section C.2.50: Version 0.98p3.3
Section C.2.51: Version 0.98p3.2
Section C.2.52: Version 0.98p3-hpa
Section C.2.53: Version 0.98 pre-release 3
Section C.2.54: Version 0.98 pre-release 2
Section C.2.55: Version 0.98 pre-release 1
Section C.3: NASM 0.9 Series
Section C.3.1: Version 0.97 released December 1997
Section C.3.2: Version 0.96 released November 1997
Section C.3.3: Version 0.95 released July 1997
Section C.3.4: Version 0.94 released April 1997
Section C.3.5: Version 0.93 released January 1997
Section C.3.6: Version 0.92 released January 1997
Section C.3.7: Version 0.91 released November 1996
Section C.3.8: Version 0.90 released October 1996