diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-10-02 18:25:19 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-10-02 18:28:49 -0700 |
commit | 9d5461069d80d0201efb1e98d31a29fdc0fcfbce (patch) | |
tree | 011fbf0a026325d6657c72cb06c9d4993dc01c18 /doc/nasmdoc.src | |
parent | a9ecfa5ae8ef8c770955c6aaf23a49f92ef576b5 (diff) | |
download | nasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.tar.gz nasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.tar.bz2 nasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.zip |
Add support for DZ and RESZ, document the ZWORD keyword
Add the DZ and RESZ pseudoinstructions and add ZWORD to the
documentation.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'doc/nasmdoc.src')
-rw-r--r-- | doc/nasmdoc.src | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index 8386eac..bfd7593 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -1,6 +1,6 @@ \# -------------------------------------------------------------------------- \# -\# Copyright 1996-2012 The NASM Authors - All Rights Reserved +\# Copyright 1996-2013 The NASM Authors - All Rights Reserved \# See the file AUTHORS included with the NASM distribution for \# the specific copyright holders. \# @@ -1264,18 +1264,18 @@ indicate what size of \i{memory operand} it refers to. Pseudo-instructions are things which, though not real x86 machine instructions, are used in the instruction field anyway because that's the most convenient place to put them. The current pseudo-instructions -are \i\c{DB}, \i\c{DW}, \i\c{DD}, \i\c{DQ}, \i\c{DT}, \i\c{DO} and -\i\c{DY}; their \i{uninitialized} counterparts \i\c{RESB}, \i\c{RESW}, -\i\c{RESD}, \i\c{RESQ}, \i\c{REST}, \i\c{RESO} and \i\c{RESY}; the -\i\c{INCBIN} command, the \i\c{EQU} command, and the \i\c{TIMES} -prefix. +are \i\c{DB}, \i\c{DW}, \i\c{DD}, \i\c{DQ}, \i\c{DT}, \i\c{DO}, +\i\c{DY} and \i\c\{DZ}; their \i{uninitialized} counterparts +\i\c{RESB}, \i\c{RESW}, \i\c{RESD}, \i\c{RESQ}, \i\c{REST}, +\i\c{RESO}, \i\c{RESY} and \i\c\{RESZ}; the \i\c{INCBIN} command, the +\i\c{EQU} command, and the \i\c{TIMES} prefix. \S{db} \c{DB} and Friends: Declaring Initialized Data -\i\c{DB}, \i\c{DW}, \i\c{DD}, \i\c{DQ}, \i\c{DT}, \i\c{DO} and -\i\c{DY} are used, much as in MASM, to declare initialized data in the -output file. They can be invoked in a wide range of ways: +\i\c{DB}, \i\c{DW}, \i\c{DD}, \i\c{DQ}, \i\c{DT}, \i\c{DO}, \i\c{DY} +and \i\c{DZ} are used, much as in MASM, to declare initialized data in +the output file. They can be invoked in a wide range of ways: \I{floating-point}\I{character constant}\I{string constant} \c db 0x55 ; just the byte 0x55 @@ -1292,20 +1292,21 @@ output file. They can be invoked in a wide range of ways: \c dq 1.234567e20 ; double-precision float \c dt 1.234567e20 ; extended-precision float -\c{DT}, \c{DO} and \c{DY} do not accept \i{numeric constants} as operands. +\c{DT}, \c{DO}, \c{DY} and \c{DZ} do not accept \i{numeric constants} +as operands. \S{resb} \c{RESB} and Friends: Declaring \i{Uninitialized} Data -\i\c{RESB}, \i\c{RESW}, \i\c{RESD}, \i\c{RESQ}, \i\c{REST}, \i\c{RESO} -and \i\c{RESY} are designed to be used in the BSS section of a module: -they declare \e{uninitialized} storage space. Each takes a single -operand, which is the number of bytes, words, doublewords or whatever -to reserve. As stated in \k{qsother}, NASM does not support the -MASM/TASM syntax of reserving uninitialized space by writing -\I\c{?}\c{DW ?} or similar things: this is what it does instead. The -operand to a \c{RESB}-type pseudo-instruction is a \i\e{critical -expression}: see \k{crit}. +\i\c{RESB}, \i\c{RESW}, \i\c{RESD}, \i\c{RESQ}, \i\c{REST}, +\i\c{RESO}, \i\c{RESY} and \i\c\{RESZ} are designed to be used in the +BSS section of a module: they declare \e{uninitialized} storage +space. Each takes a single operand, which is the number of bytes, +words, doublewords or whatever to reserve. As stated in \k{qsother}, +NASM does not support the MASM/TASM syntax of reserving uninitialized +space by writing \I\c{?}\c{DW ?} or similar things: this is what it +does instead. The operand to a \c{RESB}-type pseudo-instruction is a +\i\e{critical expression}: see \k{crit}. For example: @@ -1313,6 +1314,7 @@ For example: \c wordvar: resw 1 ; reserve a word \c realarray resq 10 ; array of ten reals \c ymmval: resy 1 ; one YMM register +\c zmmvals: resz 32 ; 32 ZMM registers \S{incbin} \i\c{INCBIN}: Including External \i{Binary Files} @@ -1866,11 +1868,11 @@ invent one using the macro processor. When assembling with the optimizer set to level 2 or higher (see \k{opt-O}), NASM will use size specifiers (\c{BYTE}, \c{WORD}, -\c{DWORD}, \c{QWORD}, \c{TWORD}, \c{OWORD} or \c{YWORD}), but will -give them the smallest possible size. The keyword \c{STRICT} can be -used to inhibit optimization and force a particular operand to be -emitted in the specified size. For example, with the optimizer on, and -in \c{BITS 16} mode, +\c{DWORD}, \c{QWORD}, \c{TWORD}, \c{OWORD}, \c{YWORD} or \c{ZWORD}), +but will give them the smallest possible size. The keyword \c{STRICT} +can be used to inhibit optimization and force a particular operand to +be emitted in the specified size. For example, with the optimizer on, +and in \c{BITS 16} mode, \c push dword 33 |