(This manual is old and full of bugs)

< Here is the updated manual >

The Netwide Assembler: NASM

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: Licence 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 -o Option: Specifying the Output File Name
Section 2.1.2: The -f Option: Specifying the Output File Format
Section 2.1.3: The -l Option: Generating a Listing File
Section 2.1.4: The -M Option: Generate Makefile Dependencies.
Section 2.1.5: The -F Option: Selecting a Debugging Format
Section 2.1.6: The -g Option: Enabling Debug Information.
Section 2.1.7: The -E Option: Send Errors to a File
Section 2.1.8: The -s Option: Send Errors to stdout
Section 2.1.9: The -i Option: Include File Search Directories
Section 2.1.10: The -p Option: Pre-Include a File
Section 2.1.11: The -d Option: Pre-Define a Macro
Section 2.1.12: The -u Option: Undefine a Macro
Section 2.1.13: The -e Option: Preprocess Only
Section 2.1.14: The -a Option: Don't Preprocess At All
Section 2.1.15: The -On Option: Specifying Multipass Optimization.
Section 2.1.16: The -t option: Enable TASM Compatibility Mode
Section 2.1.17: The -w Option: Enable or Disable Assembly Warnings
Section 2.1.18: The -v Option: Display Version Info
Section 2.1.19: The NASM 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

Chapter 3: The NASM Language
Section 3.1: Layout of a NASM Source Line
Section 3.2: Pseudo-Instructions
Section 3.2.1: DB and friends: Declaring Initialised Data
Section 3.2.2: RESB and friends: Declaring Uninitialised 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 Constants
Section 3.4.3: String Constants
Section 3.4.4: Floating-Point Constants
Section 3.5: Expressions
Section 3.5.1: |: Bitwise OR Operator
Section 3.5.2: ^: Bitwise XOR Operator
Section 3.5.3: &: Bitwise AND Operator
Section 3.5.4: << and >>: Bit Shift Operators
Section 3.5.5: + and -: Addition and Subtraction Operators
Section 3.5.6: *, /, //, % and %%: Multiplication and Division
Section 3.5.7: Unary Operators: +, -, ~ and SEG
Section 3.6: SEG and WRT
Section 3.7: Critical Expressions
Section 3.8: Local Labels

Chapter 4: The NASM Preprocessor
Section 4.1: Single-Line Macros
Section 4.1.1: The Normal Way: %define
Section 4.1.2: Undefining macros: %undef
Section 4.1.3: Preprocessor Variables: %assign
Section 4.2: String Handling in Macros: %strlen and %substr
Section 4.2.1: String Length: %strlen
Section 4.2.2: Sub-strings: %substr
Section 4.3: Multi-Line Macros: %macro
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: %0: Macro Parameter Counter
Section 4.3.6: %rotate: Rotating Macro Parameters
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.4: Conditional Assembly
Section 4.4.1: %ifdef: Testing Single-Line Macro Existence
Section 4.4.2: %ifctx: Testing the Context Stack
Section 4.4.3: %if: Testing Arbitrary Numeric Expressions
Section 4.4.4: %ifidn and %ifidni: Testing Exact Text Identity
Section 4.4.5: %ifid, %ifnum, %ifstr: Testing Token Types
Section 4.4.6: %error: Reporting User-Defined Errors
Section 4.5: Preprocessor Loops: %rep
Section 4.6: Including Other Files
Section 4.7: The Context Stack
Section 4.7.1: %push and %pop: Creating and Removing Contexts
Section 4.7.2: Context-Local Labels
Section 4.7.3: Context-Local Single-Line Macros
Section 4.7.4: %repl: Renaming a Context
Section 4.7.5: Example Use of the Context Stack: Block IFs
Section 4.8: Standard Macros
Section 4.8.1: __NASM_MAJOR__ and __NASM_MINOR__: NASM Version
Section 4.8.2: __FILE__ and __LINE__: File Name and Line Number
Section 4.8.3: STRUC and ENDSTRUC: Declaring Structure Data Types
Section 4.8.4: ISTRUC, AT and IEND: Declaring Instances of Structures
Section 4.8.5: ALIGN and ALIGNB: Data Alignment
Section 4.9: TASM Compatible Preprocessor Directives
Section 4.9.1: %arg Directive
Section 4.9.2: %stacksize Directive
Section 4.9.3: %local Directive

