summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-22 05:40:50 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-22 05:40:50 +0000
commitae438913afd0f78551e7c652d5250868feae7d01 (patch)
treeee3b1816a72ebb9db901b0cef68728d121e111ed /doc
parent4c8aaa01b5fea516980421b3cd6d402129eb58c6 (diff)
downloadnasm-ae438913afd0f78551e7c652d5250868feae7d01.tar.gz
Document the STRICT keyword
Diffstat (limited to 'doc')
-rw-r--r--doc/nasmdoc.src21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index c8549170..02f8387d 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -187,7 +187,6 @@ Object File Format
\IA{standard section names}{standardised section names}
\IR{symbols, exporting from dlls} symbols, exporting from DLLs
\IR{symbols, importing from dlls} symbols, importing from DLLs
-\IR{tasm} \c{TASM}
\IR{test subdirectory} \c{test} subdirectory
\IR{tlink} \c{TLINK}
\IR{underscore, in c symbols} underscore, in C symbols
@@ -1480,6 +1479,26 @@ NASM supports no convenient synonym for this, though you can always
invent one using the macro processor.
+\H{strict} \i\c{STRICT}: Inhibiting Optimization
+
+When compiling with the optimizer set to level 2 or higher (see
+\k{opt-On}), NASM will use size specifiers (\c{BYTE}, \c{WORD},
+\c{DWORD}, \c{QWORD}, or \c{TWORD}) strictly to choose the address- or
+operand-size of the instruction. 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
+
+is encoded in three bytes \c{66 6A 21}, whereas
+
+\c push strict dword 33
+
+is encoded in six bytes, with a full dword immediate operand \c{66 68
+21 00 00 00}.
+
+
\H{crit} \i{Critical Expressions}
A limitation of NASM is that it is a \i{two-pass assembler}; unlike