Table of Contents
Chapters
- Chapter 1: Introduction
- Section 1.1: What Is NASM?
- Section 1.1.1: License
- Chapter 2: Running NASM
- Section 2.1: NASM Command-Line Syntax
- Section 2.1.1: The
-o Option: Output File Name - Section 2.1.2: The
-f Option: Output File Format - Section 2.1.3: The
-l Option: Generating a Listing File - Section 2.1.4: The
-L Option: Additional or Modified Listing Info - Section 2.1.5: The
-M Option: Generate Makefile Dependencies - Section 2.1.6: The
-MG Option: Generate Makefile Dependencies - Section 2.1.7: The
-MF Option: Set Makefile Dependency File - Section 2.1.8: The
-MD Option: Assemble and Generate Dependencies - Section 2.1.9: The
-MT Option: Dependency Target Name - Section 2.1.10: The
-MQ Option: Dependency Target Name (Quoted) - Section 2.1.11: The
-MP Option: Emit Phony Makefile Targets - Section 2.1.12: The
-MW Option: Watcom make quoting style - Section 2.1.13: The
-F Option: Debug Information Format - Section 2.1.14: The
-g Option: Enabling Debug Information. - Section 2.1.15: The
-X Option: Selecting an Error Reporting Format - Section 2.1.16: The
-Z Option: Send Errors to a File - Section 2.1.17: The
-s Option: Send Errors to stdout - Section 2.1.18: The
-i Option: Include File Search Directories - Section 2.1.19: The
-p Option: Pre-Include a File - Section 2.1.20: The
-d Option: Pre-Define a Macro - Section 2.1.21: The
-u Option: Undefine a Macro - Section 2.1.22: The
-E Option: Preprocess Only - Section 2.1.23: The
-a Option: Suppress Preprocessing - Section 2.1.24: The
-O Option: Multipass Optimization - Section 2.1.25: The
-t Option: TASM Compatibility Mode - Section 2.1.26: The
-w and -W Options: Enable or Disable Assembly Warnings - Section 2.1.27: The
-v Option: Display Version Info - Section 2.1.28: The
--[gl]prefix and --[gl]postfix Options - Section 2.1.29: The
--pragma Option - Section 2.1.30: The
--before Option - Section 2.1.31: The
--bits Option - Section 2.1.32: The
--limit- Options - Section 2.1.33: The
--keep-all Option - Section 2.1.34: The
--no-line Option - Section 2.1.35: The
--reproducible Option - Section 2.1.36: The
NASMENV Environment Variable
- 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
ASSUME - Section 2.2.5: NASM Doesn't Support Memory Models
- Section 2.2.6: Floating-Point Differences
- Section 2.2.7: Other Differences
- Section 2.2.8: MASM compatibility package
- Chapter 3: The NASM Language
- Section 3.1: Layout of a NASM Source Line
- Section 3.2: Pseudo-Instructions
- Section 3.2.1:
Dx: Declaring Initialized Data - Section 3.2.2:
RESB and Friends: Declaring Uninitialized Data - Section 3.2.3:
INCBIN: Including External Binary Files - Section 3.2.4:
EQU: Defining Constants - Section 3.2.5:
TIMES: Repeating Instructions or Data
- 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:
? ... :: Conditional Operator - Section 3.5.2: :
||: Boolean OR Operator - Section 3.5.3: :
^^: Boolean XOR Operator - Section 3.5.4: :
&&: Boolean AND Operator - Section 3.5.5: : Comparison Operators
- Section 3.5.6:
|: Bitwise OR Operator - Section 3.5.7:
^: Bitwise XOR Operator - Section 3.5.8:
&: Bitwise AND Operator - Section 3.5.9: Bit Shift Operators
- Section 3.5.10:
+ and -: Addition and Subtraction Operators - Section 3.5.11: Multiplication, Division and Modulo
- Section 3.5.12: Unary Operators
- Section 3.6:
SEG and WRT - Section 3.7:
STRICT: Inhibiting Optimization - Section 3.8: Critical Expressions
- Section 3.9: Local Labels
- Chapter 4: Syntax Quirks and Summaries
- Section 4.1: Summary of the
JMP and CALL Syntax - Section 4.1.1: Near Jumps
- Section 4.1.2: Infinite Loop Trick
- Section 4.1.3: Jumps and Mixed Sizes
- Section 4.1.4: Calling Procedures Outside of a Shared Library
- Section 4.1.5:
FAR Calls and Jumps - Section 4.1.6: 64-bit absolute jump (
JMPABS)
- Section 4.2: Compact NDS/NDD Operands
- Section 4.3: 64-bit moffs
- Section 4.4: Split EA Addressing Syntax
- Section 4.5: No Syntax for Ternary Logic Instruction
- Section 4.6: APX Instruction Syntax
- Section 4.6.1: Extended General Purpose Registers (EGPRs)
- Section 4.6.2: New Data Destination (NDD)
- Section 4.6.3: Suppress Modifying Flags (NF)
- Section 4.6.4: Zero Upper (ZU)
- Section 4.6.5: Source Condition Code (Scc) and Default Flags Value (DFV)
- Section 4.6.6:
PUSH and POP Extensions - Section 4.6.7: APX and the NASM optimizer
- Section 4.6.8: Force APX Encoding
- Chapter 5: The NASM Preprocessor
- Section 5.1: Preprocessor Expansions
- Section 5.1.1: Continuation Line Collapsing
- Section 5.1.2: Comment Removal
- Section 5.1.3:
%line directives - Section 5.1.4: Conditionals, Loops and Multi-Line Macro Definitions
- Section 5.1.5: Directives processing
- Section 5.1.6: Inline expansions and other directives
- Section 5.1.7: Multi-Line Macro Expansion
- Section 5.1.8: Detokenization
- Section 5.2: Single-Line Macros
- Section 5.2.1: The Normal Way:
%define - Section 5.2.2: Resolving
%define: %xdefine - Section 5.2.3: Macro Indirection:
%[...] - Section 5.2.4: Concatenating Single Line Macro Tokens:
%+ - Section 5.2.5: The Macro Name Itself:
%? and %?? - Section 5.2.6: The Single-Line Macro Name:
%*? and %*?? - Section 5.2.7: Undefining Single-Line Macros:
%undef - Section 5.2.8: Preprocessor Variables:
%assign - Section 5.2.9: Defining Strings:
%defstr - Section 5.2.10: Defining Tokens:
%deftok - Section 5.2.11: Defining Aliases:
%defalias - Section 5.2.12: Conditional Comma Operator:
%,
- Section 5.3: String Manipulation in Macros
- Section 5.3.1: Concatenating Strings:
%strcat - Section 5.3.2: String Length:
%strlen - Section 5.3.3: Extracting Substrings:
%substr
- Section 5.4: Preprocessor Functions
- Section 5.4.1:
%abs() Function - Section 5.4.2:
%b2hs() Function - Section 5.4.3:
%chr() Function - Section 5.4.4:
%cond() Function - Section 5.4.5:
%count() Function - Section 5.4.6:
%depend() Function - Section 5.4.7:
%eval() Function - Section 5.4.8:
%find() and %findi() Functions - Section 5.4.9:
%hex() Function - Section 5.4.10:
%hs2b() Function - Section 5.4.11:
%is() Family Functions - Section 5.4.12:
%map() Function - Section 5.4.13:
%null() Function - Section 5.4.14:
%num() Function - Section 5.4.15:
%ord() Function - Section 5.4.16:
%pathsearch() Function - Section 5.4.17:
%realpath() Function - Section 5.4.18:
%sel() Function - Section 5.4.19:
%selbits() Function - Section 5.4.20:
%str() Function - Section 5.4.21:
%strcat() Function - Section 5.4.22:
%strlen() Function - Section 5.4.23:
%substr() Function - Section 5.4.24:
%tok() function
- Section 5.5: Multi-Line Macros:
%macro - Section 5.5.1: Overloading Multi-Line Macros
- Section 5.5.2: Macro-Local Labels
- Section 5.5.3: Greedy Macro Parameters
- Section 5.5.4: Macro Parameters Range
- Section 5.5.5: Default Macro Parameters
- Section 5.5.6:
%0: Macro Parameter Counter - Section 5.5.7:
%00: Label Preceding Macro - Section 5.5.8:
%rotate: Rotating Macro Parameters - Section 5.5.9: Concatenating Macro Parameters
- Section 5.5.10: Condition Codes as Macro Parameters
- Section 5.5.11: Disabling Listing Expansion
- Section 5.5.12: Undefining Multi-Line Macros:
%unmacro, %unimacro - Section 5.5.13:
%exitmacro: Stop Expanding a Multi-Line Macro
- Section 5.6: Conditional Assembly
- Section 5.6.1:
%if: Testing Arbitrary Numeric Expressions - Section 5.6.2:
%ifdef: Testing Single-Line Macro Existence - Section 5.6.3:
%ifdefalias: Testing Single-Line Macro Alias Existence - Section 5.6.4:
%ifmacro: Testing Multi-Line Macro Existence - Section 5.6.5:
%ifctx: Testing the Context Stack - Section 5.6.6:
%ifidn and %ifidni: Testing Exact Text Identity - Section 5.6.7:
%ifid, %ifnum, %ifstr: Testing Token Types - Section 5.6.8:
%iftoken: Test for a Single Token - Section 5.6.9:
%ifempty: Test for Empty Expansion - Section 5.6.10:
%ifdirective: Test If a Directive Is Supported - Section 5.6.11:
%ifusable and %ifusing: Test For Standard Macro Packages - Section 5.6.12:
%iffile: Test If a File Exists - Section 5.6.13:
%ifenv: Test If Environment Variable Exists - Section 5.6.14: Backwards Compatibility Caveat
- Section 5.7: Preprocessor Loops:
%rep - Section 5.8: Source Files and Dependencies
- Section 5.8.1:
%include: Including Other Files - Section 5.8.2:
%pathsearch: Search the Include Path - Section 5.8.3:
%depend: Add Dependent Files - Section 5.8.4:
%use: Include Standard Macro Package
- Section 5.9: The Context Stack
- Section 5.9.1:
%push and %pop: Creating and Removing Contexts - Section 5.9.2: Context-Local Labels
- Section 5.9.3: Context-Local Single-Line Macros
- Section 5.9.4: Context Fall-Through Lookup (deprecated)
- Section 5.9.5:
%repl: Renaming a Context - Section 5.9.6: Example Use of the Context Stack: Block IFs
- Section 5.10: Stack Relative Preprocessor Directives
- Section 5.10.1:
%arg Directive - Section 5.10.2:
%stacksize Directive - Section 5.10.3:
%local Directive
- Section 5.11: Reporting User-generated Diagnostics:
%error, %warning, %fatal, %note - Section 5.12:
%pragma: Setting Options - Section 5.12.1: Preprocessor Pragmas
- Section 5.13: Other Preprocessor Directives
- Section 5.13.1:
%line Directive - Section 5.13.2:
%!variable: Read an Environment Variable. - Section 5.13.3:
%clear: Clear All Macro Definitions
- Chapter 6: Standard Macros
- Section 6.1: NASM Version Macros
- Section 6.1.1:
__?NASM_VERSION_ID?__: NASM Version ID - Section 6.1.2:
__?NASM_VER?__: NASM Version String
- Section 6.2:
__?FILE?__ and __?LINE?__: File Name and Line Number - Section 6.3:
__?BITS?__: Current Code Generation Mode - Section 6.4:
__?DEFAULT?__: DEFAULT directive settings - Section 6.5:
__?OUTPUT_FORMAT?__: Current Output Format - Section 6.6:
__?DEBUG_FORMAT?__: Current Debug Format - Section 6.7: Assembly Date and Time Macros
- Section 6.8:
__?NASM_HAS_IFDIRECTIVE?__: Directive Probing Support - Section 6.9:
__?USE_package?__: Package Include Test - Section 6.10:
__?PASS?__: Assembly Pass - Section 6.11: Structure Data Types
- Section 6.11.1:
STRUC and ENDSTRUC: Declaring Structure Data Types - Section 6.11.2:
ISTRUC, AT and IEND: Declaring Instances of Structures
- Section 6.12: Alignment Control
- Section 6.12.1:
ALIGN and ALIGNB: Code and Data Alignment - Section 6.12.2:
SECTALIGN: Section Alignment
- Chapter 7: Standard Macro Packages
- Section 7.1:
altreg: Alternate Register Names - Section 7.2:
smartalign: Smart ALIGN Macro - Section 7.3:
fp: Floating-point macros - Section 7.4:
ifunc: Integer functions - Section 7.4.1: Integer logarithms
- Section 7.5:
masm: MASM compatibility - Section 7.6:
vtern: Ternary Logic Assist
- Chapter 8: Assembler Directives
- Section 8.1:
BITS: Target Processor Mode - Section 8.1.1:
USE16 & USE32: Aliases for BITS
- Section 8.2:
DEFAULT: Change the assembler defaults - Section 8.2.1:
REL, ABS: RIP-relative addressing - Section 8.2.2:
BND, NOBND: BND prefix
- Section 8.3:
SECTION or SEGMENT: Changing and Defining Sections - Section 8.3.1: The
__?SECT?__ Macro
- Section 8.4:
ABSOLUTE: Defining Absolute Labels - Section 8.5:
EXTERN: Importing Symbols from Other Modules - Section 8.6:
REQUIRED: Unconditionally Importing Symbols from Other Modules - Section 8.7:
GLOBAL: Exporting Symbols to Other Modules - Section 8.8:
COMMON: Defining Common Data Areas - Section 8.9:
STATIC: Local Symbols within Modules - Section 8.10:
[[GL]PREFIX], [[GL]SUFFIX]: Mangling Symbols - Section 8.11:
CPU: Defining CPU Dependencies - Section 8.12:
[DOLLARHEX]: Enable or disable $ hexadecimal syntax - Section 8.13:
FLOAT: Handling of floating-point constants - Section 8.14:
[WARNING]: Enable or disable warnings - Section 8.15:
[LIST]: Locally disable list file output
- Chapter 9: Output Formats
- Section 9.1:
bin: Flat-Form Binary Output - Section 9.1.1:
ORG: Binary File Program Origin - Section 9.1.2:
bin Extensions to the SECTION Directive - Section 9.1.3: Multisection Support for the
bin Format - Section 9.1.4: Map Files
- Section 9.2:
ith: Intel Hex Output - Section 9.3:
srec: Motorola S-Records Output - Section 9.4:
obj: Microsoft OMF Object Files - Section 9.4.1:
obj Extensions to the SEGMENT Directive - Section 9.4.2:
GROUP: Defining Groups of Segments - Section 9.4.3:
UPPERCASE: Disabling Case Sensitivity in Output - Section 9.4.4:
IMPORT: Importing DLL Symbols - Section 9.4.5:
EXPORT: Exporting DLL Symbols - Section 9.4.6:
..start: Defining the Program Entry Point - Section 9.4.7:
obj Extensions to the EXTERN Directive - Section 9.4.8:
obj Extensions to the COMMON Directive - Section 9.4.9: Embedded File Dependency Information
- Section 9.5:
obj2: OS/2 32-bit OMF Object Files - Section 9.6:
win32: Microsoft Win32 Object Files - Section 9.6.1:
win32 Extensions to the SECTION Directive - Section 9.6.2:
win32: Safe Structured Exception Handling - Section 9.6.3: Debugging formats for Windows
- Section 9.7:
win64: Microsoft Win64 Object Files - Section 9.7.1:
win64: Writing Position-Independent Code - Section 9.7.2:
win64: Structured Exception Handling
- Section 9.8:
coff: Common Object File Format - Section 9.9:
macho32 and macho64: Mach Object File Format - Section 9.9.1:
macho extensions to the SECTION Directive - Section 9.9.2: Thread Local Storage in Mach-O:
macho special symbols and WRT - Section 9.9.3:
macho specific directive subsections_via_symbols - Section 9.9.4:
macho specific directive no_dead_strip - Section 9.9.5:
macho specific extensions to the GLOBAL Directive: private_extern - Section 9.9.6:
macho specific directive build_version
- Section 9.10:
elf32, elf64, elfx32: Executable and Linkable Format Object Files - Section 9.10.1: ELF specific directive
osabi - Section 9.10.2: ELF extensions to the
SECTION Directive - Section 9.10.3: Position-Independent Code: ELF Special Symbols and
WRT - Section 9.10.4: Thread Local Storage in ELF:
elf Special Symbols and WRT - Section 9.10.5:
elf Extensions to the GLOBAL Directive - Section 9.10.6:
elf Extensions to the EXTERN Directive - Section 9.10.7:
elf Extensions to the COMMON Directive - Section 9.10.8: 16-bit code and ELF
- Section 9.10.9: Debug formats and ELF
- Section 9.11:
aout: Linux a.out Object Files - Section 9.12:
aoutb: NetBSD/FreeBSD/OpenBSD a.out Object Files - Section 9.13:
as86: Minix/Linux as86 Object Files - Section 9.14:
dbg: Debugging Format
- Chapter 10: Writing 16-bit Code (DOS, Windows 3/3.1)
- Section 10.1: Producing
.EXE Files - Section 10.1.1: Using the
obj Format To Generate .EXE Files - Section 10.1.2: Using the
bin Format To Generate .EXE Files
- Section 10.2: Producing
.COM Files - Section 10.2.1: Using the
bin Format To Generate .COM Files - Section 10.2.2: Using the
obj Format To Generate .COM Files
- Section 10.3: Producing
.SYS Files - Section 10.4: Interfacing to 16-bit C Programs
- Section 10.4.1: External Symbol Names
- Section 10.4.2: Memory Models
- Section 10.4.3: Function Definitions and Function Calls
- Section 10.4.4: Accessing Data Items
- Section 10.4.5:
c16.mac: Helper Macros for the 16-bit C Interface
- Section 10.5: Interfacing to Borland Pascal Programs
- Section 10.5.1: The Pascal Calling Convention
- Section 10.5.2: Borland Pascal Segment Name Restrictions
- Section 10.5.3: Using
c16.mac With Pascal Programs
- Chapter 11: Writing 32-bit Code (Unix, Win32, DJGPP)
- Section 11.1: Interfacing to 32-bit C Programs
- Section 11.1.1: External Symbol Names
- Section 11.1.2: Function Definitions and Function Calls
- Section 11.1.3: Accessing Data Items
- Section 11.1.4:
c32.mac: Helper Macros for the 32-bit C Interface
- Section 11.2: Writing NetBSD/FreeBSD/OpenBSD and Linux/ELF Shared Libraries
- Section 11.2.1: Obtaining the Address of the GOT
- Section 11.2.2: Finding Your Local Data Items
- Section 11.2.3: Finding External and Common Data Items
- Section 11.2.4: Exporting Symbols to the Library User
- Section 11.2.5: Calling Procedures Outside the Library
- Section 11.2.6: Generating the Library File
- Chapter 12: Mixing 16- and 32-bit Code
- Section 12.1: Mixed-Size Jumps
- Section 12.2: Addressing Between Different-Size Segments
- Section 12.3: Other Mixed-Size Instructions
- Chapter 13: Writing 64-bit Code (Unix, Win64)
- Section 13.1: Register Names in 64-bit Mode
- Section 13.2: Immediates and Displacements in 64-bit Mode
- Section 13.2.1: Immediate 64-bit Operands
- Section 13.2.2: 64-bit Displacements
- Section 13.3: Interfacing to 64-bit C Programs (Unix)
- Section 13.4: Interfacing to 64-bit C Programs (Win64)
- Chapter 14: Troubleshooting
- Section 14.1: Common Problems
- Section 14.1.1: NASM Generates Inefficient Code
- Section 14.1.2: My Jumps are Out of Range
- Section 14.1.3:
ORG Doesn't Work - Section 14.1.4:
TIMES Doesn't Work
Appendices
- Appendix A: List of Warning Classes
- Section A.1: Warning Classes
- Section A.1.1: Enabled by default
- Section A.1.2: Enabled and promoted to error by default
- Section A.1.3: Disabled by default
- Section A.2: Warning Class Groups
- Section A.3: Warning Class Aliases for Backward Compatiblity
- Appendix B: Ndisasm
- Section B.1: Introduction
- Section B.2: Running NDISASM
- Section B.2.1: Specifying the Input Origin
- Section B.2.2: Code Following Data: Synchronization
- Section B.2.3: Mixed Code and Data: Automatic (Intelligent) Synchronization
- Section B.2.4: Other Options
- Appendix C: NASM Version History
- Section C.1: NASM 3 Series
- Section C.1.1: Version 3.01
- Section C.1.2: Version 3.00
- Section C.2: NASM 2 Series
- Section C.2.1: Version 2.16.03
- Section C.2.2: Version 2.16.02
- Section C.2.3: Version 2.16.01
- Section C.2.4: Version 2.16
- Section C.2.5: Version 2.15.05
- Section C.2.6: Version 2.15.04
- Section C.2.7: Version 2.15.03
- Section C.2.8: Version 2.15.02
- Section C.2.9: Version 2.15.01
- Section C.2.10: Version 2.15
- Section C.2.11: Version 2.14.03
- Section C.2.12: Version 2.14.02
- Section C.2.13: Version 2.14.01
- Section C.2.14: Version 2.14
- Section C.2.15: Version 2.13.03
- Section C.2.16: Version 2.13.02
- Section C.2.17: Version 2.13.01
- Section C.2.18: Version 2.13
- Section C.2.19: Version 2.12.02
- Section C.2.20: Version 2.12.01
- Section C.2.21: Version 2.12
- Section C.2.22: Version 2.11.09
- Section C.2.23: Version 2.11.08
- Section C.2.24: Version 2.11.07
- Section C.2.25: Version 2.11.06
- Section C.2.26: Version 2.11.05
- Section C.2.27: Version 2.11.04
- Section C.2.28: Version 2.11.03
- Section C.2.29: Version 2.11.02
- Section C.2.30: Version 2.11.01
- Section C.2.31: Version 2.11
- Section C.2.32: Version 2.10.09
- Section C.2.33: Version 2.10.08
- Section C.2.34: Version 2.10.07
- Section C.2.35: Version 2.10.06
- Section C.2.36: Version 2.10.05
- Section C.2.37: Version 2.10.04
- Section C.2.38: Version 2.10.03
- Section C.2.39: Version 2.10.02
- Section C.2.40: Version 2.10.01
- Section C.2.41: Version 2.10
- Section C.2.42: Version 2.09.10
- Section C.2.43: Version 2.09.09
- Section C.2.44: Version 2.09.08
- Section C.2.45: Version 2.09.07
- Section C.2.46: Version 2.09.06
- Section C.2.47: Version 2.09.05
- Section C.2.48: Version 2.09.04
- Section C.2.49: Version 2.09.03
- Section C.2.50: Version 2.09.02
- Section C.2.51: Version 2.09.01
- Section C.2.52: Version 2.09
- Section C.2.53: Version 2.08.02
- Section C.2.54: Version 2.08.01
- Section C.2.55: Version 2.08
- Section C.2.56: Version 2.07
- Section C.2.57: Version 2.06
- Section C.2.58: Version 2.05.01
- Section C.2.59: Version 2.05
- Section C.2.60: Version 2.04
- Section C.2.61: Version 2.03.01
- Section C.2.62: Version 2.03
- Section C.2.63: Version 2.02
- Section C.2.64: Version 2.01
- Section C.2.65: Version 2.00
- Section C.3: NASM 0.98 Series
- Section C.3.1: Version 0.98.39
- Section C.3.2: Version 0.98.38
- Section C.3.3: Version 0.98.37
- Section C.3.4: Version 0.98.36
- Section C.3.5: Version 0.98.35
- Section C.3.6: Version 0.98.34
- Section C.3.7: Version 0.98.33
- Section C.3.8: Version 0.98.32
- Section C.3.9: Version 0.98.31
- Section C.3.10: Version 0.98.30
- Section C.3.11: Version 0.98.28
- Section C.3.12: Version 0.98.26
- Section C.3.13: Version 0.98.25alt
- Section C.3.14: Version 0.98.25
- Section C.3.15: Version 0.98.24p1
- Section C.3.16: Version 0.98.24
- Section C.3.17: Version 0.98.23
- Section C.3.18: Version 0.98.22
- Section C.3.19: Version 0.98.21
- Section C.3.20: Version 0.98.20
- Section C.3.21: Version 0.98.19
- Section C.3.22: Version 0.98.18
- Section C.3.23: Version 0.98.17
- Section C.3.24: Version 0.98.16
- Section C.3.25: Version 0.98.15
- Section C.3.26: Version 0.98.14
- Section C.3.27: Version 0.98.13
- Section C.3.28: Version 0.98.12
- Section C.3.29: Version 0.98.11
- Section C.3.30: Version 0.98.10
- Section C.3.31: Version 0.98.09
- Section C.3.32: Version 0.98.08
- Section C.3.33: Version 0.98.09b with John Coffman patches released 28-Oct-2001
- Section C.3.34: Version 0.98.07 released 01/28/01
- Section C.3.35: Version 0.98.06f released 01/18/01
- Section C.3.36: Version 0.98.06e released 01/09/01
- Section C.3.37: Version 0.98p1
- Section C.3.38: Version 0.98bf (bug-fixed)
- Section C.3.39: Version 0.98.03 with John Coffman's changes released 27-Jul-2000
- Section C.3.40: Version 0.98.03
- Section C.3.41: Version 0.98
- Section C.3.42: Version 0.98p9
- Section C.3.43: Version 0.98p8
- Section C.3.44: Version 0.98p7
- Section C.3.45: Version 0.98p6
- Section C.3.46: Version 0.98p3.7
- Section C.3.47: Version 0.98p3.6
- Section C.3.48: Version 0.98p3.5
- Section C.3.49: Version 0.98p3.4
- Section C.3.50: Version 0.98p3.3
- Section C.3.51: Version 0.98p3.2
- Section C.3.52: Version 0.98p3-hpa
- Section C.3.53: Version 0.98 pre-release 3
- Section C.3.54: Version 0.98 pre-release 2
- Section C.3.55: Version 0.98 pre-release 1
- Section C.4: NASM 0.90-0.97
- Section C.4.1: Version 0.97 released December 1997
- Section C.4.2: Version 0.96 released November 1997
- Section C.4.3: Version 0.95 released July 1997
- Section C.4.4: Version 0.94 released April 1997
- Section C.4.5: Version 0.93 released January 1997
- Section C.4.6: Version 0.92 released January 1997
- Section C.4.7: Version 0.91 released November 1996
- Section C.4.8: Version 0.90 released October 1996
- Appendix D: Building NASM from Source
- Section D.1: Building from a Source Archive
- Section D.2: Optional Build Tools
- Section D.3: Building Optional Components
- Section D.4: Building from the
git Repository - Section D.5: Modifying the Sources
- Appendix E: Contact Information
- Section E.1: Website
- Section E.1.1: User Forums
- Section E.1.2: Development Community
- Section E.2: Reporting Bugs
- Appendix F: Instruction List
- Section F.1: Introduction
- Section F.1.1: Special instructions (pseudo-ops)
- Section F.1.2: No operation
- Section F.1.3: Integer data move instructions
- Section F.1.4: Load effective address
- Section F.1.5: The basic 8 arithmetic operations
- Section F.1.6: Bitwise testing
- Section F.1.7: The basic shift and rotate operations
- Section F.1.8: APX EVEX versions
- Section F.1.9: Other basic integer arithmetic
- Section F.1.10: Interleaved flags arithmetic
- Section F.1.11: Double width shift
- Section F.1.12: Bit operations
- Section F.1.13: BMI1 and BMI2 bit operations
- Section F.1.14: AMD XOP bit operations
- Section F.1.15: Decimal arithmetic
- Section F.1.16: Endianness handling
- Section F.1.17: Sign and zero extension
- Section F.1.18: Atomic operations
- Section F.1.19: Jumps
- Section F.1.20: Call and return
- Section F.1.21: Interrupts, system calls, and returns
- Section F.1.22: Flag register instructions
- Section F.1.23: String instructions
- Section F.1.24: Synchronization and fencing
- Section F.1.25: Memory management and control
- Section F.1.26: Special reads: timestamp, CPU number, performance counters, randomness
- Section F.1.27: Machine control and management instructions
- Section F.1.28: System management mode
- Section F.1.29: Power management
- Section F.1.30: I/O instructions
- Section F.1.31: Segment handling instructions
- Section F.1.32: x87 floating point
- Section F.1.33: MMX (SIMD using the x87 register file)
- Section F.1.34: Stack operations
- Section F.1.35: MMX instructions
- Section F.1.36: Permanently undefined instructions
- Section F.1.37: Conditional instructions
- Section F.1.38: Katmai Streaming SIMD instructions (SSE –– a.k.a. KNI, XMM, MMX2)
- Section F.1.39: Introduced in Deschutes but necessary for SSE support
- Section F.1.40: XSAVE group (AVX and extended state)
- Section F.1.41: Generic memory operations
- Section F.1.42: New MMX instructions introduced in Katmai
- Section F.1.43: AMD Enhanced 3DNow! (Athlon) instructions
- Section F.1.44: Willamette SSE2 Cacheability Instructions
- Section F.1.45: Willamette MMX instructions (SSE2 SIMD Integer Instructions)
- Section F.1.46: Willamette Streaming SIMD instructions (SSE2)
- Section F.1.47: Prescott New Instructions (SSE3)
- Section F.1.48: VMX/SVM Instructions
- Section F.1.49: Extended Page Tables VMX instructions
- Section F.1.50: SEV-SNP AMD instructions
- Section F.1.51: Tejas New Instructions (SSSE3)
- Section F.1.52: AMD SSE4A
- Section F.1.53: New instructions in Barcelona
- Section F.1.54: Penryn New Instructions (SSE4.1)
- Section F.1.55: Nehalem New Instructions (SSE4.2)
- Section F.1.56: Intel SMX
- Section F.1.57: Geode (Cyrix) 3DNow! additions
- Section F.1.58: Intel new instructions in ???
- Section F.1.59: Intel AES instructions
- Section F.1.60: Intel AVX AES instructions
- Section F.1.61: Intel AES Key Locker
- Section F.1.62: Intel instruction extension based on pub number 319433-030 dated October 2017
- Section F.1.63: Intel AVX instructions
- Section F.1.64: Intel Carry-Less Multiplication instructions (CLMUL)
- Section F.1.65: Intel AVX Carry-Less Multiplication instructions (CLMUL)
- Section F.1.66: Intel Fused Multiply-Add instructions (FMA)
- Section F.1.67: Intel post-32 nm processor instructions
- Section F.1.68: Supervisor Mode Access Prevention (SMAP)
- Section F.1.69: VIA (Centaur) security instructions
- Section F.1.70: AMD Lightweight Profiling (LWP) instructions
- Section F.1.71: AMD XOP and FMA4 instructions (SSE5)
- Section F.1.72: Intel AVX2 instructions
- Section F.1.73: Intel Transactional Synchronization Extensions (TSX)
- Section F.1.74: Intel Memory Protection Extensions (MPX)
- Section F.1.75: Intel SHA acceleration instructions
- Section F.1.76: S3M hash instructions
- Section F.1.77: SM4 hash instructions
- Section F.1.78: AVX no exception conversions
- Section F.1.79: AVX Vector Neural Network Instructions
- Section F.1.80: AVX Vector Neural Network Instructions INT8
- Section F.1.81: AVX Vector Neural Network Instructions INT16
- Section F.1.82: AVX Integer Fused Multiply-Add
- Section F.1.83: AVX-512 mask register instructions
- Section F.1.84: AVX-512 instructions
- Section F.1.85: Intel memory protection keys for userspace (PKU aka PKEYs)
- Section F.1.86: Read Processor ID
- Section F.1.87: Processor trace write
- Section F.1.88: Instructions from the Intel Instruction Set Extensions,
- Section F.1.89: doc 319433-034 May 2018
- Section F.1.90: doc 319433-058 June 2025
- Section F.1.91: Galois field operations (GFNI)
- Section F.1.92: AVX512 Vector Bit Manipulation Instructions 2
- Section F.1.93: AVX512 VNNI
- Section F.1.94: AVX512 Bit Algorithms
- Section F.1.95: AVX512 4-iteration Multiply-Add
- Section F.1.96: AVX512 4-iteration Dot Product
- Section F.1.97: Intel Software Guard Extensions (SGX)
- Section F.1.98: Intel Control-Flow Enforcement Technology (CET)
- Section F.1.99: Instructions from ISE doc 319433-040, June 2020
- Section F.1.100: AVX512 Bfloat16 instructions
- Section F.1.101: AVX512 mask intersect instructions
- Section F.1.102: Intel Advanced Matrix Extensions (AMX)
- Section F.1.103: Intel AVX512-FP16 instructions
- Section F.1.104: RAO-INT weakly ordered atomic operations
- Section F.1.105: User interrupts
- Section F.1.106: Flexible Return and Exception Delivery
- Section F.1.107: History reset
- Section F.1.108: AVX10.2 BF16 instructions
- Section F.1.109: AVX10.2 Compare scalar fp with enhanced eflags instructions
- Section F.1.110: AVX10.2 Convert instructions
- Section F.1.111: AVX10.2 Integer and FP16 VNNI, media new instructions
- Section F.1.112: AVX10.2 MINMAX instructions
- Section F.1.113: AVX10.2 Saturating convert instructions
- Section F.1.114: AVX10.2 Zero-extending partial vector copy instructions
- Section F.1.115: Systematic names for the hinting nop instructions