Chapter 5: Assembler Directives
Section 5.1: BITS: Specifying Target Processor Mode
Section 5.1.1: USE16 & USE32: Aliases for BITS
Section 5.2: SECTION or SEGMENT: Changing and Defining Sections
Section 5.2.1: The __SECT__ Macro
Section 5.3: ABSOLUTE: Defining Absolute Labels
Section 5.4: EXTERN: Importing Symbols from Other Modules
Section 5.5: GLOBAL: Exporting Symbols to Other Modules
Section 5.6: COMMON: Defining Common Data Areas
Section 5.7: CPU XXX: Defining CPU Dependencies

Chapter 6: Output Formats
Section 6.1: bin: Flat-Form Binary Output
Section 6.1.1: ORG: Binary File Program Origin
Section 6.1.2: bin Extensions to the SECTION Directive
Section 6.2: obj: Microsoft OMF Object Files
Section 6.2.1: obj Extensions to the SEGMENT Directive
Section 6.2.2: GROUP: Defining Groups of Segments
Section 6.2.3: UPPERCASE: Disabling Case Sensitivity in Output
Section 6.2.4: IMPORT: Importing DLL Symbols
Section 6.2.5: EXPORT: Exporting DLL Symbols
Section 6.2.6: ..start: Defining the Program Entry Point
Section 6.2.7: obj Extensions to the EXTERN Directive
Section 6.2.8: obj Extensions to the COMMON Directive
Section 6.3: win32: Microsoft Win32 Object Files
Section 6.3.1: win32 Extensions to the SECTION Directive
Section 6.4: coff: Common Object File Format
Section 6.5: elf: Linux ELFObject Files
Section 6.5.1: elf Extensions to the SECTION Directive
Section 6.5.2: Position-Independent Code: elf Special Symbols and WRT
Section 6.5.3: elf Extensions to the GLOBAL Directive
Section 6.5.4: elf Extensions to the COMMON Directive
Section 6.6: aout: Linux a.out Object Files
Section 6.7: aoutb: NetBSD/FreeBSD/OpenBSD a.out Object Files
Section 6.8: as86: Linux as86 Object Files
Section 6.9: rdf: Relocatable Dynamic Object File Format
Section 6.9.1: Requiring a Library: The LIBRARY Directive
Section 6.9.2: Specifying a Module Name: The MODULE Directive
Section 6.9.3: rdf Extensions to the GLOBAL directive
Section 6.10: dbg: Debugging Format

Chapter 7: Writing 16-bit Code (DOS, Windows 3/3.1)
Section 7.1: Producing .EXE Files
Section 7.1.1: Using the obj Format To Generate .EXE Files
Section 7.1.2: Using the bin Format To Generate .EXE Files
Section 7.2: Producing .COM Files
Section 7.2.1: Using the bin Format To Generate .COM Files
Section 7.2.2: Using the obj Format To Generate .COM Files
Section 7.3: Producing .SYS Files
Section 7.4: Interfacing to 16-bit C Programs
Section 7.4.1: External Symbol Names
Section 7.4.2: Memory Models
Section 7.4.3: Function Definitions and Function Calls
Section 7.4.4: Accessing Data Items
Section 7.4.5: c16.mac: Helper Macros for the 16-bit C Interface
Section 7.5: Interfacing to Borland Pascal Programs
Section 7.5.1: The Pascal Calling Convention
Section 7.5.2: Borland Pascal Segment Name Restrictions
Section 7.5.3: Using c16.mac With Pascal Programs

Chapter 8: Writing 32-bit Code (Unix, Win32, DJGPP)
Section 8.1: Interfacing to 32-bit C Programs
Section 8.1.1: External Symbol Names
Section 8.1.2: Function Definitions and Function Calls
Section 8.1.3: Accessing Data Items
Section 8.1.4: c32.mac: Helper Macros for the 32-bit C Interface
Section 8.2: Writing NetBSD/FreeBSD/OpenBSD and Linux/ELF Shared Libraries
Section 8.2.1: Obtaining the Address of the GOT
Section 8.2.2: Finding Your Local Data Items
Section 8.2.3: Finding External and Common Data Items
Section 8.2.4: Exporting Symbols to the Library User
Section 8.2.5: Calling Procedures Outside the Library
Section 8.2.6: Generating the Library File

