Pseudo-Instruction declaring initialized data. Byte (1 byte, 8 bit). DB is a synonym of BYTE
Pseudo-Instruction declaring initialized data. Word, Half Precision (2 bytes, 16 bit). DW is a synonym of WORD.
Pseudo-Instruction declaring initialized data. Double Word, Single Precision (4 bytes, 32 bit). DD is a synonym of DWORD.
Pseudo-Instruction declaring initialized data. Quad word, Double Precision (8 bytes, 64 bit). DQ is a synonym of QWORD.
Pseudo-Instruction declaring initialized data. Extended (Double) Precision (10 bytes, 80 bit). DT is a synonym of TBYTE.
Pseudo-Instruction declaring initialized data. IEEE 754-2008 Quad Precision (16 bytes, 128 bit), DO is a synonym of OWORD.
Pseudo-Instruction declaring initialized data. (32 bytes, 256 bit). DY is a synonym of YWORD.
Pseudo-Instruction declaring initialized data. (64 bytes, 512 bit). DZ is a synonym of ZWORD.
Pseudo-Instruction declaring uninitialized data. Byte (1 byte, 8 bit). RESB is a synonym of BYTE
Pseudo-Instruction declaring uninitialized data. Word, Half Precision (2 bytes, 16 bit). RESW is a synonym of WORD.
Pseudo-Instruction declaring uninitialized data. Double Word, Single Precision (4 bytes, 32 bit). RESD is a synonym of DWORD.
Pseudo-Instruction declaring uninitialized data. Quad word, Double Precision (8 bytes, 64 bit). RESQ is a synonym of QWORD.
Pseudo-Instruction declaring uninitialized data. Extended (Double) Precision (10 bytes, 80 bit). REST is a synonym of TBYTE.
Pseudo-Instruction declaring uninitialized data. IEEE 754-2008 Quad Precision (16 bytes, 128 bit), RESO is a synonym of OWORD.
Pseudo-Instruction declaring uninitialized data. (32 bytes, 256 bit). RESY is a synonym of YWORD.
Pseudo-Instruction declaring uninitialized data. (64 bytes, 512 bit). RESZ is a synonym of ZWORD.
Pseudo-Instruction declaring uninitialized data. Byte (1 byte, 8 bit)
Pseudo-Instruction declaring uninitialized data. Signed Byte (1 byte, 8 bit)
Pseudo-Instruction declaring uninitialized data. Word, Half Precision (2 bytes, 16 bit)
Pseudo-Instruction declaring uninitialized data. Signed Word, Half Precision (2 bytes, 16 bit)
Pseudo-Instruction declaring uninitialized data. Double Word, Single Precision (4 bytes, 32 bit)
Pseudo-Instruction declaring uninitialized data. Signed Double Word, Single Precision (4 bytes, 32 bit)
Pseudo-Instruction declaring uninitialized data. Quad word, Double Precision (8 bytes, 64 bit)
Pseudo-Instruction declaring uninitialized data. Quad word, Double Precision (8 bytes, 64 bit)
Pseudo-Instruction declaring uninitialized data. Extended (Double) Precision (10 bytes, 80 bit)
Pseudo-Instruction declaring uninitialized data. (16 bytes, 128 bit)
Pseudo-Instruction declaring uninitialized data. IEEE 754-2008 Quad Precision (16 bytes, 128 bit)
Pseudo-Instruction declaring uninitialized data. (32 bytes, 256 bit)
Pseudo-Instruction declaring uninitialized data. (32 bytes, 256 bit)
Pseudo-Instruction declaring uninitialized data. (64 bytes, 512 bit)
Pseudo-Instruction declaring uninitialized data. (64 bytes, 512 bit)
EQU defines a symbol to a given constant value: when EQU is used, the source line must contain a label. The action of EQU is to define the given label name to the value of its (only) operand. This definition is absolute, and cannot change later.
Inserts source code from the source file given by filename into the current source file during assembly.
The BITS directive specifies whether NASM should generate code designed to run on a processor operating in 16-bit mode, 32-bit mode or 64-bit mode. The syntax is BITS XX, where XX is 16, 32 or 64.
Define Single-line macros that is resolved at the time the embedded macro is expanded.
Define Single-line macros that is resolved at the time the embedded macro is defined.
Define case-insensitive single-line macros that is resolved at the time the embedded macro is defined.
Define Single-line macros can be removed with the %undef directive.
Single-line macros can be removed with the %undef directive.
Define single-line macros.
Define case-insensitive single-line macros.
%defstr, and its case-insensitive counterpart %idefstr, define or redefine a single-line macro without parameters but converts the entire right-hand side, after macro expansion, to a quoted string before definition.
%defstr, and its case-insensitive counterpart %idefstr, define or redefine a single-line macro without parameters but converts the entire right-hand side, after macro expansion, to a quoted string before definition.
%deftok, and its case-insensitive counterpart %ideftok, define or redefine a single-line macro without parameters but converts the second parameter, after string conversion, to a sequence of tokens.
%deftok, and its case-insensitive counterpart %ideftok, define or redefine a single-line macro without parameters but converts the second parameter, after string conversion, to a sequence of tokens.
The %strcat operator concatenates quoted strings and assign them to a single-line macro.
The %strlen operator assigns the length of a string to a macro.
Individual letters or substrings in strings can be extracted using the %substr operator.
Start a multiline macro
End a multiline macro, started with %macro.
Multi-line macros can be removed with the %unmacro directive. Unlike the %undef directive, however, %unmacro takes an argument specification, and will only remove exact matches with that argument specification.
Conditional Assembly.
Conditional Assembly.
Conditional Assembly.
Conditional Assembly.
Testing Single-Line Macro Existence.
Testing Multi-Line Macro Existence. The %ifmacro directive operates in the same way as the %ifdef directive, except that it checks for the existence of a multi-line macro.
Testing the Context Stack. The %ifmacro directive operates in the same way as the %ifdef directive, except that it checks for the existence of a multi-line macro.
Testing Exact Text Identity. The construct %ifidn text1,text2 will cause the subsequent code to be assembled if and only if text1 and text2, after expanding single-line macros, are identical pieces of text. Differences in white space are not counted.
Testing Exact Text Identity. The construct %ifidni text1,text2 will cause the subsequent code to be assembled if and only if text1 and text2, after expanding single-line macros, are identical pieces of text (case-insensitive). Differences in white space are not counted.
Testing Token Types. The conditional assembly construct %ifid, taking one parameter (which may be blank), assembles the subsequent code if and only if the first token in the parameter exists and is an identifier.
Testing Token Types. The conditional assembly construct %ifnum, taking one parameter (which may be blank), assembles the subsequent code if and only if the first token in the parameter exists and is a number.
Testing Token Types. The conditional assembly construct %ifstr, taking one parameter (which may be blank), assembles the subsequent code if and only if the first token in the parameter exists and is a string.
Test for a Single Token. The conditional assembly construct %iftoken assembles the subsequent code if and only if the expanded parameters consist of exactly one token, possibly surrounded by whitespace.
Test for Empty Expansion. The conditional assembly construct %ifempty assembles the subsequent code if and only if the expanded parameters do not contain any tokens at all, whitespace excepted.
Test If Environment Variable Exists. The conditional assembly construct %ifenv assembles the subsequent code if and only if the environment variable referenced by the %!env directive exists.
The directives %rep and %endrep (%rep takes a numeric argument, which can be an expression; %endrep takes no arguments) can be used to enclose a chunk of code, which is then replicated as many times as specified by the preprocessor.
Inserts source code from the source file given by filename into the current source file during assembly.
Search the Include Path.
Add Dependent Files.
Include Standard Macro Package.
Creating and Removing Contexts.
Creating and Removing Contexts.
Renaming a Context.
The %arg directive is used to simplify the handling of parameters passed on the stack.
The %STACKSIZE directive is used in conjunction with the %arg and the %local directives. It tells NASM the default size to use for subsequent %arg and %local directives. The %stacksize directive takes one required argument which is one of flat, flat64, large or small.
The %LOCAL directive is used to simplify the use of local temporary stack variables allocated in a stack frame. Automatic local variables in C are an example of this kind of variable.
The preprocessor directive %error will cause NASM to report an error if it occurs in assembled code.
The preprocessor directive %warning will cause NASM to report an warning (but allows assembly to continue) if it occurs in assembled code.
The preprocessor directive %warning will cause NASM to terminate immediately, regardless of pass.
The %line directive is used to notify NASM that the input line corresponds to a specific line number in another file.
Expands to the major level part of th version number of NASM being used.
Expands to the minor level part of th version number of NASM being used.
Expands to the subminor level part of th version number of NASM being used.
Expands to the patch level part of th version number of NASM being used.
Expands to a dword integer representing the full version number of the version of nasm being used. The value is the equivalent to __NASM_MAJOR__, __NASM_MINOR__, __NASM_SUBMINOR__ and ___NASM_PATCHLEVEL__ concatenated to produce a single doubleword.
Expands to a string which defines the version number of nasm being used.
Expands to a string constant giving the name of the current input file (which may change through the course of assembly if %include directives are used)
Expands to a numeric constant giving the current line number in the input file.
The __BITS__ standard macro is updated every time that the BITS mode is set using the BITS XX or [BITS XX] directive, where XX is a valid mode number of 16, 32 or 64.
The __OUTPUT_FORMAT__ standard macro holds the current Output Format, as given by the -f option or NASM's default.
Gives the assembly date as a string in ISO 8601 format ("YYYY-MM-DD").
Gives the assembly time as a string in ISO 8601 format ("HH:MM:SS").
Gives the assembly date in numeric form (YYYYMMDD).
Gives the assembly time in numeric form (HHMMSS).
Gives the assembly date in universal time (UTC) as a string in ISO 8601 format ("YYYY-MM-DD"). If the host platform doesn't provide UTC time, this macro is undefined.
Gives the assembly time in universal time (UTC) as a string in ISO 8601 format ("HH:MM:SS"). If the host platform doesn't provide UTC time, this macro is undefined.
Gives the assembly date in universal time (UTC) in numeric form (YYYYMMDD). If the host platform doesn't provide UTC time, this macro is undefined.
Gives the assembly time in universal time (UTC) in numeric form (HHMMSS). If the host platform doesn't provide UTC time, this macro is undefined.
Expands to a number containing the number of seconds since the POSIX epoch, 1 January 1970 00:00:00 UTC; excluding any leap seconds. This is computed using UTC time if available on the host platform, otherwise it is computed using the local time as if it was UTC.
Used to define a structure data type. STRUC takes one or two parameters. The first parameter is the name of the data type. The second, optional parameter is the base offset of the structure.
Used along with STRUC to define a structure data type.
Used to declare instances of a structure type.
Used along with ISTRUC to declare instances of a structure type.
The ALIGN and ALIGNB macros provides a convenient way to align code or data on a word, longword, paragraph or other boundary. Normally, you can just use ALIGN in code and data sections and ALIGNB in BSS sections, and never need the second argument except for special purposes.
The ALIGN and ALIGNB macros provides a convenient way to align code or data on a word, longword, paragraph or other boundary. Normally, you can just use ALIGN in code and data sections and ALIGNB in BSS sections, and never need the second argument except for special purposes.
The SECTALIGN macros provides a way to modify alignment attribute of output file section.
Includes a binary file verbatim into the output file.
The TIMES prefix causes the instruction to be assembled multiple times.
Used along with ISTRUC to declare instances of a structure type. The function of the AT macro is to make use of the TIMES prefix to advance the assembly position to the correct point for the specified structure field, and then to declare the specified data.
switch to INTEL syntax
switch to AT&T syntax