Chapter 9: Mixing 16 and 32 Bit Code
Section 9.1: Mixed-Size Jumps
Section 9.2: Addressing Between Different-Size Segments
Section 9.3: Other Mixed-Size Instructions

Chapter 10: Troubleshooting
Section 10.1: Common Problems
Section 10.1.1: NASM Generates Inefficient Code
Section 10.1.2: My Jumps are Out of Range
Section 10.1.3: ORG Doesn't Work
Section 10.1.4: TIMES Doesn't Work
Section 10.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: Intel x86 Instruction Reference
Section B.1: Key to Operand Specifications
Section B.2: Key to Opcode Descriptions
Section B.2.1: Register Values
Section B.2.2: Condition Codes
Section B.2.3: SSE Condition Predicates
Section B.2.4: Status Flags
Section B.2.5: Effective Address Encoding: ModR/M and SIB
Section B.3: Key to Instruction Flags
Section B.4: AAA, AAS, AAM, AAD: ASCII Adjustments
Section B.5: ADC: Add with Carry
Section B.6: ADD: Add Integers
Section B.7: ADDPD: ADD Packed Double-Precision FP Values
Section B.8: ADDPS: ADD Packed Single-Precision FP Values
Section B.9: ADDSD: ADD Scalar Double-Precision FP Values
Section B.10: ADDSS: ADD Scalar Single-Precision FP Values
Section B.11: AND: Bitwise AND
Section B.12: ANDNPD: Bitwise Logical AND NOT of Packed Double-Precision FP Values
Section B.13: ANDNPS: Bitwise Logical AND NOT of Packed Single-Precision FP Values
Section B.14: ANDPD: Bitwise Logical AND For Single FP
Section B.15: ANDPS: Bitwise Logical AND For Single FP
Section B.16: ARPL: Adjust RPL Field of Selector
Section B.17: BOUND: Check Array Index against Bounds
Section B.18: BSF, BSR: Bit Scan
Section B.19: BSWAP: Byte Swap
Section B.20: BT, BTC, BTR, BTS: Bit Test
Section B.21: CALL: Call Subroutine
Section B.22: CBW, CWD, CDQ, CWDE: Sign Extensions
Section B.23: CLC, CLD, CLI, CLTS: Clear Flags
Section B.24: CLFLUSH: Flush Cache Line
Section B.25: CMC: Complement Carry Flag
Section B.26: CMOVcc: Conditional Move
Section B.27: CMP: Compare Integers
Section B.28: CMPccPD: Packed Double-Precision FP Compare
Section B.29: CMPccPS: Packed Single-Precision FP Compare
Section B.30: CMPSB, CMPSW, CMPSD: Compare Strings
Section B.31: CMPccSD: Scalar Double-Precision FP Compare
Section B.32: CMPccSS: Scalar Single-Precision FP Compare
Section B.33: CMPXCHG, CMPXCHG486: Compare and Exchange
Section B.34: CMPXCHG8B: Compare and Exchange Eight Bytes
Section B.35: COMISD: Scalar Ordered Double-Precision FP Compare and Set EFLAGS
Section B.36: COMISS: Scalar Ordered Single-Precision FP Compare and Set EFLAGS
Section B.37: CPUID: Get CPU Identification Code
Section B.38: CVTDQ2PD: Packed Signed INT32 to Packed Double-Precision FP Conversion
Section B.39: CVTDQ2PS: Packed Signed INT32 to Packed Single-Precision FP Conversion
Section B.40: CVTPD2DQ: Packed Double-Precision FP to Packed Signed INT32 Conversion
Section B.41: CVTPD2PI: Packed Double-Precision FP to Packed Signed INT32 Conversion
Section B.42: CVTPD2PS: Packed Double-Precision FP to Packed Single-Precision FP Conversion
Section B.43: CVTPI2PD: Packed Signed INT32 to Packed Double-Precision FP Conversion
Section B.44: CVTPI2PS: Packed Signed INT32 to Packed Single-FP Conversion
Section B.45: CVTPS2DQ: Packed Single-Precision FP to Packed Signed INT32 Conversion
Section B.46: CVTPS2PD: Packed Single-Precision FP to Packed Double-Precision FP Conversion
Section B.47: CVTPS2PI: Packed Single-Precision FP to Packed Signed INT32 Conversion
Section B.48: CVTSD2SI: Scalar Double-Precision FP to Signed INT32 Conversion
Section B.49: CVTSD2SS: Scalar Double-Precision FP to Scalar Single-Precision FP Conversion
Section B.50: CVTSI2SD: Signed INT32 to Scalar Double-Precision FP Conversion
Section B.51: CVTSI2SS: Signed INT32 to Scalar Single-Precision FP Conversion
Section B.52: CVTSS2SD: Scalar Single-Precision FP to Scalar Double-Precision FP Conversion
Section B.53: CVTSS2SI: Scalar Single-Precision FP to Signed INT32 Conversion
Section B.54: CVTTPD2DQ: Packed Double-Precision FP to Packed Signed INT32 Conversion with Truncation
Section B.55: CVTTPD2PI: Packed Double-Precision FP to Packed Signed INT32 Conversion with Truncation
Section B.56: CVTTPS2DQ: Packed Single-Precision FP to Packed Signed INT32 Conversion with Truncation
Section B.57: CVTTPS2PI: Packed Single-Precision FP to Packed Signed INT32 Conversion with Truncation
Section B.58: CVTTSD2SI: Scalar Double-Precision FP to Signed INT32 Conversion with Truncation
Section B.59: CVTTSS2SI: Scalar Single-Precision FP to Signed INT32 Conversion with Truncation
Section B.60: DAA, DAS: Decimal Adjustments
Section B.61: DEC: Decrement Integer
Section B.62: DIV: Unsigned Integer Divide
Section B.63: DIVPD: Packed Double-Precision FP Divide
Section B.64: DIVPS: Packed Single-Precision FP Divide
Section B.65: DIVPD: Scalar Double-Precision FP Divide
Section B.66: DIVSS: Scalar Single-Precision FP Divide
Section B.67: EMMS: Empty MMX State
Section B.68: ENTER: Create Stack Frame
Section B.69: F2XM1: Calculate 2**X-1
Section B.70: FABS: Floating-Point Absolute Value
Section B.71: FADD, FADDP: Floating-Point Addition
Section B.72: FBLD, FBSTP: BCD Floating-Point Load and Store
Section B.73: FCHS: Floating-Point Change Sign
Section B.74: FCLEX, FNCLEX: Clear Floating-Point Exceptions
Section B.75: FCMOVcc: Floating-Point Conditional Move
Section B.76: FCOM, FCOMP, FCOMPP, FCOMI, FCOMIP: Floating-Point Compare
Section B.77: FCOS: Cosine
Section B.78: FDECSTP: Decrement Floating-Point Stack Pointer
Section B.79: FxDISI, FxENI: Disable and Enable Floating-Point Interrupts
Section B.80: FDIV, FDIVP, FDIVR, FDIVRP: Floating-Point Division
Section B.81: FEMMS: Faster Enter/Exit of the MMX or floating-point state
Section B.82: FFREE: Flag Floating-Point Register as Unused
Section B.83: FIADD: Floating-Point/Integer Addition
Section B.84: FICOM, FICOMP: Floating-Point/Integer Compare
Section B.85: FIDIV, FIDIVR: Floating-Point/Integer Division
Section B.86: FILD, FIST, FISTP: Floating-Point/Integer Conversion
Section B.87: FIMUL: Floating-Point/Integer Multiplication
Section B.88: FINCSTP: Increment Floating-Point Stack Pointer
Section B.89: FINIT, FNINIT: Initialise Floating-Point Unit
Section B.90: FISUB: Floating-Point/Integer Subtraction
Section B.91: FLD: Floating-Point Load
Section B.92: FLDxx: Floating-Point Load Constants
Section B.93: FLDCW: Load Floating-Point Control Word
Section B.94: FLDENV: Load Floating-Point Environment
Section B.95: FMUL, FMULP: Floating-Point Multiply
Section B.96: FNOP: Floating-Point No Operation
Section B.97: FPATAN, FPTAN: Arctangent and Tangent
Section B.98: FPREM, FPREM1: Floating-Point Partial Remainder
Section B.99: FRNDINT: Floating-Point Round to Integer
Section B.100: FSAVE, FRSTOR: Save/Restore Floating-Point State
Section B.101: FSCALE: Scale Floating-Point Value by Power of Two
Section B.102: FSETPM: Set Protected Mode
Section B.103: FSIN, FSINCOS: Sine and Cosine
Section B.104: FSQRT: Floating-Point Square Root
Section B.105: FST, FSTP: Floating-Point Store
Section B.106: FSTCW: Store Floating-Point Control Word
Section B.107: FSTENV: Store Floating-Point Environment
Section B.108: FSTSW: Store Floating-Point Status Word
Section B.109: FSUB, FSUBP, FSUBR, FSUBRP: Floating-Point Subtract
Section B.110: FTST: Test ST0 Against Zero
Section B.111: FUCOMxx: Floating-Point Unordered Compare
Section B.112: FXAM: Examine Class of Value in ST0
Section B.113: FXCH: Floating-Point Exchange
Section B.114: FXRSTOR: Restore FP, MMX and SSE State
Section B.115: FXSAVE: Store FP, MMX and SSE State
Section B.116: FXTRACT: Extract Exponent and Significand
Section B.117: FYL2X, FYL2XP1: Compute Y times Log2(X) or Log2(X+1)
Section B.118: HLT: Halt Processor
Section B.119: IBTS: Insert Bit String
Section B.120: IDIV: Signed Integer Divide
Section B.121: IMUL: Signed Integer Multiply
Section B.122: IN: Input from I/O Port
Section B.123: INC: Increment Integer
Section B.124: INSB, INSW, INSD: Input String from I/O Port
Section B.125: INT: Software Interrupt
Section B.126: INT3, INT1, ICEBP, INT01: Breakpoints
Section B.127: INTO: Interrupt if Overflow
Section B.128: INVD: Invalidate Internal Caches
Section B.129: INVLPG: Invalidate TLB Entry
Section B.130: IRET, IRETW, IRETD: Return from Interrupt
Section B.131: Jcc: Conditional Branch
Section B.132: JCXZ, JECXZ: Jump if CX/ECX Zero
Section B.133: JMP: Jump
Section B.134: LAHF: Load AH from Flags
Section B.135: LAR: Load Access Rights
Section B.136: LDMXCSR: Load Streaming SIMD Extension Control/Status
Section B.137: LDS, LES, LFS, LGS, LSS: Load Far Pointer
Section B.138: LEA: Load Effective Address
Section B.139: LEAVE: Destroy Stack Frame
Section B.140: LFENCE: Load Fence
Section B.141: LGDT, LIDT, LLDT: Load Descriptor Tables
Section B.142: LMSW: Load/Store Machine Status Word
Section B.143: LOADALL, LOADALL286: Load Processor State
Section B.144: LODSB, LODSW, LODSD: Load from String
Section B.145: LOOP, LOOPE, LOOPZ, LOOPNE, LOOPNZ: Loop with Counter
Section B.146: LSL: Load Segment Limit
Section B.147: LTR: Load Task Register
Section B.148: MASKMOVDQU: Byte Mask Write
Section B.149: MASKMOVQ: Byte Mask Write
Section B.150: MAXPD: Return Packed Double-Precision FP Maximum
Section B.151: MAXPS: Return Packed Single-Precision FP Maximum
Section B.152: MAXSD: Return Scalar Double-Precision FP Maximum
Section B.153: MAXSD: Return Scalar Single-Precision FP Maximum
Section B.154: MFENCE: Memory Fence
Section B.155: MINPD: Return Packed Double-Precision FP Minimum
Section B.156: MINPS: Return Packed Single-Precision FP Minimum
Section B.157: MINSD: Return Scalar Double-Precision FP Minimum
Section B.158: MINSD: Return Scalar Single-Precision FP Minimum
Section B.159: MOV: Move Data
Section B.160: MOVAPD: Move Aligned Packed Double-Precision FP Values
Section B.161: MOVAPS: Move Aligned Packed Single-Precision FP Values
Section B.162: MOVD: Move Doubleword to/from MMX Register
Section B.163: MOVDQ2Q: Move Quadword from XMM to MMX register.
Section B.164: MOVDQA: Move Aligned Double Quadword
Section B.165: MOVDQU: Move Unaligned Double Quadword
Section B.166: MOVHLPS: Move Packed Single-Precision FP High to Low
Section B.167: MOVHPD: Move High Packed Double-Precision FP
Section B.168: MOVHPS: Move High Packed Single-Precision FP
Section B.169: MOVLHPS: Move Packed Single-Precision FP Low to High
Section B.170: MOVLPD: Move Low Packed Double-Precision FP
Section B.171: MOVLPS: Move Low Packed Single-Precision FP
Section B.172: MOVMSKPD: Extract Packed Double-Precision FP Sign Mask
Section B.173: MOVMSKPS: Extract Packed Single-Precision FP Sign Mask
Section B.174: MOVNTDQ: Move Double Quadword Non Temporal
Section B.175: MOVNTI: Move Doubleword Non Temporal
Section B.176: MOVNTPD: Move Aligned Four Packed Single-Precision FP Values Non Temporal
Section B.177: MOVNTPS: Move Aligned Four Packed Single-Precision FP Values Non Temporal
Section B.178: MOVNTQ: Move Quadword Non Temporal
Section B.179: MOVQ: Move Quadword to/from MMX Register
Section B.180: MOVQ2DQ: Move Quadword from MMX to XMM register.
Section B.181: MOVSB, MOVSW, MOVSD: Move String
Section B.182: MOVSD: Move Scalar Double-Precision FP Value
Section B.183: MOVSS: Move Scalar Single-Precision FP Value
Section B.184: MOVSX, MOVZX: Move Data with Sign or Zero Extend
Section B.185: MOVUPD: Move Unaligned Packed Double-Precision FP Values
Section B.186: MOVUPS: Move Unaligned Packed Single-Precision FP Values
Section B.187: MUL: Unsigned Integer Multiply
Section B.188: MULPD: Packed Single-FP Multiply
Section B.189: MULPS: Packed Single-FP Multiply
Section B.190: MULSD: Scalar Single-FP Multiply
Section B.191: MULSS: Scalar Single-FP Multiply
Section B.192: NEG, NOT: Two's and One's Complement
Section B.193: NOP: No Operation
Section B.194: OR: Bitwise OR
Section B.195: ORPD: Bit-wise Logical OR of Double-Precision FP Data
Section B.196: ORPS: Bit-wise Logical OR of Single-Precision FP Data
Section B.197: OUT: Output Data to I/O Port
Section B.198: OUTSB, OUTSW, OUTSD: Output String to I/O Port
Section B.199: PACKSSDW, PACKSSWB, PACKUSWB: Pack Data
Section B.200: PADDB, PADDW, PADDD: Add Packed Integers
Section B.201: PADDQ: Add Packed Quadword Integers
Section B.202: PADDSB, PADDSW: Add Packed Signed Integers With Saturation
Section B.203: PADDSIW: MMX Packed Addition to Implicit Destination
Section B.204: PADDUSB, PADDUSW: Add Packed Unsigned Integers With Saturation
Section B.205: PAND, PANDN: MMX Bitwise AND and AND-NOT
Section B.206: PAUSE: Spin Loop Hint
Section B.207: PAVEB: MMX Packed Average
Section B.208: PAVGB PAVGW: Average Packed Integers
Section B.209: PAVGUSB: Average of unsigned packed 8-bit values
Section B.210: PCMPxx: Compare Packed Integers.
Section B.211: PDISTIB: MMX Packed Distance and Accumulate with Implied Register
Section B.212: PEXTRW: Extract Word
Section B.213: PF2ID: Packed Single-Precision FP to Integer Convert
Section B.214: PF2IW: Packed Single-Precision FP to Integer Word Convert
Section B.215: PFACC: Packed Single-Precision FP Accumulate
Section B.216: PFADD: Packed Single-Precision FP Addition
Section B.217: PFCMPxx: Packed Single-Precision FP Compare
Section B.218: PFMAX: Packed Single-Precision FP Maximum
Section B.219: PFMIN: Packed Single-Precision FP Minimum
Section B.220: PFMUL: Packed Single-Precision FP Multiply
Section B.221: PFNACC: Packed Single-Precision FP Negative Accumulate
Section B.222: PFNACC: Packed Single-Precision FP Mixed Accumulate
Section B.223: PFRCP: Packed Single-Precision FP Reciprocal Approximation
Section B.224: PFRCPIT1: Packed Single-Precision FP Reciprocal, First Iteration Step
Section B.225: PFRCPIT2: Packed Single-Precision FP Reciprocal/ Reciprocal Square Root, Second Iteration Step
Section B.226: PFRSQIT1: Packed Single-Precision FP Reciprocal Square Root, First Iteration Step
Section B.227: PFRSQRT: Packed Single-Precision FP Reciprocal Square Root Approximation
Section B.228: PFSUB: Packed Single-Precision FP Subtract
Section B.229: PFSUBR: Packed Single-Precision FP Reverse Subtract
Section B.230: PI2FD: Packed Doubleword Integer to Single-Precision FP Convert
Section B.231: PF2IW: Packed Word Integer to Single-Precision FP Convert
Section B.232: PINSRW: Insert Word
Section B.233: PMACHRIW: Packed Multiply and Accumulate with Rounding
Section B.234: PMADDWD: MMX Packed Multiply and Add
Section B.235: PMAGW: MMX Packed Magnitude
Section B.236: PMAXSW: Packed Signed Integer Word Maximum
Section B.237: PMAXUB: Packed Unsigned Integer Byte Maximum
Section B.238: PMINSW: Packed Signed Integer Word Minimum
Section B.239: PMINUB: Packed Unsigned Integer Byte Minimum
Section B.240: PMOVMSKB: Move Byte Mask To Integer
Section B.241: PMULHRWC, PMULHRIW: Multiply Packed 16-bit Integers With Rounding, and Store High Word
Section B.242: PMULHRWA: Multiply Packed 16-bit Integers With Rounding, and Store High Word
Section B.243: PMULHUW: Multiply Packed 16-bit Integers, and Store High Word
Section B.244: PMULHW, PMULLW: Multiply Packed 16-bit Integers, and Store
Section B.245: PMULUDQ: Multiply Packed Unsigned 32-bit Integers, and Store.
Section B.246: PMVccZB: MMX Packed Conditional Move
Section B.247: POP: Pop Data from Stack
Section B.248: POPAx: Pop All General-Purpose Registers
Section B.249: POPFx: Pop Flags Register
Section B.250: POR: MMX Bitwise OR
Section B.251: PREFETCH: Prefetch Data Into Caches
Section B.252: PREFETCHh: Prefetch Data Into Caches
Section B.253: PSADBW: Packed Sum of Absolute Differences
Section B.254: PSHUFD: Shuffle Packed Doublewords
Section B.255: PSHUFHW: Shuffle Packed High Words
Section B.256: PSHUFLW: Shuffle Packed Low Words
Section B.257: PSHUFW: Shuffle Packed Words
Section B.258: PSLLx: Packed Data Bit Shift Left Logical
Section B.259: PSRAx: Packed Data Bit Shift Right Arithmetic
Section B.260: PSRLx: Packed Data Bit Shift Right Logical
Section B.261: PSUBx: Subtract Packed Integers
Section B.262: PSUBSxx, PSUBUSx: Subtract Packed Integers With Saturation
Section B.263: PSUBSIW: MMX Packed Subtract with Saturation to Implied Destination
Section B.264: PSWAPD: Swap Packed Data
Section B.265: PUNPCKxxx: Unpack and Interleave Data
Section B.266: PUSH: Push Data on Stack
Section B.267: PUSHAx: Push All General-Purpose Registers
Section B.268: PUSHFx: Push Flags Register
Section B.269: PXOR: MMX Bitwise XOR
Section B.270: RCL, RCR: Bitwise Rotate through Carry Bit
Section B.271: RCPPS: Packed Single-Precision FP Reciprocal
Section B.272: RCPSS: Scalar Single-Precision FP Reciprocal
Section B.273: RDMSR: Read Model-Specific Registers
Section B.274: RDPMC: Read Performance-Monitoring Counters
Section B.275: RDSHR: Read SMM Header Pointer Register
Section B.276: RDTSC: Read Time-Stamp Counter
Section B.277: RET, RETF, RETN: Return from Procedure Call
Section B.278: ROL, ROR: Bitwise Rotate
Section B.279: RSDC: Restore Segment Register and Descriptor
Section B.280: RSLDT: Restore Segment Register and Descriptor
Section B.281: RSM: Resume from System-Management Mode
Section B.282: RSQRTPS: Packed Single-Precision FP Square Root Reciprocal
Section B.283: RSQRTSS: Scalar Single-Precision FP Square Root Reciprocal
Section B.284: RSTS: Restore TSR and Descriptor
Section B.285: SAHF: Store AH to Flags
Section B.286: SAL, SAR: Bitwise Arithmetic Shifts
Section B.287: SALC: Set AL from Carry Flag
Section B.288: SBB: Subtract with Borrow
Section B.289: SCASB, SCASW, SCASD: Scan String
Section B.290: SETcc: Set Register from Condition
Section B.291: SFENCE: Store Fence
Section B.292: SGDT, SIDT, SLDT: Store Descriptor Table Pointers
Section B.293: SHL, SHR: Bitwise Logical Shifts
Section B.294: SHLD, SHRD: Bitwise Double-Precision Shifts
Section B.295: SHUFPD: Shuffle Packed Double-Precision FP Values
Section B.296: SHUFPS: Shuffle Packed Single-Precision FP Values
Section B.297: SMI: System Management Interrupt
Section B.298: SMINT, SMINTOLD: Software SMM Entry (CYRIX)
Section B.299: SMSW: Store Machine Status Word
Section B.300: SQRTPD: Packed Double-Precision FP Square Root
Section B.301: SQRTPS: Packed Single-Precision FP Square Root
Section B.302: SQRTSD: Scalar Double-Precision FP Square Root
Section B.303: SQRTSS: Scalar Single-Precision FP Square Root
Section B.304: STC, STD, STI: Set Flags
Section B.305: STMXCSR: Store Streaming SIMD Extension Control/Status
Section B.306: STOSB, STOSW, STOSD: Store Byte to String
Section B.307: STR: Store Task Register
Section B.308: SUB: Subtract Integers
Section B.309: SUBPD: Packed Double-Precision FP Subtract
Section B.310: SUBPS: Packed Single-Precision FP Subtract
Section B.311: SUBSD: Scalar Single-FP Subtract
Section B.312: SUBSS: Scalar Single-FP Subtract
Section B.313: SVDC: Save Segment Register and Descriptor
Section B.314: SVLDT: Save LDTR and Descriptor
Section B.315: SVTS: Save TSR and Descriptor
Section B.316: SYSCALL: Call Operating System
Section B.317: SYSENTER: Fast System Call
Section B.318: SYSEXIT: Fast Return From System Call
Section B.319: SYSRET: Return From Operating System
Section B.320: TEST: Test Bits (notional bitwise AND)
Section B.321: UCOMISD: Unordered Scalar Double-Precision FP compare and set EFLAGS
Section B.322: UCOMISS: Unordered Scalar Single-Precision FP compare and set EFLAGS
Section B.323: UD0, UD1, UD2: Undefined Instruction
Section B.324: UMOV: User Move Data
Section B.325: UNPCKHPD: Unpack and Interleave High Packed Double-Precision FP Values
Section B.326: UNPCKHPS: Unpack and Interleave High Packed Single-Precision FP Values
Section B.327: UNPCKLPD: Unpack and Interleave Low Packed Double-Precision FP Data
Section B.328: UNPCKLPS: Unpack and Interleave Low Packed Single-Precision FP Data
Section B.329: VERR, VERW: Verify Segment Readability/Writability
Section B.330: WAIT: Wait for Floating-Point Processor
Section B.331: WBINVD: Write Back and Invalidate Cache
Section B.332: WRMSR: Write Model-Specific Registers
Section B.333: WRSHR: Write SMM Header Pointer Register
Section B.334: XADD: Exchange and Add
Section B.335: XBTS: Extract Bit String
Section B.336: XCHG: Exchange
Section B.337: XLATB: Translate Byte in Lookup Table
Section B.338: XOR: Bitwise Exclusive OR
Section B.339: XORPD: Bitwise Logical XOR of Double-Precision FP Values
Section B.340: XORPS: Bitwise Logical XOR of Single-Precision FP Values

Index
rohit