"Fossies" - the Fresh Open Source Software Archive

Member "nasm-2.15.05/doc/html/nasmdocc.html" (28 Aug 2020, 119394 Bytes) of package /linux/misc/nasm-2.15.05-xdoc.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    3 <html xmlns="http://www.w3.org/1999/xhtml">
    4 <head>
    5 <title>NASM - The Netwide Assembler</title>
    6 <link href="nasmdoc.css" rel="stylesheet" type="text/css" />
    7 <link href="local.css" rel="stylesheet" type="text/css" />
    8 </head>
    9 <body>
   10 <ul class="navbar">
   11 <li class="first"><a class="prev" href="nasmdocb.html">Appendix B</a></li>
   12 <li><a class="next" href="nasmdocd.html">Appendix D</a></li>
   13 <li><a class="toc" href="nasmdoc0.html">Contents</a></li>
   14 <li class="last"><a class="index" href="nasmdoci.html">Index</a></li>
   15 </ul>
   16 <div class="title">
   17 <h1>NASM - The Netwide Assembler</h1>
   18 <span class="subtitle">version 2.15.05</span>
   19 </div>
   20 <div class="contents"
   21 >
   22 <h2 id="appendix-C">Appendix C: NASM Version History</h2>
   23 <h3 id="section-C.1">C.1 NASM 2 Series</h3>
   24 <p>The NASM 2 series supports x86-64, and is the production version of NASM
   25 since 2007.</p>
   26 <h4 id="section-C.1.1">C.1.1 Version 2.15.05</h4>
   27 <ul>
   28 <li>
   29 <p>Correct <code>%ifid $</code> and <code>%ifid $$</code> being treated as
   30 true. See <a href="nasmdoc4.html#section-4.4.6">section 4.4.6</a>.</p>
   31 </li>
   32 <li>
   33 <p>Add <code>--reproducible</code> option to suppress NASM version numbers
   34 and timestamps in output files. See
   35 <a href="nasmdoc2.html#section-2.1.34">section 2.1.34</a>.</p>
   36 </li>
   37 </ul>
   38 <h4 id="section-C.1.2">C.1.2 Version 2.15.04</h4>
   39 <ul>
   40 <li>
   41 <p>More sensible handling of the case where one single-line macro
   42 definition will shadow another. A warning will be issued, but the
   43 additional definition will be allowed. For the existing error case where
   44 both a parameterless and parametered macro are created, that warning is
   45 promoted to an error by default.</p>
   46 </li>
   47 <li>
   48 <p>Add special preprocessor tokens <code>%*?</code> and <code>%*??</code>
   49 that expand like <code>%?</code> and <code>%??</code> in single-line macros
   50 only. See <a href="nasmdoc4.html#section-4.1.6">section 4.1.6</a>.</p>
   51 </li>
   52 <li>
   53 <p>Correct the encoding of the <code>ENQCMDS</code> and
   54 <code>TILELOADT1</code> instructions.</p>
   55 </li>
   56 <li>
   57 <p>Fix case where the COFF backend (the <code>coff</code>,
   58 <code>win32</code> and <code>win64</code> output formats) would add padding
   59 bytes in the middle of a section if a
   60 <code>SECTION</code>/<code>SEGMENT</code> directive was provided which
   61 repeated an <code>ALIGN=</code> attribute. This neither matched legacy
   62 behavior, other backends, or user expectations.</p>
   63 </li>
   64 <li>
   65 <p>Fix SSE instructions not being recognized with an explicit memory
   66 operation size (e.g. <code>movsd qword [eax],xmm0</code>).</p>
   67 </li>
   68 <li>
   69 <p>The <code>-L+</code> option no longer enables <code>-Lw</code>, which is
   70 mainly useful to debug NASM crashes. See
   71 <a href="nasmdoc2.html#section-2.1.4">section 2.1.4</a>.</p>
   72 </li>
   73 <li>
   74 <p>Document long-standing hazards in the use of <code>$</code> in
   75 <code>Dx</code> statements, see
   76 <a href="nasmdoc3.html#section-3.2.1">section 3.2.1</a>.</p>
   77 </li>
   78 <li>
   79 <p>The NASM-only RDOFF output format backend, which has been broken since
   80 at least NASM 2.14, has been disabled. The RDOFF tools are scheduled to be
   81 removed from the NASM distribution in NASM 2.16. If you have a concrete use
   82 case for RDOFF, please file a NASM bug report at
   83 <a href="https://bugs.nasm.us/"><code>https://bugs.nasm.us/</code></a> as
   84 soon as possible. See <a href="nasmdoc8.html#section-8.13">section
   85 8.13</a>.</p>
   86 </li>
   87 </ul>
   88 <h4 id="section-C.1.3">C.1.3 Version 2.15.03</h4>
   89 <ul>
   90 <li>
   91 <p>Add instructions from the Intel Instruction Set Extensions and Future
   92 Features Programming Reference, June 2020. This includes AVX5512
   93 <code>bfloat16</code>, AVX512 mask intersect, and Intel Advanced Matrix
   94 Extensions (AMX).</p>
   95 </li>
   96 <li>
   97 <p>Support for <code>bfloat16</code> floating-point constants. See
   98 <a href="nasmdoc3.html#section-3.4.6">section 3.4.6</a> and
   99 <a href="nasmdoc6.html#section-6.3">section 6.3</a>.</p>
  100 </li>
  101 <li>
  102 <p>Properly display warnings in preprocess-only mode.</p>
  103 </li>
  104 <li>
  105 <p>Fix copy-and-paste of examples from the PDF documentation.</p>
  106 </li>
  107 <li>
  108 <p>Debug information now properly reflect the line numbers of macro
  109 invocations (unless declared <code>.nolist</code>).</p>
  110 </li>
  111 <li>
  112 <p>Fix excessive alignment of sections in the
  113 <code>coff</code>/<code>win32</code>/<code>win64</code> output formats when
  114 the user-specified alignment is less than the default alignment for the
  115 section or section type.</p>
  116 </li>
  117 <li>
  118 <p>Fix explicit token pasting (<code>%+</code>,
  119 <a href="nasmdoc4.html#section-4.1.4">section 4.1.4</a>) for the cases
  120 where one or more parts result from empty token expansion, resulting in
  121 <code>%+</code> tokens at the beginning or end, or multiple ones in a row.</p>
  122 </li>
  123 <li>
  124 <p>Fix macro label capture (<code>%00</code>,
  125 <a href="nasmdoc4.html#section-4.3.7">section 4.3.7</a>).</p>
  126 </li>
  127 <li>
  128 <p>Much better documentation for the MASM compatiblity package,
  129 <code>%use masm</code> (see <a href="nasmdoc6.html#section-6.5">section
  130 6.5</a>).</p>
  131 </li>
  132 <li>
  133 <p>Fix <code>LEA</code> without square brackets, for MASM compatibility.</p>
  134 </li>
  135 <li>
  136 <p>Portability fixes.</p>
  137 </li>
  138 </ul>
  139 <h4 id="section-C.1.4">C.1.4 Version 2.15.02</h4>
  140 <ul>
  141 <li>
  142 <p>Fix miscompilation when building with <code>clang</code>.</p>
  143 </li>
  144 <li>
  145 <p>Add <code>db-empty</code> warning class, see
  146 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>.</p>
  147 </li>
  148 <li>
  149 <p>Fix the dependencies in the MSVC NMAKE makefile
  150 (<code>Mkfiles/msvc.mak</code>).</p>
  151 </li>
  152 <li>
  153 <p>Some documentation improvements and cleanups.</p>
  154 </li>
  155 <li>
  156 <p>Fix the handling of macro parameter ranges (<code>%{:}</code>),
  157 including with brace-enclosed original arguments.</p>
  158 </li>
  159 </ul>
  160 <h4 id="section-C.1.5">C.1.5 Version 2.15.01</h4>
  161 <ul>
  162 <li>
  163 <p>Fix building the documentation from the release archive. For 2.15, the
  164 user has to do <code>make warnings</code> manually in the main directory in
  165 order to be able to build the documentation, which means Perl needs to be
  166 installed on the system.</p>
  167 </li>
  168 <li>
  169 <p>Add instructions for Intel Control Flow Enforcement Technology (CET).</p>
  170 </li>
  171 </ul>
  172 <h4 id="section-C.1.6">C.1.6 Version 2.15</h4>
  173 <ul>
  174 <li>
  175 <p>The comparison and booleanizing operators can now be used in any
  176 expression context, not just <code>%if</code>. See
  177 <a href="nasmdoc3.html#section-3.5">section 3.5</a>.</p>
  178 </li>
  179 <li>
  180 <p>New operator <code>?</code> ... <code>:</code>. See
  181 <a href="nasmdoc3.html#section-3.5.1">section 3.5.1</a>.</p>
  182 </li>
  183 <li>
  184 <p>Signed shift operators <code>&lt;&lt;&lt;</code> and
  185 <code>&gt;&gt;&gt;</code>. See
  186 <a href="nasmdoc3.html#section-3.5.9">section 3.5.9</a>.</p>
  187 </li>
  188 <li>
  189 <p>The MASM <code>DUP</code> syntax for data definitions is now supported,
  190 in a somewhat enhanced form. See
  191 <a href="nasmdoc3.html#section-3.2.1">section 3.2.1</a>.</p>
  192 </li>
  193 <li>
  194 <p>Warn for strange legacy behavior regarding empty arguments in multi-line
  195 macro expansion, but try to match legacy behavior in most cases. Legacy
  196 behavior can be disabled with the directive
  197 <code>%pragma preproc sane_empty_expansion</code>, see
  198 <a href="nasmdoc4.html#section-4.3">section 4.3</a> and
  199 <a href="nasmdoc4.html#section-4.10.1">section 4.10.1</a>.</p>
  200 </li>
  201 <li>
  202 <p>A much more sensible limit to expression evaluation depth. The
  203 previously defined limit would rarely trigger before NASM died with a stack
  204 overrun error on most systems. See
  205 <a href="nasmdoc2.html#section-2.1.31">section 2.1.31</a>.</p>
  206 </li>
  207 <li>
  208 <p>The state of warnings can now be saved and restored via the
  209 <code>[WARNING PUSH]</code> and <code>[WARNING POP]</code> directives. See
  210 <a href="nasmdoc7.html#section-7.13">section 7.13</a>.</p>
  211 </li>
  212 <li>
  213 <p>The <code>sectalign on|off</code> switch does not affect an explicit
  214 directive. See <a href="nasmdoc5.html#section-5.10.2">section 5.10.2</a>.</p>
  215 </li>
  216 <li>
  217 <p>Added <code>configure</code> option to enable building with profiling
  218 (<code>--enable-profiling</code>).</p>
  219 </li>
  220 <li>
  221 <p>Attempt to support of long path names, up to 32767 of UTF-16 characters,
  222 on Windows.</p>
  223 </li>
  224 <li>
  225 <p>Fixed 'mismatch in operand sizes' error in the <code>MOVDDUP</code>,
  226 <code>CMPXCHG8B</code> and <code>CMPXCHG16B</code> instructions.</p>
  227 </li>
  228 <li>
  229 <p>Improved error messages in the string transformation routine.</p>
  230 </li>
  231 <li>
  232 <p>Removed obsolete <code>gnu-elf-extensions</code> warning about 8- and
  233 16-bit relocation generation. See
  234 <a href="nasmdoc8.html#section-8.9.8">section 8.9.8</a></p>
  235 </li>
  236 <li>
  237 <p>Added group aliases for all prefixed warnings. See
  238 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>.</p>
  239 </li>
  240 <li>
  241 <p>Allowed building with MSVC versions older than 1700.</p>
  242 </li>
  243 <li>
  244 <p>Added implicitly sized versions of the <code>K...</code> instructions,
  245 which allows the <code>K...</code> instructions to be specified without a
  246 size suffix as long as the operands are sized.</p>
  247 </li>
  248 <li>
  249 <p>Added <code>-L</code> option for additional listing information. See
  250 <a href="nasmdoc2.html#section-2.1.4">section 2.1.4</a>.</p>
  251 </li>
  252 <li>
  253 <p>Added some warnings for obsolete instructions for a specified CPU.</p>
  254 </li>
  255 <li>
  256 <p>Deprecated <code>-hf</code> and <code>-y</code> options. Use
  257 <code>-h</code> instead.</p>
  258 </li>
  259 <li>
  260 <p>Made DWARF as the default debug format for ELF.</p>
  261 </li>
  262 <li>
  263 <p>Added <code>%pragma list</code> <em>options...</em> to set or clear
  264 listing options (see <code>opt-L</code>).</p>
  265 </li>
  266 <li>
  267 <p>Allowed immediate syntax for <code>LEA</code> instruction (ignore
  268 operand size completely).</p>
  269 </li>
  270 <li>
  271 <p>Added limited functionality MASM compatibility package. See
  272 <a href="nasmdoc6.html#section-6.5">section 6.5</a>.</p>
  273 </li>
  274 <li>
  275 <p>Add single-line macros aliases using <code>%defalias</code> or
  276 <code>%idefalias</code>. These behave like a kind of "symbolic links" for
  277 single-line macros. See <a href="nasmdoc4.html#section-4.1.11">section
  278 4.1.11</a> and <code>clear</code>.</p>
  279 </li>
  280 <li>
  281 <p>Added support for stringify, nostrip, evaluating, and greedy single-line
  282 macro arguments. See <a href="nasmdoc4.html#section-4.1.1">section
  283 4.1.1</a>.</p>
  284 </li>
  285 <li>
  286 <p>Unused single-line macro arguments no longer need to have a specified
  287 name. See <a href="nasmdoc4.html#section-4.1.1">section 4.1.1</a>.</p>
  288 </li>
  289 <li>
  290 <p>Added conditional comma operator <code>%,</code>. See
  291 <a href="nasmdoc4.html#section-4.1.12">section 4.1.12</a>.</p>
  292 </li>
  293 <li>
  294 <p>Changed private namespace from <code>__foo__</code> to
  295 <code>__?foo?__</code>, so a user namespace starting from underscore is now
  296 clean from symbols. For backwards compatibility, the previous names are
  297 defined as aliases; see <a href="nasmdoc4.html#section-4.1.11">section
  298 4.1.11</a>, <a href="nasmdoc4.html#section-4.11.3">section 4.11.3</a> and
  299 <a href="nasmdoc5.html">chapter 5</a>.</p>
  300 </li>
  301 <li>
  302 <p>Added support of ELF weak symbols and external references. See
  303 <a href="nasmdoc8.html#section-8.9.5">section 8.9.5</a>.</p>
  304 </li>
  305 <li>
  306 <p>Changed the behavior of the EXTERN keyword and introduced REQUIRED
  307 keyword. See <a href="nasmdoc7.html#section-7.6">section 7.6</a>.</p>
  308 </li>
  309 <li>
  310 <p>Added <code>%ifusable</code> and <code>%ifusing</code> directives. See
  311 <a href="nasmdoc6.html">chapter 6</a>.</p>
  312 </li>
  313 <li>
  314 <p>Made various performance improvements and stability fixes in macro
  315 preprocessor engine.</p>
  316 </li>
  317 <li>
  318 <p>Improved NASM error handling and cleaned up error messages.</p>
  319 </li>
  320 <li>
  321 <p>Many, many bug fixes.</p>
  322 </li>
  323 </ul>
  324 <h4 id="section-C.1.7">C.1.7 Version 2.14.03</h4>
  325 <ul>
  326 <li>
  327 <p>Suppress nuisance "<code>label changed during code generation</code>"
  328 messages after a real error.</p>
  329 </li>
  330 <li>
  331 <p>Add support for the <code>merge</code> and <code>strings</code>
  332 attributes on ELF sections. See
  333 <a href="nasmdoc8.html#section-8.9.2">section 8.9.2</a>.</p>
  334 </li>
  335 <li>
  336 <p>Add support for the <code>note</code>, <code>preinit_array</code>,
  337 <code>init_array</code>, and <code>fini_array</code> sections type in ELF.
  338 See <a href="nasmdoc8.html#section-8.9.2">section 8.9.2</a>.</p>
  339 </li>
  340 <li>
  341 <p>Handle more than 32,633 sections in ELF.</p>
  342 </li>
  343 </ul>
  344 <h4 id="section-C.1.8">C.1.8 Version 2.14.02</h4>
  345 <ul>
  346 <li>
  347 <p>Fix crash due to multiple errors or warnings during the code generation
  348 pass if a list file is specified.</p>
  349 </li>
  350 </ul>
  351 <h4 id="section-C.1.9">C.1.9 Version 2.14.01</h4>
  352 <ul>
  353 <li>
  354 <p>Create all system-defined macros defore processing command-line given
  355 preprocessing directives (<code>-p</code>, <code>-d</code>,
  356 <code>-u</code>, <code>--pragma</code>, <code>--before</code>).</p>
  357 </li>
  358 <li>
  359 <p>If debugging is enabled, define a <code>__DEBUG_FORMAT__</code>
  360 predefined macro. See <a href="nasmdoc5.html#section-5.5">section 5.5</a>.</p>
  361 </li>
  362 <li>
  363 <p>Fix an assert for the case in the <code>obj</code> format when a
  364 <code>SEG</code> operator refers to an <code>EXTERN</code> symbol declared
  365 further down in the code.</p>
  366 </li>
  367 <li>
  368 <p>Fix a corner case in the floating-point code where a binary, octal or
  369 hexadecimal floating-point having at least 32, 11, or 8 mantissa digits
  370 could produce slightly incorrect results under very specific conditions.</p>
  371 </li>
  372 <li>
  373 <p>Support <code>-MD</code> without a filename, for <code>gcc</code>
  374 compatibility. <code>-MF</code> can be used to set the dependencies output
  375 filename. See <a href="nasmdoc2.html#section-2.1.8">section 2.1.8</a>.</p>
  376 </li>
  377 <li>
  378 <p>Fix <code>-E</code> in combination with <code>-MD</code>. See
  379 <a href="nasmdoc2.html#section-2.1.22">section 2.1.22</a>.</p>
  380 </li>
  381 <li>
  382 <p>Fix missing errors on redefined labels; would cause convergence failure
  383 instead which is very slow and not easy to debug.</p>
  384 </li>
  385 <li>
  386 <p>Duplicate definitions of the same label <em>with the same value</em> is
  387 now explicitly permitted (2.14 would allow it in some circumstances.)</p>
  388 </li>
  389 <li>
  390 <p>Add the option <code>--no-line</code> to ignore <code>%line</code>
  391 directives in the source. See
  392 <a href="nasmdoc2.html#section-2.1.33">section 2.1.33</a> and
  393 <a href="nasmdoc4.html#section-4.11.1">section 4.11.1</a>.</p>
  394 </li>
  395 </ul>
  396 <h4 id="section-C.1.10">C.1.10 Version 2.14</h4>
  397 <ul>
  398 <li>
  399 <p>Changed <code>-I</code> option semantics by adding a trailing path
  400 separator unconditionally.</p>
  401 </li>
  402 <li>
  403 <p>Fixed null dereference in corrupted invalid single line macros.</p>
  404 </li>
  405 <li>
  406 <p>Fixed division by zero which may happen if source code is malformed.</p>
  407 </li>
  408 <li>
  409 <p>Fixed out of bound access in processing of malformed segment override.</p>
  410 </li>
  411 <li>
  412 <p>Fixed out of bound access in certain <code>EQU</code> parsing.</p>
  413 </li>
  414 <li>
  415 <p>Fixed buffer underflow in float parsing.</p>
  416 </li>
  417 <li>
  418 <p>Added <code>SGX</code> (Intel Software Guard Extensions) instructions.</p>
  419 </li>
  420 <li>
  421 <p>Added <code>+n</code> syntax for multiple contiguous registers.</p>
  422 </li>
  423 <li>
  424 <p>Fixed <code>subsections_via_symbols</code> for <code>macho</code> object
  425 format.</p>
  426 </li>
  427 <li>
  428 <p>Added the <code>--gprefix</code>, <code>--gpostfix</code>,
  429 <code>--lprefix</code>, and <code>--lpostfix</code> command line options,
  430 to allow command line base symbol renaming. See
  431 <a href="nasmdoc2.html#section-2.1.28">section 2.1.28</a>.</p>
  432 </li>
  433 <li>
  434 <p>Allow label renaming to be specified by <code>%pragma</code> in addition
  435 to from the command line. See <a href="nasmdoc7.html#section-7.10">section
  436 7.10</a>.</p>
  437 </li>
  438 <li>
  439 <p>Supported generic <code>%pragma</code> namespaces, <code>output</code>
  440 and <code>debug</code>. See <a href="nasmdoc4.html#section-4.10">section
  441 4.10</a>.</p>
  442 </li>
  443 <li>
  444 <p>Added the <code>--pragma</code> command line option to inject a
  445 <code>%pragma</code> directive. See
  446 <a href="nasmdoc2.html#section-2.1.29">section 2.1.29</a>.</p>
  447 </li>
  448 <li>
  449 <p>Added the <code>--before</code> command line option to accept preprocess
  450 statement before input. See <a href="nasmdoc2.html#section-2.1.30">section
  451 2.1.30</a>.</p>
  452 </li>
  453 <li>
  454 <p>Added <code>AVX512</code> <code>VBMI2</code> (Additional Bit
  455 Manipulation), <code>VNNI</code> (Vector Neural Network),
  456 <code>BITALG</code> (Bit Algorithm), and <code>GFNI</code> (Galois Field
  457 New Instruction) instructions.</p>
  458 </li>
  459 <li>
  460 <p>Added the <code>STATIC</code> directive for local symbols that should be
  461 renamed using global-symbol rules. See
  462 <a href="nasmdoc7.html#section-7.9">section 7.9</a>.</p>
  463 </li>
  464 <li>
  465 <p>Allow a symbol to be defined as <code>EXTERN</code> and then later
  466 overridden as <code>GLOBAL</code> or <code>COMMON</code>. Furthermore, a
  467 symbol declared <code>EXTERN</code> and then defined will be treated as
  468 <code>GLOBAL</code>. See <a href="nasmdoc7.html#section-7.5">section
  469 7.5</a>.</p>
  470 </li>
  471 <li>
  472 <p>The <code>GLOBAL</code> directive no longer is required to precede the
  473 definition of the symbol.</p>
  474 </li>
  475 <li>
  476 <p>Support <code>private_extern</code> as <code>macho</code> specific
  477 extension to the <code>GLOBAL</code> directive. See
  478 <a href="nasmdoc8.html#section-8.8.5">section 8.8.5</a>.</p>
  479 </li>
  480 <li>
  481 <p>Updated <code>UD0</code> encoding to match with the specification</p>
  482 </li>
  483 <li>
  484 <p>Added the <code>--limit-X</code> command line option to set execution
  485 limits. See <a href="nasmdoc2.html#section-2.1.31">section 2.1.31</a>.</p>
  486 </li>
  487 <li>
  488 <p>Updated the <code>Codeview</code> version number to be aligned with
  489 <code>MASM</code>.</p>
  490 </li>
  491 <li>
  492 <p>Added the <code>--keep-all</code> command line option to preserve output
  493 files. See <a href="nasmdoc2.html#section-2.1.32">section 2.1.32</a>.</p>
  494 </li>
  495 <li>
  496 <p>Added the <code>--include</code> command line option, an alias to
  497 <code>-P</code> (<a href="nasmdoc2.html#section-2.1.19">section
  498 2.1.19</a>).</p>
  499 </li>
  500 <li>
  501 <p>Added the <code>--help</code> command line option as an alias to
  502 <code>-h</code> (<a href="nasmdoc3.html#section-3.1">section 3.1</a>).</p>
  503 </li>
  504 <li>
  505 <p>Added <code>-W</code>, <code>-D</code>, and <code>-Q</code> suffix
  506 aliases for <code>RET</code> instructions so the operand sizes of these
  507 instructions can be encoded without using <code>o16</code>,
  508 <code>o32</code> or <code>o64</code>.</p>
  509 </li>
  510 </ul>
  511 <h4 id="section-C.1.11">C.1.11 Version 2.13.03</h4>
  512 <ul>
  513 <li>
  514 <p>Added AVX and AVX512 <code>VAES*</code> and <code>VPCLMULQDQ</code>
  515 instructions.</p>
  516 </li>
  517 <li>
  518 <p>Fixed missing dwarf record in x32 ELF output format.</p>
  519 </li>
  520 </ul>
  521 <h4 id="section-C.1.12">C.1.12 Version 2.13.02</h4>
  522 <ul>
  523 <li>
  524 <p>Fix false positive in testing of numeric overflows.</p>
  525 </li>
  526 <li>
  527 <p>Fix generation of <code>PEXTRW</code> instruction.</p>
  528 </li>
  529 <li>
  530 <p>Fix <code>smartalign</code> package which could trigger an error during
  531 optimization if the alignment code expanded too much due to optimization of
  532 the previous code.</p>
  533 </li>
  534 <li>
  535 <p>Fix a case where negative value in <code>TIMES</code> directive causes
  536 panic instead of an error.</p>
  537 </li>
  538 <li>
  539 <p>Always finalize <code>.debug_abbrev</code> section with a null in
  540 <code>dwarf</code> output format.</p>
  541 </li>
  542 <li>
  543 <p>Support <code>debug</code> flag in section attributes for
  544 <code>macho</code> output format. See
  545 <a href="nasmdoc8.html#section-8.8.1">section 8.8.1</a>.</p>
  546 </li>
  547 <li>
  548 <p>Support up to 16 characters in section names for <code>macho</code>
  549 output format.</p>
  550 </li>
  551 <li>
  552 <p>Fix missing update of global <code>BITS</code> setting if
  553 <code>SECTION</code> directive specified a bit size using output
  554 format-specific extensions (e.g. <code>USE32</code> for the
  555 <code>obj</code> output format.)</p>
  556 </li>
  557 <li>
  558 <p>Fix the incorrect generation of VEX-encoded instruction when static mode
  559 decorators are specified on scalar instructions, losing the decorators as
  560 they require EVEX encoding.</p>
  561 </li>
  562 <li>
  563 <p>Option <code>-MW</code> to quote dependency outputs according to Watcom
  564 Make conventions instead of POSIX Make conventions. See
  565 <a href="nasmdoc2.html#section-2.1.12">section 2.1.12</a>.</p>
  566 </li>
  567 <li>
  568 <p>The <code>obj</code> output format now contains embedded dependency file
  569 information, unless disabled with <code>%pragma obj nodepend</code>. See
  570 <a href="nasmdoc8.html#section-8.4.9">section 8.4.9</a>.</p>
  571 </li>
  572 <li>
  573 <p>Fix generation of dependency lists.</p>
  574 </li>
  575 <li>
  576 <p>Fix a number of null pointer reference and memory allocation errors.</p>
  577 </li>
  578 <li>
  579 <p>Always generate symbol-relative relocations for the <code>macho64</code>
  580 output format; at least some versions of the XCode/LLVM linker fails for
  581 section-relative relocations.</p>
  582 </li>
  583 </ul>
  584 <h4 id="section-C.1.13">C.1.13 Version 2.13.01</h4>
  585 <ul>
  586 <li>
  587 <p>Fix incorrect output for some types of <code>FAR</code> or
  588 <code>SEG</code> references in the <code>obj</code> output format, and
  589 possibly other 16-bit output formats.</p>
  590 </li>
  591 <li>
  592 <p>Fix the address in the list file for an instruction containing a
  593 <code>TIMES</code> directive.</p>
  594 </li>
  595 <li>
  596 <p>Fix error with <code>TIMES</code> used together with an instruction
  597 which can vary in size, e.g. <code>JMP</code>.</p>
  598 </li>
  599 <li>
  600 <p>Fix breakage on some uses of the <code>DZ</code> pseudo-op.</p>
  601 </li>
  602 </ul>
  603 <h4 id="section-C.1.14">C.1.14 Version 2.13</h4>
  604 <ul>
  605 <li>
  606 <p>Support the official forms of the <code>UD0</code> and <code>UD1</code>
  607 instructions.</p>
  608 </li>
  609 <li>
  610 <p>Allow self-segment-relative expressions in immediates and displacements,
  611 even when combined with an external or otherwise out-of-segment special
  612 symbol, e.g.:</p>
  613 <pre>
  614      extern foo 
  615      mov eax,[foo - $ + ebx]               ; Now legal
  616 </pre>
  617 </li>
  618 <li>
  619 <p>Handle a 64-bit origin in NDISASM.</p>
  620 </li>
  621 <li>
  622 <p>NASM can now generate sparse output files for relevant output formats,
  623 if the underlying operating system supports them.</p>
  624 </li>
  625 <li>
  626 <p>The <code>macho</code> object format now supports the
  627 <code>subsections_via_symbols</code> and <code>no_dead_strip</code>
  628 directives, see <a href="nasmdoc8.html#section-8.8.4">section 8.8.4</a>.</p>
  629 </li>
  630 <li>
  631 <p>The <code>macho</code> object format now supports the
  632 <code>no_dead_strip</code>, <code>live_support</code> and
  633 <code>strip_static_syms</code> section flags, see
  634 <a href="nasmdoc8.html#section-8.8.1">section 8.8.1</a>.</p>
  635 </li>
  636 <li>
  637 <p>The <code>macho</code> object format now supports the <code>dwarf</code>
  638 debugging format, as required by newer toolchains.</p>
  639 </li>
  640 <li>
  641 <p>All warnings can now be suppressed if desired; warnings not otherwise
  642 part of any warning class are now considered its own warning class called
  643 <code>other</code> (e.g. <code>-w-other</code>). Furthermore,
  644 warning-as-error can now be controlled on a per warning class basis, using
  645 the syntax <code>-w+error=</code><em>warning-class</em> and its equivalent
  646 for all other warning control options. See
  647 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a> for the
  648 command-line options and warning classes and
  649 <a href="nasmdoc7.html#section-7.13">section 7.13</a> for the
  650 <code>[WARNING]</code> directive.</p>
  651 </li>
  652 <li>
  653 <p>Fix a number of bugs related to AVX-512 decorators.</p>
  654 </li>
  655 <li>
  656 <p>Significant improvements to building NASM with Microsoft Visual Studio
  657 via <code>Mkfiles/msvc.mak</code>. It is now possible to build the full
  658 Windows installer binary as long as the necessary prerequisites are
  659 installed; see <code>Mkfiles/README</code></p>
  660 </li>
  661 <li>
  662 <p>To build NASM with custom modifications (table changes) or from the git
  663 tree now requires Perl 5.8 at the very minimum, quite possibly a higher
  664 version (Perl 5.24.1 tested.) There is no requirement to have Perl on your
  665 system at all if all you want to do is build unmodified NASM from source
  666 archives.</p>
  667 </li>
  668 <li>
  669 <p>Fix the <code>{z}</code> decorator on AVX-512 <code>VMOVDQ*</code>
  670 instructions.</p>
  671 </li>
  672 <li>
  673 <p>Add new warnings for certain dangerous constructs which never ought to
  674 have been allowed. In particular, the <code>RESB</code> family of
  675 instructions should have been taking a critical expression all along.</p>
  676 </li>
  677 <li>
  678 <p>Fix the EVEX (AVX-512) versions of the <code>VPBROADCAST</code>,
  679 <code>VPEXTR</code>, and <code>VPINSR</code> instructions.</p>
  680 </li>
  681 <li>
  682 <p>Support contracted forms of additional instructions. As a general rule,
  683 if an instruction has a non-destructive source immediately after a
  684 destination register that isn't used as an input, NASM supports omitting
  685 that source register, using the destination register as that value. This
  686 among other things makes it easier to convert SSE code to the equivalent
  687 AVX code:</p>
  688 <pre>
  689      addps xmm1,xmm0                       ; SSE instruction 
  690      vaddps ymm1,ymm1,ymm0                 ; AVX official long form 
  691      vaddps ymm1,ymm0                      ; AVX contracted form
  692 </pre>
  693 </li>
  694 <li>
  695 <p>Fix Codeview malformed compiler version record.</p>
  696 </li>
  697 <li>
  698 <p>Add the <code>CLWB</code> and <code>PCOMMIT</code> instructions. Note
  699 that the <code>PCOMMIT</code> instruction has been deprecated and will
  700 never be included in a shipping product; it is included for completeness
  701 only.</p>
  702 </li>
  703 <li>
  704 <p>Add the <code>%pragma</code> preprocessor directive for soft-error
  705 directives.</p>
  706 </li>
  707 <li>
  708 <p>Add the <code>RDPID</code> instruction.</p>
  709 </li>
  710 </ul>
  711 <h4 id="section-C.1.15">C.1.15 Version 2.12.02</h4>
  712 <ul>
  713 <li>
  714 <p>Fix preprocessor errors, especially <code>%error</code> and
  715 <code>%warning</code>, inside <code>%if</code> statements.</p>
  716 </li>
  717 <li>
  718 <p>Fix relative relocations in 32-bit Mach-O.</p>
  719 </li>
  720 <li>
  721 <p>More Codeview debug format fixes.</p>
  722 </li>
  723 <li>
  724 <p>If the MASM <code>PTR</code> keyword is encountered, issue a warning.
  725 This is much more likely to indicate a MASM-ism encountered in NASM than it
  726 is a valid label. This warning can be suppressed with <code>-w-ptr</code>,
  727 the <code>[warning]</code> directive (see
  728 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>) or by the macro
  729 definition <code>%idefine ptr $%?</code> (see
  730 <a href="nasmdoc4.html#section-4.1.5">section 4.1.5</a>).</p>
  731 </li>
  732 <li>
  733 <p>When an error or a warning comes from the expansion of a multi-line
  734 macro, display the file and line numbers for the expanded macros. Macros
  735 defined with <code>.nolist</code> do not get displayed.</p>
  736 </li>
  737 <li>
  738 <p>Add macros <code>ilog2fw()</code> and <code>ilog2cw()</code> to the
  739 <code>ifunc</code> macro package. See
  740 <a href="nasmdoc6.html#section-6.4.1">section 6.4.1</a>.</p>
  741 </li>
  742 </ul>
  743 <h4 id="section-C.1.16">C.1.16 Version 2.12.01</h4>
  744 <ul>
  745 <li>
  746 <p>Portability fixes for some platforms.</p>
  747 </li>
  748 <li>
  749 <p>Fix error when not specifying a list file.</p>
  750 </li>
  751 <li>
  752 <p>Correct the handling of macro-local labels in the Codeview debugging
  753 format.</p>
  754 </li>
  755 <li>
  756 <p>Add <code>CLZERO</code>, <code>MONITORX</code> and <code>MWAITX</code>
  757 instructions.</p>
  758 </li>
  759 </ul>
  760 <h4 id="section-C.1.17">C.1.17 Version 2.12</h4>
  761 <ul>
  762 <li>
  763 <p>Major fixes to the <code>macho</code> backend
  764 (<a href="nasmdoc8.html#section-8.8">section 8.8</a>); earlier versions
  765 would produce invalid symbols and relocations on a regular basis.</p>
  766 </li>
  767 <li>
  768 <p>Support for thread-local storage in Mach-O.</p>
  769 </li>
  770 <li>
  771 <p>Support for arbitrary sections in Mach-O.</p>
  772 </li>
  773 <li>
  774 <p>Fix wrong negative size treated as a big positive value passed into
  775 backend causing NASM to crash.</p>
  776 </li>
  777 <li>
  778 <p>Fix handling of zero-extending unsigned relocations, we have been
  779 printing wrong message and forgot to assign segment with predefined value
  780 before passing it into output format.</p>
  781 </li>
  782 <li>
  783 <p>Fix potential write of oversized (with size greater than allowed in
  784 output format) relative relocations.</p>
  785 </li>
  786 <li>
  787 <p>Portability fixes for building NASM with the LLVM compiler.</p>
  788 </li>
  789 <li>
  790 <p>Add support of Codeview version 8 (<code>cv8</code>) debug format for
  791 <code>win32</code> and <code>win64</code> formats in the <code>COFF</code>
  792 backend, see <a href="nasmdoc8.html#section-8.5.3">section 8.5.3</a>.</p>
  793 </li>
  794 <li>
  795 <p>Allow 64-bit outputs in 16/32-bit only backends. Unsigned 64-bit
  796 relocations are zero-extended from 32-bits with a warning (suppressible via
  797 <code>-w-zext-reloc</code>); signed 64-bit relocations are an error.</p>
  798 </li>
  799 <li>
  800 <p>Line numbers in list files now correspond to the lines in the source
  801 files, instead of simply being sequential.</p>
  802 </li>
  803 <li>
  804 <p>There is now an official 64-bit (x64 a.k.a. x86-64) build for Windows.</p>
  805 </li>
  806 </ul>
  807 <h4 id="section-C.1.18">C.1.18 Version 2.11.09</h4>
  808 <ul>
  809 <li>
  810 <p>Fix potential stack overwrite in <code>macho32</code> backend.</p>
  811 </li>
  812 <li>
  813 <p>Fix relocation records in <code>macho64</code> backend.</p>
  814 </li>
  815 <li>
  816 <p>Fix symbol lookup computation in <code>macho64</code> backend.</p>
  817 </li>
  818 <li>
  819 <p>Adjust <code>.symtab</code> and <code>.rela.text</code> sections
  820 alignments to 8 bytes in <code>elf64</code> backed.</p>
  821 </li>
  822 <li>
  823 <p>Fix section length computation in <code>bin</code> backend which leaded
  824 in incorrect relocation records.</p>
  825 </li>
  826 </ul>
  827 <h4 id="section-C.1.19">C.1.19 Version 2.11.08</h4>
  828 <ul>
  829 <li>
  830 <p>Fix section length computation in <code>bin</code> backend which leaded
  831 in incorrect relocation records.</p>
  832 </li>
  833 <li>
  834 <p>Add a warning for numeric preprocessor definitions passed via command
  835 line which might have unexpected results otherwise.</p>
  836 </li>
  837 <li>
  838 <p>Add ability to specify a module name record in <code>rdoff</code> linker
  839 with <code>-mn</code> option.</p>
  840 </li>
  841 <li>
  842 <p>Increase label length capacity up to 256 bytes in <code>rdoff</code>
  843 backend for FreePascal sake, which tends to generate very long labels for
  844 procedures.</p>
  845 </li>
  846 <li>
  847 <p>Fix segmentation failure when rip addressing is used in
  848 <code>macho64</code> backend.</p>
  849 </li>
  850 <li>
  851 <p>Fix access on out of memory when handling strings with a single grave.
  852 We have sixed similar problem in previous release but not all cases were
  853 covered.</p>
  854 </li>
  855 <li>
  856 <p>Fix NULL dereference in disassembled on <code>BND</code> instruction.</p>
  857 </li>
  858 </ul>
  859 <h4 id="section-C.1.20">C.1.20 Version 2.11.07</h4>
  860 <ul>
  861 <li>
  862 <p>Fix 256 bit <code>VMOVNTPS</code> instruction.</p>
  863 </li>
  864 <li>
  865 <p>Fix <code>-MD</code> option handling, which was rather broken in
  866 previous release changing command line api.</p>
  867 </li>
  868 <li>
  869 <p>Fix access to unitialized space when handling strings with a single
  870 grave.</p>
  871 </li>
  872 <li>
  873 <p>Fix nil dereference in handling memory reference parsing.</p>
  874 </li>
  875 </ul>
  876 <h4 id="section-C.1.21">C.1.21 Version 2.11.06</h4>
  877 <ul>
  878 <li>
  879 <p>Update AVX512 instructions based on the Extension Reference (319433-021
  880 Sept 2014).</p>
  881 </li>
  882 <li>
  883 <p>Fix the behavior of <code>-MF</code> and <code>-MD</code> options
  884 (Bugzilla 3392280)</p>
  885 </li>
  886 <li>
  887 <p>Updated Win32 Makefile to fix issue with build</p>
  888 </li>
  889 </ul>
  890 <h4 id="section-C.1.22">C.1.22 Version 2.11.05</h4>
  891 <ul>
  892 <li>
  893 <p>Add <code>--v</code> as an alias for <code>-v</code> (see
  894 <a href="nasmdoc2.html#section-2.1.27">section 2.1.27</a>), for
  895 command-line compatibility with Yasm.</p>
  896 </li>
  897 <li>
  898 <p>Fix a bug introduced in 2.11.03 whereby certain instructions would
  899 contain multiple REX prefixes, and thus be corrupt.</p>
  900 </li>
  901 </ul>
  902 <h4 id="section-C.1.23">C.1.23 Version 2.11.04</h4>
  903 <ul>
  904 <li>
  905 <p>Removed an invalid error checking code. Sometimes a memref only with a
  906 displacement can also set an evex flag. For example:</p>
  907 <pre>
  908       vmovdqu32 [0xabcd]{k1}, zmm0
  909 </pre>
  910 </li>
  911 <li>
  912 <p>Fixed a bug in disassembler that EVEX.L'L vector length was not matched
  913 when EVEX.b was set because it was simply considered as EVEC.RC. Separated
  914 EVEX.L'L case from EVEX.RC which is ignored in matching.</p>
  915 </li>
  916 </ul>
  917 <h4 id="section-C.1.24">C.1.24 Version 2.11.03</h4>
  918 <ul>
  919 <li>
  920 <p>Fix a bug there REX prefixes were missing on instructions inside a
  921 <code>TIMES</code> statement.</p>
  922 </li>
  923 </ul>
  924 <h4 id="section-C.1.25">C.1.25 Version 2.11.02</h4>
  925 <ul>
  926 <li>
  927 <p>Add the <code>XSAVEC</code>, <code>XSAVES</code> and
  928 <code>XRSTORS</code> family instructions.</p>
  929 </li>
  930 <li>
  931 <p>Add the <code>CLFLUSHOPT</code> instruction.</p>
  932 </li>
  933 </ul>
  934 <h4 id="section-C.1.26">C.1.26 Version 2.11.01</h4>
  935 <ul>
  936 <li>
  937 <p>Allow instructions which implicitly uses <code>XMM0</code>
  938 (<code>VBLENDVPD</code>, <code>VBLENDVPS</code>, <code>PBLENDVB</code> and
  939 <code>SHA256RNDS2</code>) to be specified without an explicit
  940 <code>xmm0</code> on the assembly line. In other words, the following two
  941 lines produce the same output:</p>
  942 <pre>
  943      vblendvpd xmm2,xmm1,xmm0      ; Last operand is fixed xmm0 
  944      vblendvpd xmm2,xmm1           ; Implicit xmm0 omitted
  945 </pre>
  946 </li>
  947 <li>
  948 <p>In the ELF backends, don't crash the assembler if
  949 <code>section align</code> is specified without a value.</p>
  950 </li>
  951 </ul>
  952 <h4 id="section-C.1.27">C.1.27 Version 2.11</h4>
  953 <ul>
  954 <li>
  955 <p>Add support for the Intel AVX-512 instruction set:</p>
  956 </li>
  957 <li>
  958 <p>16 new, 512-bit SIMD registers. Total 32 <code>(ZMM0 ~ ZMM31)</code></p>
  959 </li>
  960 <li>
  961 <p>8 new opmask registers <code>(K0 ~ K7)</code>. One of 7 registers
  962 <code>(K1 ~ K7)</code> can be used as an opmask for conditional execution.</p>
  963 </li>
  964 <li>
  965 <p>A new EVEX encoding prefix. EVEX is based on VEX and provides more
  966 capabilities: opmasks, broadcasting, embedded rounding and compressed
  967 displacements.</p>
  968 <pre>
  969  - opmask 
  970      VDIVPD zmm0{k1}{z}, zmm1, zmm3  ; conditional vector operation 
  971                                      ; using opmask k1. 
  972                                      ; {z} is for zero-masking 
  973  - broadcasting 
  974      VDIVPS zmm4, zmm5, [rbx]{1to16} ; load single-precision float and 
  975                                      ; replicate it 16 times. 32 * 16 = 512 
  976  - embedded rounding 
  977      VCVTSI2SD xmm6, xmm7, {rz-sae}, rax ; round toward zero. note that it 
  978                                       ; is used as if a separate operand. 
  979                                       ; it comes after the last SIMD operand
  980 </pre>
  981 </li>
  982 <li>
  983 <p>Add support for <code>ZWORD</code> (512 bits), <code>DZ</code> and
  984 <code>RESZ</code>.</p>
  985 </li>
  986 <li>
  987 <p>Add support for the MPX and SHA instruction sets.</p>
  988 </li>
  989 <li>
  990 <p>Better handling of section redefinition.</p>
  991 </li>
  992 <li>
  993 <p>Generate manpages when running <code>'make dist'</code>.</p>
  994 </li>
  995 <li>
  996 <p>Handle all token chains in mmacro params range.</p>
  997 </li>
  998 <li>
  999 <p>Support split [base,index] effective address:</p>
 1000 <pre>
 1001      mov eax,[eax+8,ecx*4]   ; eax=base, ecx=index, 4=scale, 8=disp
 1002 </pre>
 1003 </li>
 1004 </ul>
 1005 <p>This is expected to be most useful for the MPX instructions.</p>
 1006 <ul>
 1007 <li>
 1008 <p>Support <code>BND</code> prefix for branch instructions (for MPX).</p>
 1009 </li>
 1010 <li>
 1011 <p>The <code>DEFAULT</code> directive can now take <code>BND</code> and
 1012 <code>NOBND</code> options to indicate whether all relevant branches should
 1013 be getting <code>BND</code> prefixes. This is expected to be the normal for
 1014 use in MPX code.</p>
 1015 </li>
 1016 <li>
 1017 <p>Add <code>{evex</code>}, <code>{vex3</code>} and <code>{vex2</code>}
 1018 instruction prefixes to have NASM encode the corresponding instruction, if
 1019 possible, with an EVEX, 3-byte VEX, or 2-byte VEX prefix, respectively.</p>
 1020 </li>
 1021 <li>
 1022 <p>Support for section names longer than 8 bytes in Win32/Win64 COFF.</p>
 1023 </li>
 1024 <li>
 1025 <p>The <code>NOSPLIT</code> directive by itself no longer forces a single
 1026 register to become an index register, unless it has an explicit multiplier.</p>
 1027 <pre>
 1028      mov eax,[nosplit eax]       ; eax as base register 
 1029      mov eax,[nosplit eax*1]     ; eax as index register
 1030 </pre>
 1031 </li>
 1032 </ul>
 1033 <h4 id="section-C.1.28">C.1.28 Version 2.10.09</h4>
 1034 <ul>
 1035 <li>
 1036 <p>Pregenerate man pages.</p>
 1037 </li>
 1038 </ul>
 1039 <h4 id="section-C.1.29">C.1.29 Version 2.10.08</h4>
 1040 <ul>
 1041 <li>
 1042 <p>Fix <code>VMOVNTDQA</code>, <code>MOVNTDQA</code> and
 1043 <code>MOVLPD</code> instructions.</p>
 1044 </li>
 1045 <li>
 1046 <p>Fix collision for <code>VGATHERQPS</code>, <code>VPGATHERQD</code>
 1047 instructions.</p>
 1048 </li>
 1049 <li>
 1050 <p>Fix <code>VPMOVSXBQ</code>, <code>VGATHERQPD</code>, <code>VSPLLW</code>
 1051 instructions.</p>
 1052 </li>
 1053 <li>
 1054 <p>Add a bunch of AMD TBM instructions.</p>
 1055 </li>
 1056 <li>
 1057 <p>Fix potential stack overwrite in numbers conversion.</p>
 1058 </li>
 1059 <li>
 1060 <p>Allow byte size in <code>PREFETCHTx</code> instructions.</p>
 1061 </li>
 1062 <li>
 1063 <p>Make manual pages up to date.</p>
 1064 </li>
 1065 <li>
 1066 <p>Make <code>F3</code> and <code>F2</code> SSE prefixes to override
 1067 <code>66</code>.</p>
 1068 </li>
 1069 <li>
 1070 <p>Support of AMD SVM instructions in 32 bit mode.</p>
 1071 </li>
 1072 <li>
 1073 <p>Fix near offsets code generation for <code>JMP</code>, <code>CALL</code>
 1074 instrictions in long mode.</p>
 1075 </li>
 1076 <li>
 1077 <p>Fix preprocessor parse regression when id is expanding to a whitespace.</p>
 1078 </li>
 1079 </ul>
 1080 <h4 id="section-C.1.30">C.1.30 Version 2.10.07</h4>
 1081 <ul>
 1082 <li>
 1083 <p>Fix line continuation parsing being broken in previous version.</p>
 1084 </li>
 1085 </ul>
 1086 <h4 id="section-C.1.31">C.1.31 Version 2.10.06</h4>
 1087 <ul>
 1088 <li>
 1089 <p>Always quote the dependency source names when using the automatic
 1090 dependency generation options.</p>
 1091 </li>
 1092 <li>
 1093 <p>If no dependency target name is specified via the <code>-MT</code> or
 1094 <code>-MQ</code> options, quote the default output name.</p>
 1095 </li>
 1096 <li>
 1097 <p>Fix assembly of shift operations in <code>CPU 8086</code> mode.</p>
 1098 </li>
 1099 <li>
 1100 <p>Fix incorrect generation of explicit immediate byte for shift by 1 under
 1101 certain circumstances.</p>
 1102 </li>
 1103 <li>
 1104 <p>Fix assembly of the <code>VPCMPGTQ</code> instruction.</p>
 1105 </li>
 1106 <li>
 1107 <p>Fix RIP-relative relocations in the <code>macho64</code> backend.</p>
 1108 </li>
 1109 </ul>
 1110 <h4 id="section-C.1.32">C.1.32 Version 2.10.05</h4>
 1111 <ul>
 1112 <li>
 1113 <p>Add the <code>CLAC</code> and <code>STAC</code> instructions.</p>
 1114 </li>
 1115 </ul>
 1116 <h4 id="section-C.1.33">C.1.33 Version 2.10.04</h4>
 1117 <ul>
 1118 <li>
 1119 <p>Add back the inadvertently deleted 256-bit version of the
 1120 <code>VORPD</code> instruction.</p>
 1121 </li>
 1122 <li>
 1123 <p>Correct disassembly of instructions starting with byte <code>82</code>
 1124 hex.</p>
 1125 </li>
 1126 <li>
 1127 <p>Fix corner cases in token pasting, for example:</p>
 1128 <pre>
 1129    %define N 1e%++%+ 5 
 1130            dd N, 1e+5
 1131 </pre>
 1132 </li>
 1133 </ul>
 1134 <h4 id="section-C.1.34">C.1.34 Version 2.10.03</h4>
 1135 <ul>
 1136 <li>
 1137 <p>Correct the assembly of the instruction:</p>
 1138 <pre>
 1139 XRELEASE MOV [absolute],AL
 1140 </pre>
 1141 <p>Previous versions would incorrectly generate <code>F3 A2</code> for this
 1142 instruction and issue a warning; correct behavior is to emit
 1143 <code>F3 88 05</code>.</p>
 1144 </li>
 1145 </ul>
 1146 <h4 id="section-C.1.35">C.1.35 Version 2.10.02</h4>
 1147 <ul>
 1148 <li>
 1149 <p>Add the <code>ifunc</code> macro package with integer functions,
 1150 currently only integer logarithms. See
 1151 <a href="nasmdoc6.html#section-6.4">section 6.4</a>.</p>
 1152 </li>
 1153 <li>
 1154 <p>Add the <code>RDSEED</code>, <code>ADCX</code> and <code>ADOX</code>
 1155 instructions.</p>
 1156 </li>
 1157 </ul>
 1158 <h4 id="section-C.1.36">C.1.36 Version 2.10.01</h4>
 1159 <ul>
 1160 <li>
 1161 <p>Add missing VPMOVMSKB instruction with reg32, ymmreg operands.</p>
 1162 </li>
 1163 </ul>
 1164 <h4 id="section-C.1.37">C.1.37 Version 2.10</h4>
 1165 <ul>
 1166 <li>
 1167 <p>When optimization is enabled, <code>mov r64,imm</code> now optimizes to
 1168 the shortest form possible between:</p>
 1169 <pre>
 1170      mov r32,imm32                   ;  5 bytes 
 1171      mov r64,imm32                   ;  7 bytes 
 1172      mov r64,imm64                   ; 10 bytes
 1173 </pre>
 1174 <p>To force a specific form, use the <code>STRICT</code> keyword, see
 1175 <a href="nasmdoc3.html#section-3.7">section 3.7</a>.</p>
 1176 </li>
 1177 <li>
 1178 <p>Add support for the Intel AVX2 instruction set.</p>
 1179 </li>
 1180 <li>
 1181 <p>Add support for Bit Manipulation Instructions 1 and 2.</p>
 1182 </li>
 1183 <li>
 1184 <p>Add support for Intel Transactional Synchronization Extensions (TSX).</p>
 1185 </li>
 1186 <li>
 1187 <p>Add support for x32 ELF (32-bit ELF with the CPU in 64-bit mode.) See
 1188 <a href="nasmdoc8.html#section-8.9">section 8.9</a>.</p>
 1189 </li>
 1190 <li>
 1191 <p>Add support for bigendian UTF-16 and UTF-32. See
 1192 <a href="nasmdoc3.html#section-3.4.5">section 3.4.5</a>.</p>
 1193 </li>
 1194 </ul>
 1195 <h4 id="section-C.1.38">C.1.38 Version 2.09.10</h4>
 1196 <ul>
 1197 <li>
 1198 <p>Fix up NSIS script to protect uninstaller against registry keys absence
 1199 or corruption. It brings in a few additional questions to a user during
 1200 deinstallation procedure but still it is better than unpredictable file
 1201 removal.</p>
 1202 </li>
 1203 </ul>
 1204 <h4 id="section-C.1.39">C.1.39 Version 2.09.09</h4>
 1205 <ul>
 1206 <li>
 1207 <p>Fix initialization of section attributes of <code>bin</code> output
 1208 format.</p>
 1209 </li>
 1210 <li>
 1211 <p>Fix <code>mach64</code> output format bug that crashes NASM due to NULL
 1212 symbols.</p>
 1213 </li>
 1214 </ul>
 1215 <h4 id="section-C.1.40">C.1.40 Version 2.09.08</h4>
 1216 <ul>
 1217 <li>
 1218 <p>Fix <code>__OUTPUT_FORMAT__</code> assignment when output driver alias
 1219 is used. For example when <code>-f elf</code> is used
 1220 <code>__OUTPUT_FORMAT__</code> must be set to <code>elf</code>, if
 1221 <code>-f elf32</code> is used <code>__OUTPUT_FORMAT__</code> must be
 1222 assigned accordingly, i.e. to <code>elf32</code>. The rule applies to all
 1223 output driver aliases. See <a href="nasmdoc5.html#section-5.4">section
 1224 5.4</a>.</p>
 1225 </li>
 1226 </ul>
 1227 <h4 id="section-C.1.41">C.1.41 Version 2.09.07</h4>
 1228 <ul>
 1229 <li>
 1230 <p>Fix attempts to close same file several times when <code>-a</code>
 1231 option is used.</p>
 1232 </li>
 1233 <li>
 1234 <p>Fixes for VEXTRACTF128, VMASKMOVPS encoding.</p>
 1235 </li>
 1236 </ul>
 1237 <h4 id="section-C.1.42">C.1.42 Version 2.09.06</h4>
 1238 <ul>
 1239 <li>
 1240 <p>Fix missed section attribute initialization in <code>bin</code> output
 1241 target.</p>
 1242 </li>
 1243 </ul>
 1244 <h4 id="section-C.1.43">C.1.43 Version 2.09.05</h4>
 1245 <ul>
 1246 <li>
 1247 <p>Fix arguments encoding for VPEXTRW instruction.</p>
 1248 </li>
 1249 <li>
 1250 <p>Remove invalid form of VPEXTRW instruction.</p>
 1251 </li>
 1252 <li>
 1253 <p>Add <code>VLDDQU</code> as alias for <code>VLDQQU</code> to match
 1254 specification.</p>
 1255 </li>
 1256 </ul>
 1257 <h4 id="section-C.1.44">C.1.44 Version 2.09.04</h4>
 1258 <ul>
 1259 <li>
 1260 <p>Fix incorrect labels offset for VEX intructions.</p>
 1261 </li>
 1262 <li>
 1263 <p>Eliminate bogus warning on implicit operand size override.</p>
 1264 </li>
 1265 <li>
 1266 <p><code>%if</code> term could not handle 64 bit numbers.</p>
 1267 </li>
 1268 <li>
 1269 <p>The COFF backend was limiting relocations number to 16 bits even if in
 1270 real there were a way more relocations.</p>
 1271 </li>
 1272 </ul>
 1273 <h4 id="section-C.1.45">C.1.45 Version 2.09.03</h4>
 1274 <ul>
 1275 <li>
 1276 <p>Print <code>%macro</code> name inside <code>%rep</code> blocks on error.</p>
 1277 </li>
 1278 <li>
 1279 <p>Fix preprocessor expansion behaviour. It happened sometime too early and
 1280 sometime simply wrong. Move behaviour back to the origins (down to NASM
 1281 2.05.01).</p>
 1282 </li>
 1283 <li>
 1284 <p>Fix unitialized data dereference on OMF output format.</p>
 1285 </li>
 1286 <li>
 1287 <p>Issue warning on unterminated <code>%{</code> construct.</p>
 1288 </li>
 1289 <li>
 1290 <p>Fix for documentation typo.</p>
 1291 </li>
 1292 </ul>
 1293 <h4 id="section-C.1.46">C.1.46 Version 2.09.02</h4>
 1294 <ul>
 1295 <li>
 1296 <p>Fix reversed tokens when <code>%deftok</code> produces more than one
 1297 output token.</p>
 1298 </li>
 1299 <li>
 1300 <p>Fix segmentation fault on disassembling some VEX instructions.</p>
 1301 </li>
 1302 <li>
 1303 <p>Missing <code>%endif</code> did not always cause error.</p>
 1304 </li>
 1305 <li>
 1306 <p>Fix typo in documentation.</p>
 1307 </li>
 1308 <li>
 1309 <p>Compound context local preprocessor single line macro identifiers were
 1310 not expanded early enough and as result lead to unresolved symbols.</p>
 1311 </li>
 1312 </ul>
 1313 <h4 id="section-C.1.47">C.1.47 Version 2.09.01</h4>
 1314 <ul>
 1315 <li>
 1316 <p>Fix NULL dereference on missed %deftok second parameter.</p>
 1317 </li>
 1318 <li>
 1319 <p>Fix NULL dereference on invalid %substr parameters.</p>
 1320 </li>
 1321 </ul>
 1322 <h4 id="section-C.1.48">C.1.48 Version 2.09</h4>
 1323 <ul>
 1324 <li>
 1325 <p>Fixed assignment the magnitude of <code>%rep</code> counter. It is
 1326 limited to 62 bits now.</p>
 1327 </li>
 1328 <li>
 1329 <p>Fixed NULL dereference if argument of <code>%strlen</code> resolves to
 1330 whitespace. For example if nonexistent macro parameter is used.</p>
 1331 </li>
 1332 <li>
 1333 <p><code>%ifenv</code>, <code>%elifenv</code>, <code>%ifnenv</code>, and
 1334 <code>%elifnenv</code> directives introduced. See
 1335 <a href="nasmdoc4.html#section-4.4.9">section 4.4.9</a>.</p>
 1336 </li>
 1337 <li>
 1338 <p>Fixed NULL dereference if environment variable is missed.</p>
 1339 </li>
 1340 <li>
 1341 <p>Updates of new AVX v7 Intel instructions.</p>
 1342 </li>
 1343 <li>
 1344 <p><code>PUSH imm32</code> is now officially documented.</p>
 1345 </li>
 1346 <li>
 1347 <p>Fix for encoding the LFS, LGS and LSS in 64-bit mode.</p>
 1348 </li>
 1349 <li>
 1350 <p>Fixes for compatibility with OpenWatcom compiler and DOS 8.3 file format
 1351 limitation.</p>
 1352 </li>
 1353 <li>
 1354 <p>Macros parameters range expansion introduced. See
 1355 <a href="nasmdoc4.html#section-4.3.4">section 4.3.4</a>.</p>
 1356 </li>
 1357 <li>
 1358 <p>Backward compatibility on expanging of local sigle macros restored.</p>
 1359 </li>
 1360 <li>
 1361 <p>8 bit relocations for <code>elf</code> and <code>bin</code> output
 1362 formats are introduced.</p>
 1363 </li>
 1364 <li>
 1365 <p>Short intersegment jumps are permitted now.</p>
 1366 </li>
 1367 <li>
 1368 <p>An alignment more than 64 bytes are allowed for <code>win32</code>,
 1369 <code>win64</code> output formats.</p>
 1370 </li>
 1371 <li>
 1372 <p><code>SECTALIGN</code> directive introduced. See
 1373 <a href="nasmdoc5.html#section-5.10.2">section 5.10.2</a>.</p>
 1374 </li>
 1375 <li>
 1376 <p><code>nojmp</code> option introduced in <code>smartalign</code> package.
 1377 See <a href="nasmdoc6.html#section-6.2">section 6.2</a>.</p>
 1378 </li>
 1379 <li>
 1380 <p>Short aliases <code>win</code>, <code>elf</code> and <code>macho</code>
 1381 for output formats are introduced. Each stands for <code>win32</code>,
 1382 <code>elf32</code> and <code>macho32</code> accordingly.</p>
 1383 </li>
 1384 <li>
 1385 <p>Faster handling of missing directives implemented.</p>
 1386 </li>
 1387 <li>
 1388 <p>Various small improvements in documentation.</p>
 1389 </li>
 1390 <li>
 1391 <p>No hang anymore if unable to open malloc.log file.</p>
 1392 </li>
 1393 <li>
 1394 <p>The environments without vsnprintf function are able to build nasm
 1395 again.</p>
 1396 </li>
 1397 <li>
 1398 <p>AMD LWP instructions updated.</p>
 1399 </li>
 1400 <li>
 1401 <p>Tighten EA checks. We warn a user if there overflow in EA addressing.</p>
 1402 </li>
 1403 <li>
 1404 <p>Make <code>-Ox</code> the default optimization level. For the legacy
 1405 behavior, specify <code>-O0</code> explicitly. See
 1406 <a href="nasmdoc2.html#section-2.1.24">section 2.1.24</a>.</p>
 1407 </li>
 1408 <li>
 1409 <p>Environment variables read with <code>%!</code> or tested with
 1410 <code>%ifenv</code> can now contain non-identifier characters if surrounded
 1411 by quotes. See <a href="nasmdoc4.html#section-4.11.2">section 4.11.2</a>.</p>
 1412 </li>
 1413 <li>
 1414 <p>Add a new standard macro package <code>%use fp</code> for floating-point
 1415 convenience macros. See <a href="nasmdoc6.html#section-6.3">section
 1416 6.3</a>.</p>
 1417 </li>
 1418 </ul>
 1419 <h4 id="section-C.1.49">C.1.49 Version 2.08.02</h4>
 1420 <ul>
 1421 <li>
 1422 <p>Fix crash under certain circumstances when using the <code>%+</code>
 1423 operator.</p>
 1424 </li>
 1425 </ul>
 1426 <h4 id="section-C.1.50">C.1.50 Version 2.08.01</h4>
 1427 <ul>
 1428 <li>
 1429 <p>Fix the <code>%use</code> statement, which was broken in 2.08.</p>
 1430 </li>
 1431 </ul>
 1432 <h4 id="section-C.1.51">C.1.51 Version 2.08</h4>
 1433 <ul>
 1434 <li>
 1435 <p>A number of enhancements/fixes in macros area.</p>
 1436 </li>
 1437 <li>
 1438 <p>Support for converting strings to tokens. See
 1439 <a href="nasmdoc4.html#section-4.1.10">section 4.1.10</a>.</p>
 1440 </li>
 1441 <li>
 1442 <p>Fuzzy operand size logic introduced.</p>
 1443 </li>
 1444 <li>
 1445 <p>Fix COFF stack overrun on too long export identifiers.</p>
 1446 </li>
 1447 <li>
 1448 <p>Fix Macho-O alignment bug.</p>
 1449 </li>
 1450 <li>
 1451 <p>Fix crashes with &ndash;fwin32 on file with many exports.</p>
 1452 </li>
 1453 <li>
 1454 <p>Fix stack overrun for too long [DEBUG id].</p>
 1455 </li>
 1456 <li>
 1457 <p>Fix incorrect sbyte usage in IMUL (hit only if optimization flag
 1458 passed).</p>
 1459 </li>
 1460 <li>
 1461 <p>Append ending token for <code>.stabs</code> records in the ELF output
 1462 format.</p>
 1463 </li>
 1464 <li>
 1465 <p>New NSIS script which uses ModernUI and MultiUser approach.</p>
 1466 </li>
 1467 <li>
 1468 <p>Visual Studio 2008 NASM integration (rules file).</p>
 1469 </li>
 1470 <li>
 1471 <p>Warn a user if a constant is too long (and as result will be stripped).</p>
 1472 </li>
 1473 <li>
 1474 <p>The obsoleted pre-XOP AMD SSE5 instruction set which was never
 1475 actualized was removed.</p>
 1476 </li>
 1477 <li>
 1478 <p>Fix stack overrun on too long error file name passed from the command
 1479 line.</p>
 1480 </li>
 1481 <li>
 1482 <p>Bind symbols to the .text section by default (ie in case if SECTION
 1483 directive was omitted) in the ELF output format.</p>
 1484 </li>
 1485 <li>
 1486 <p>Fix sync points array index wrapping.</p>
 1487 </li>
 1488 <li>
 1489 <p>A few fixes for FMA4 and XOP instruction templates.</p>
 1490 </li>
 1491 <li>
 1492 <p>Add AMD Lightweight Profiling (LWP) instructions.</p>
 1493 </li>
 1494 <li>
 1495 <p>Fix the offset for <code>%arg</code> in 64-bit mode.</p>
 1496 </li>
 1497 <li>
 1498 <p>An undefined local macro (<code>%$</code>) no longer matches a global
 1499 macro with the same name.</p>
 1500 </li>
 1501 <li>
 1502 <p>Fix NULL dereference on too long local labels.</p>
 1503 </li>
 1504 </ul>
 1505 <h4 id="section-C.1.52">C.1.52 Version 2.07</h4>
 1506 <ul>
 1507 <li>
 1508 <p>NASM is now under the 2-clause BSD license. See
 1509 <a href="nasmdoc1.html#section-1.1.1">section 1.1.1</a>.</p>
 1510 </li>
 1511 <li>
 1512 <p>Fix the section type for the <code>.strtab</code> section in the
 1513 <code>elf64</code> output format.</p>
 1514 </li>
 1515 <li>
 1516 <p>Fix the handling of <code>COMMON</code> directives in the
 1517 <code>obj</code> output format.</p>
 1518 </li>
 1519 <li>
 1520 <p>New <code>ith</code> and <code>srec</code> output formats; these are
 1521 variants of the <code>bin</code> output format which output Intel hex and
 1522 Motorola S-records, respectively. See
 1523 <a href="nasmdoc8.html#section-8.2">section 8.2</a> and
 1524 <a href="nasmdoc8.html#section-8.3">section 8.3</a>.</p>
 1525 </li>
 1526 <li>
 1527 <p><code>rdf2ihx</code> replaced with an enhanced <code>rdf2bin</code>,
 1528 which can output binary, COM, Intel hex or Motorola S-records.</p>
 1529 </li>
 1530 <li>
 1531 <p>The Windows installer now puts the NASM directory first in the
 1532 <code>PATH</code> of the "NASM Shell".</p>
 1533 </li>
 1534 <li>
 1535 <p>Revert the early expansion behavior of <code>%+</code> to pre-2.06
 1536 behavior: <code>%+</code> is only expanded late.</p>
 1537 </li>
 1538 <li>
 1539 <p>Yet another Mach-O alignment fix.</p>
 1540 </li>
 1541 <li>
 1542 <p>Don't delete the list file on errors. Also, include error and warning
 1543 information in the list file.</p>
 1544 </li>
 1545 <li>
 1546 <p>Support for 64-bit Mach-O output, see
 1547 <a href="nasmdoc8.html#section-8.8">section 8.8</a>.</p>
 1548 </li>
 1549 <li>
 1550 <p>Fix assert failure on certain operations that involve strings with
 1551 high-bit bytes.</p>
 1552 </li>
 1553 </ul>
 1554 <h4 id="section-C.1.53">C.1.53 Version 2.06</h4>
 1555 <ul>
 1556 <li>
 1557 <p>This release is dedicated to the memory of Charles A. Crayne, long time
 1558 NASM developer as well as moderator of <code>comp.lang.asm.x86</code> and
 1559 author of the book <em>Serious Assembler</em>. We miss you, Chuck.</p>
 1560 </li>
 1561 <li>
 1562 <p>Support for indirect macro expansion (<code>%[...]</code>). See
 1563 <a href="nasmdoc4.html#section-4.1.3">section 4.1.3</a>.</p>
 1564 </li>
 1565 <li>
 1566 <p><code>%pop</code> can now take an argument, see
 1567 <a href="nasmdoc4.html#section-4.7.1">section 4.7.1</a>.</p>
 1568 </li>
 1569 <li>
 1570 <p>The argument to <code>%use</code> is no longer macro-expanded. Use
 1571 <code>%[...]</code> if macro expansion is desired.</p>
 1572 </li>
 1573 <li>
 1574 <p>Support for thread-local storage in ELF32 and ELF64. See
 1575 <a href="nasmdoc8.html#section-8.9.4">section 8.9.4</a>.</p>
 1576 </li>
 1577 <li>
 1578 <p>Fix crash on <code>%ifmacro</code> without an argument.</p>
 1579 </li>
 1580 <li>
 1581 <p>Correct the arguments to the <code>POPCNT</code> instruction.</p>
 1582 </li>
 1583 <li>
 1584 <p>Fix section alignment in the Mach-O format.</p>
 1585 </li>
 1586 <li>
 1587 <p>Update AVX support to version 5 of the Intel specification.</p>
 1588 </li>
 1589 <li>
 1590 <p>Fix the handling of accesses to context-local macros from higher levels
 1591 in the context stack.</p>
 1592 </li>
 1593 <li>
 1594 <p>Treat <code>WAIT</code> as a prefix rather than as an instruction,
 1595 thereby allowing constructs like <code>O16 FSAVE</code> to work correctly.</p>
 1596 </li>
 1597 <li>
 1598 <p>Support for structures with a non-zero base offset. See
 1599 <a href="nasmdoc5.html#section-5.9.1">section 5.9.1</a>.</p>
 1600 </li>
 1601 <li>
 1602 <p>Correctly handle preprocessor token concatenation (see
 1603 <a href="nasmdoc4.html#section-4.3.9">section 4.3.9</a>) involving
 1604 floating-point numbers.</p>
 1605 </li>
 1606 <li>
 1607 <p>The <code>PINSR</code> series of instructions have been corrected and
 1608 rationalized.</p>
 1609 </li>
 1610 <li>
 1611 <p>Removed AMD SSE5, replaced with the new XOP/FMA4/CVT16 (rev 3.03) spec.</p>
 1612 </li>
 1613 <li>
 1614 <p>The ELF backends no longer automatically generate a
 1615 <code>.comment</code> section.</p>
 1616 </li>
 1617 <li>
 1618 <p>Add additional "well-known" ELF sections with default attributes. See
 1619 <a href="nasmdoc8.html#section-8.9.2">section 8.9.2</a>.</p>
 1620 </li>
 1621 </ul>
 1622 <h4 id="section-C.1.54">C.1.54 Version 2.05.01</h4>
 1623 <ul>
 1624 <li>
 1625 <p>Fix the <code>-w</code>/<code>-W</code> option parsing, which was broken
 1626 in NASM 2.05.</p>
 1627 </li>
 1628 </ul>
 1629 <h4 id="section-C.1.55">C.1.55 Version 2.05</h4>
 1630 <ul>
 1631 <li>
 1632 <p>Fix redundant REX.W prefix on <code>JMP reg64</code>.</p>
 1633 </li>
 1634 <li>
 1635 <p>Make the behaviour of <code>-O0</code> match NASM 0.98 legacy behavior.
 1636 See <a href="nasmdoc2.html#section-2.1.24">section 2.1.24</a>.</p>
 1637 </li>
 1638 <li>
 1639 <p><code>-w-user</code> can be used to suppress the output of
 1640 <code>%warning</code> directives. See
 1641 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>.</p>
 1642 </li>
 1643 <li>
 1644 <p>Fix bug where <code>ALIGN</code> would issue a full alignment datum
 1645 instead of zero bytes.</p>
 1646 </li>
 1647 <li>
 1648 <p>Fix offsets in list files.</p>
 1649 </li>
 1650 <li>
 1651 <p>Fix <code>%include</code> inside multi-line macros or loops.</p>
 1652 </li>
 1653 <li>
 1654 <p>Fix error where NASM would generate a spurious warning on valid
 1655 optimizations of immediate values.</p>
 1656 </li>
 1657 <li>
 1658 <p>Fix arguments to a number of the <code>CVT</code> SSE instructions.</p>
 1659 </li>
 1660 <li>
 1661 <p>Fix RIP-relative offsets when the instruction carries an immediate.</p>
 1662 </li>
 1663 <li>
 1664 <p>Massive overhaul of the ELF64 backend for spec compliance.</p>
 1665 </li>
 1666 <li>
 1667 <p>Fix the Geode <code>PFRCPV</code> and <code>PFRSQRTV</code> instruction.</p>
 1668 </li>
 1669 <li>
 1670 <p>Fix the SSE 4.2 <code>CRC32</code> instruction.</p>
 1671 </li>
 1672 </ul>
 1673 <h4 id="section-C.1.56">C.1.56 Version 2.04</h4>
 1674 <ul>
 1675 <li>
 1676 <p>Sanitize macro handing in the <code>%error</code> directive.</p>
 1677 </li>
 1678 <li>
 1679 <p>New <code>%warning</code> directive to issue user-controlled warnings.</p>
 1680 </li>
 1681 <li>
 1682 <p><code>%error</code> directives are now deferred to the final assembly
 1683 phase.</p>
 1684 </li>
 1685 <li>
 1686 <p>New <code>%fatal</code> directive to immediately terminate assembly.</p>
 1687 </li>
 1688 <li>
 1689 <p>New <code>%strcat</code> directive to join quoted strings together.</p>
 1690 </li>
 1691 <li>
 1692 <p>New <code>%use</code> macro directive to support standard macro
 1693 directives. See <a href="nasmdoc4.html#section-4.6.4">section 4.6.4</a>.</p>
 1694 </li>
 1695 <li>
 1696 <p>Excess default parameters to <code>%macro</code> now issues a warning by
 1697 default. See <a href="nasmdoc4.html#section-4.3">section 4.3</a>.</p>
 1698 </li>
 1699 <li>
 1700 <p>Fix <code>%ifn</code> and <code>%elifn</code>.</p>
 1701 </li>
 1702 <li>
 1703 <p>Fix nested <code>%else</code> clauses.</p>
 1704 </li>
 1705 <li>
 1706 <p>Correct the handling of nested <code>%rep</code>s.</p>
 1707 </li>
 1708 <li>
 1709 <p>New <code>%unmacro</code> directive to undeclare a multi-line macro. See
 1710 <a href="nasmdoc4.html#section-4.3.12">section 4.3.12</a>.</p>
 1711 </li>
 1712 <li>
 1713 <p>Builtin macro <code>__PASS__</code> which expands to the current
 1714 assembly pass. See <a href="nasmdoc5.html#section-5.8">section 5.8</a>.</p>
 1715 </li>
 1716 <li>
 1717 <p><code>__utf16__</code> and <code>__utf32__</code> operators to generate
 1718 UTF-16 and UTF-32 strings. See
 1719 <a href="nasmdoc3.html#section-3.4.5">section 3.4.5</a>.</p>
 1720 </li>
 1721 <li>
 1722 <p>Fix bug in case-insensitive matching when compiled on platforms that
 1723 don't use the <code>configure</code> script. Of the official release
 1724 binaries, that only affected the OS/2 binary.</p>
 1725 </li>
 1726 <li>
 1727 <p>Support for x87 packed BCD constants. See
 1728 <a href="nasmdoc3.html#section-3.4.7">section 3.4.7</a>.</p>
 1729 </li>
 1730 <li>
 1731 <p>Correct the <code>LTR</code> and <code>SLDT</code> instructions in
 1732 64-bit mode.</p>
 1733 </li>
 1734 <li>
 1735 <p>Fix unnecessary REX.W prefix on indirect jumps in 64-bit mode.</p>
 1736 </li>
 1737 <li>
 1738 <p>Add AVX versions of the AES instructions (<code>VAES</code>...).</p>
 1739 </li>
 1740 <li>
 1741 <p>Fix the 256-bit FMA instructions.</p>
 1742 </li>
 1743 <li>
 1744 <p>Add 256-bit AVX stores per the latest AVX spec.</p>
 1745 </li>
 1746 <li>
 1747 <p>VIA XCRYPT instructions can now be written either with or without
 1748 <code>REP</code>, apparently different versions of the VIA spec wrote them
 1749 differently.</p>
 1750 </li>
 1751 <li>
 1752 <p>Add missing 64-bit <code>MOVNTI</code> instruction.</p>
 1753 </li>
 1754 <li>
 1755 <p>Fix the operand size of <code>VMREAD</code> and <code>VMWRITE</code>.</p>
 1756 </li>
 1757 <li>
 1758 <p>Numerous bug fixes, especially to the AES, AVX and VTX instructions.</p>
 1759 </li>
 1760 <li>
 1761 <p>The optimizer now always runs until it converges. It also runs even when
 1762 disabled, but doesn't optimize. This allows most forward references to be
 1763 resolved properly.</p>
 1764 </li>
 1765 <li>
 1766 <p><code>%push</code> no longer needs a context identifier; omitting the
 1767 context identifier results in an anonymous context.</p>
 1768 </li>
 1769 </ul>
 1770 <h4 id="section-C.1.57">C.1.57 Version 2.03.01</h4>
 1771 <ul>
 1772 <li>
 1773 <p>Fix buffer overflow in the listing module.</p>
 1774 </li>
 1775 <li>
 1776 <p>Fix the handling of hexadecimal escape codes in `...` strings.</p>
 1777 </li>
 1778 <li>
 1779 <p>The Postscript/PDF documentation has been reformatted.</p>
 1780 </li>
 1781 <li>
 1782 <p>The <code>-F</code> option now implies <code>-g</code>.</p>
 1783 </li>
 1784 </ul>
 1785 <h4 id="section-C.1.58">C.1.58 Version 2.03</h4>
 1786 <ul>
 1787 <li>
 1788 <p>Add support for Intel AVX, CLMUL and FMA instructions, including YMM
 1789 registers.</p>
 1790 </li>
 1791 <li>
 1792 <p><code>dy</code>, <code>resy</code> and <code>yword</code> for 32-byte
 1793 operands.</p>
 1794 </li>
 1795 <li>
 1796 <p>Fix some SSE5 instructions.</p>
 1797 </li>
 1798 <li>
 1799 <p>Intel <code>INVEPT</code>, <code>INVVPID</code> and <code>MOVBE</code>
 1800 instructions.</p>
 1801 </li>
 1802 <li>
 1803 <p>Fix checking for critical expressions when the optimizer is enabled.</p>
 1804 </li>
 1805 <li>
 1806 <p>Support the DWARF debugging format for ELF targets.</p>
 1807 </li>
 1808 <li>
 1809 <p>Fix optimizations of signed bytes.</p>
 1810 </li>
 1811 <li>
 1812 <p>Fix operation on bigendian machines.</p>
 1813 </li>
 1814 <li>
 1815 <p>Fix buffer overflow in the preprocessor.</p>
 1816 </li>
 1817 <li>
 1818 <p><code>SAFESEH</code> support for Win32, <code>IMAGEREL</code> for Win64
 1819 (SEH).</p>
 1820 </li>
 1821 <li>
 1822 <p><code>%?</code> and <code>%??</code> to refer to the name of a macro
 1823 itself. In particular, <code>%idefine keyword $%?</code> can be used to
 1824 make a keyword "disappear".</p>
 1825 </li>
 1826 <li>
 1827 <p>New options for dependency generation: <code>-MD</code>,
 1828 <code>-MF</code>, <code>-MP</code>, <code>-MT</code>, <code>-MQ</code>.</p>
 1829 </li>
 1830 <li>
 1831 <p>New preprocessor directives <code>%pathsearch</code> and
 1832 <code>%depend</code>; INCBIN reimplemented as a macro.</p>
 1833 </li>
 1834 <li>
 1835 <p><code>%include</code> now resolves macros in a sane manner.</p>
 1836 </li>
 1837 <li>
 1838 <p><code>%substr</code> can now be used to get other than one-character
 1839 substrings.</p>
 1840 </li>
 1841 <li>
 1842 <p>New type of character/string constants, using backquotes
 1843 (<code>`...`</code>), which support C-style escape sequences.</p>
 1844 </li>
 1845 <li>
 1846 <p><code>%defstr</code> and <code>%idefstr</code> to stringize macro
 1847 definitions before creation.</p>
 1848 </li>
 1849 <li>
 1850 <p>Fix forward references used in <code>EQU</code> statements.</p>
 1851 </li>
 1852 </ul>
 1853 <h4 id="section-C.1.59">C.1.59 Version 2.02</h4>
 1854 <ul>
 1855 <li>
 1856 <p>Additional fixes for MMX operands with explicit <code>qword</code>, as
 1857 well as (hopefully) SSE operands with <code>oword</code>.</p>
 1858 </li>
 1859 <li>
 1860 <p>Fix handling of truncated strings with <code>DO</code>.</p>
 1861 </li>
 1862 <li>
 1863 <p>Fix segfaults due to memory overwrites when floating-point constants
 1864 were used.</p>
 1865 </li>
 1866 <li>
 1867 <p>Fix segfaults due to missing include files.</p>
 1868 </li>
 1869 <li>
 1870 <p>Fix OpenWatcom Makefiles for DOS and OS/2.</p>
 1871 </li>
 1872 <li>
 1873 <p>Add autogenerated instruction list back into the documentation.</p>
 1874 </li>
 1875 <li>
 1876 <p>ELF: Fix segfault when generating stabs, and no symbols have been
 1877 defined.</p>
 1878 </li>
 1879 <li>
 1880 <p>ELF: Experimental support for DWARF debugging information.</p>
 1881 </li>
 1882 <li>
 1883 <p>New compile date and time standard macros.</p>
 1884 </li>
 1885 <li>
 1886 <p><code>%ifnum</code> now returns true for negative numbers.</p>
 1887 </li>
 1888 <li>
 1889 <p>New <code>%iftoken</code> test for a single token.</p>
 1890 </li>
 1891 <li>
 1892 <p>New <code>%ifempty</code> test for empty expansion.</p>
 1893 </li>
 1894 <li>
 1895 <p>Add support for the <code>XSAVE</code> instruction group.</p>
 1896 </li>
 1897 <li>
 1898 <p>Makefile for Netware/gcc.</p>
 1899 </li>
 1900 <li>
 1901 <p>Fix issue with some warnings getting emitted way too many times.</p>
 1902 </li>
 1903 <li>
 1904 <p>Autogenerated instruction list added to the documentation.</p>
 1905 </li>
 1906 </ul>
 1907 <h4 id="section-C.1.60">C.1.60 Version 2.01</h4>
 1908 <ul>
 1909 <li>
 1910 <p>Fix the handling of MMX registers with explicit <code>qword</code> tags
 1911 on memory (broken in 2.00 due to 64-bit changes.)</p>
 1912 </li>
 1913 <li>
 1914 <p>Fix the PREFETCH instructions.</p>
 1915 </li>
 1916 <li>
 1917 <p>Fix the documentation.</p>
 1918 </li>
 1919 <li>
 1920 <p>Fix debugging info when using <code>-f elf</code> (backwards
 1921 compatibility alias for <code>-f elf32</code>).</p>
 1922 </li>
 1923 <li>
 1924 <p>Man pages for rdoff tools (from the Debian project.)</p>
 1925 </li>
 1926 <li>
 1927 <p>ELF: handle large numbers of sections.</p>
 1928 </li>
 1929 <li>
 1930 <p>Fix corrupt output when the optimizer runs out of passes.</p>
 1931 </li>
 1932 </ul>
 1933 <h4 id="section-C.1.61">C.1.61 Version 2.00</h4>
 1934 <ul>
 1935 <li>
 1936 <p>Added c99 data-type compliance.</p>
 1937 </li>
 1938 <li>
 1939 <p>Added general x86-64 support.</p>
 1940 </li>
 1941 <li>
 1942 <p>Added win64 (x86-64 COFF) output format.</p>
 1943 </li>
 1944 <li>
 1945 <p>Added <code>__BITS__</code> standard macro.</p>
 1946 </li>
 1947 <li>
 1948 <p>Renamed the <code>elf</code> output format to <code>elf32</code> for
 1949 clarity.</p>
 1950 </li>
 1951 <li>
 1952 <p>Added <code>elf64</code> and <code>macho</code> (MacOS X) output
 1953 formats.</p>
 1954 </li>
 1955 <li>
 1956 <p>Added Numeric constants in <code>dq</code> directive.</p>
 1957 </li>
 1958 <li>
 1959 <p>Added <code>oword</code>, <code>do</code> and <code>reso</code> pseudo
 1960 operands.</p>
 1961 </li>
 1962 <li>
 1963 <p>Allow underscores in numbers.</p>
 1964 </li>
 1965 <li>
 1966 <p>Added 8-, 16- and 128-bit floating-point formats.</p>
 1967 </li>
 1968 <li>
 1969 <p>Added binary, octal and hexadecimal floating-point.</p>
 1970 </li>
 1971 <li>
 1972 <p>Correct the generation of floating-point constants.</p>
 1973 </li>
 1974 <li>
 1975 <p>Added floating-point option control.</p>
 1976 </li>
 1977 <li>
 1978 <p>Added Infinity and NaN floating point support.</p>
 1979 </li>
 1980 <li>
 1981 <p>Added ELF Symbol Visibility support.</p>
 1982 </li>
 1983 <li>
 1984 <p>Added setting OSABI value in ELF header directive.</p>
 1985 </li>
 1986 <li>
 1987 <p>Added Generate Makefile Dependencies option.</p>
 1988 </li>
 1989 <li>
 1990 <p>Added Unlimited Optimization Passes option.</p>
 1991 </li>
 1992 <li>
 1993 <p>Added <code>%IFN</code> and <code>%ELIFN</code> support.</p>
 1994 </li>
 1995 <li>
 1996 <p>Added Logical Negation Operator.</p>
 1997 </li>
 1998 <li>
 1999 <p>Enhanced Stack Relative Preprocessor Directives.</p>
 2000 </li>
 2001 <li>
 2002 <p>Enhanced ELF Debug Formats.</p>
 2003 </li>
 2004 <li>
 2005 <p>Enhanced Send Errors to a File option.</p>
 2006 </li>
 2007 <li>
 2008 <p>Added SSSE3, SSE4.1, SSE4.2, SSE5 support.</p>
 2009 </li>
 2010 <li>
 2011 <p>Added a large number of additional instructions.</p>
 2012 </li>
 2013 <li>
 2014 <p>Significant performance improvements.</p>
 2015 </li>
 2016 <li>
 2017 <p><code>-w+warning</code> and <code>-w-warning</code> can now be written
 2018 as &ndash;Wwarning and &ndash;Wno-warning, respectively. See
 2019 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>.</p>
 2020 </li>
 2021 <li>
 2022 <p>Add <code>-w+error</code> to treat warnings as errors. See
 2023 <a href="nasmdoc2.html#section-2.1.26">section 2.1.26</a>.</p>
 2024 </li>
 2025 <li>
 2026 <p>Add <code>-w+all</code> and <code>-w-all</code> to enable or disable all
 2027 suppressible warnings. See <a href="nasmdoc2.html#section-2.1.26">section
 2028 2.1.26</a>.</p>
 2029 </li>
 2030 </ul>
 2031 <h3 id="section-C.2">C.2 NASM 0.98 Series</h3>
 2032 <p>The 0.98 series was the production versions of NASM from 1999 to 2007.</p>
 2033 <h4 id="section-C.2.1">C.2.1 Version 0.98.39</h4>
 2034 <ul>
 2035 <li>
 2036 <p>fix buffer overflow</p>
 2037 </li>
 2038 <li>
 2039 <p>fix outas86's <code>.bss</code> handling</p>
 2040 </li>
 2041 <li>
 2042 <p>"make spotless" no longer deletes config.h.in.</p>
 2043 </li>
 2044 <li>
 2045 <p><code>%(el)if(n)idn</code> insensitivity to string quotes difference
 2046 (#809300).</p>
 2047 </li>
 2048 <li>
 2049 <p>(nasm.c)<code>__OUTPUT_FORMAT__</code> changed to string value instead
 2050 of symbol.</p>
 2051 </li>
 2052 </ul>
 2053 <h4 id="section-C.2.2">C.2.2 Version 0.98.38</h4>
 2054 <ul>
 2055 <li>
 2056 <p>Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
 2057 <code>mkdep.pl</code> to be able to generate completely pathless
 2058 dependencies, as required by OpenWatcom wmake (it supports path searches,
 2059 but not explicit paths.)</p>
 2060 </li>
 2061 <li>
 2062 <p>Fix the <code>STR</code> instruction.</p>
 2063 </li>
 2064 <li>
 2065 <p>Fix the ELF output format, which was broken under certain circumstances
 2066 due to the addition of stabs support.</p>
 2067 </li>
 2068 <li>
 2069 <p>Quick-fix Borland format debug-info for <code>-f obj</code></p>
 2070 </li>
 2071 <li>
 2072 <p>Fix for <code>%rep</code> with no arguments (#560568)</p>
 2073 </li>
 2074 <li>
 2075 <p>Fix concatenation of preprocessor function call (#794686)</p>
 2076 </li>
 2077 <li>
 2078 <p>Fix long label causes coredump (#677841)</p>
 2079 </li>
 2080 <li>
 2081 <p>Use autoheader as well as autoconf to keep configure from generating
 2082 ridiculously long command lines.</p>
 2083 </li>
 2084 <li>
 2085 <p>Make sure that all of the formats which support debugging output
 2086 actually will suppress debugging output when <code>-g</code> not specified.</p>
 2087 </li>
 2088 </ul>
 2089 <h4 id="section-C.2.3">C.2.3 Version 0.98.37</h4>
 2090 <ul>
 2091 <li>
 2092 <p>Paths given in <code>-I</code> switch searched for
 2093 <code>incbin</code>&ndash;ed as well as <code>%include</code>&ndash;ed
 2094 files.</p>
 2095 </li>
 2096 <li>
 2097 <p>Added stabs debugging for the ELF output format, patch from Martin
 2098 Wawro.</p>
 2099 </li>
 2100 <li>
 2101 <p>Fix <code>output/outbin.c</code> to allow origin &gt; 80000000h.</p>
 2102 </li>
 2103 <li>
 2104 <p>Make <code>-U</code> switch work.</p>
 2105 </li>
 2106 <li>
 2107 <p>Fix the use of relative offsets with explicit prefixes, e.g.
 2108 <code>a32 loop foo</code>.</p>
 2109 </li>
 2110 <li>
 2111 <p>Remove <code>backslash()</code>.</p>
 2112 </li>
 2113 <li>
 2114 <p>Fix the <code>SMSW</code> and <code>SLDT</code> instructions.</p>
 2115 </li>
 2116 <li>
 2117 <p><code>-O2</code> and <code>-O3</code> are no longer aliases for
 2118 <code>-O10</code> and <code>-O15</code>. If you mean the latter, please say
 2119 so! :)</p>
 2120 </li>
 2121 </ul>
 2122 <h4 id="section-C.2.4">C.2.4 Version 0.98.36</h4>
 2123 <ul>
 2124 <li>
 2125 <p>Update rdoff &ndash; librarian/archiver &ndash; common rec &ndash; docs!</p>
 2126 </li>
 2127 <li>
 2128 <p>Fix signed/unsigned problems.</p>
 2129 </li>
 2130 <li>
 2131 <p>Fix <code>JMP FAR label</code> and <code>CALL FAR label</code>.</p>
 2132 </li>
 2133 <li>
 2134 <p>Add new multisection support &ndash; map files &ndash; fix align bug</p>
 2135 </li>
 2136 <li>
 2137 <p>Fix sysexit, movhps/movlps reg,reg bugs in insns.dat</p>
 2138 </li>
 2139 <li>
 2140 <p><code>Q</code> or <code>O</code> suffixes indicate octal</p>
 2141 </li>
 2142 <li>
 2143 <p>Support Prescott new instructions (PNI).</p>
 2144 </li>
 2145 <li>
 2146 <p>Cyrix <code>XSTORE</code> instruction.</p>
 2147 </li>
 2148 </ul>
 2149 <h4 id="section-C.2.5">C.2.5 Version 0.98.35</h4>
 2150 <ul>
 2151 <li>
 2152 <p>Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler
 2153 bug.)</p>
 2154 </li>
 2155 <li>
 2156 <p>Fix dependencies and compiler warnings.</p>
 2157 </li>
 2158 <li>
 2159 <p>Add "const" in a number of places.</p>
 2160 </li>
 2161 <li>
 2162 <p>Add &ndash;X option to specify error reporting format (use &ndash;Xvc to
 2163 integrate with Microsoft Visual Studio.)</p>
 2164 </li>
 2165 <li>
 2166 <p>Minor changes for code legibility.</p>
 2167 </li>
 2168 <li>
 2169 <p>Drop use of tmpnam() in rdoff (security fix.)</p>
 2170 </li>
 2171 </ul>
 2172 <h4 id="section-C.2.6">C.2.6 Version 0.98.34</h4>
 2173 <ul>
 2174 <li>
 2175 <p>Correct additional address-size vs. operand-size confusions.</p>
 2176 </li>
 2177 <li>
 2178 <p>Generate dependencies for all Makefiles automatically.</p>
 2179 </li>
 2180 <li>
 2181 <p>Add support for unimplemented (but theoretically available) registers
 2182 such as tr0 and cr5. Segment registers 6 and 7 are called segr6 and segr7
 2183 for the operations which they can be represented.</p>
 2184 </li>
 2185 <li>
 2186 <p>Correct some disassembler bugs related to redundant address-size
 2187 prefixes. Some work still remains in this area.</p>
 2188 </li>
 2189 <li>
 2190 <p>Correctly generate an error for things like "SEG eax".</p>
 2191 </li>
 2192 <li>
 2193 <p>Add the JMPE instruction, enabled by "CPU IA64".</p>
 2194 </li>
 2195 <li>
 2196 <p>Correct compilation on newer gcc/glibc platforms.</p>
 2197 </li>
 2198 <li>
 2199 <p>Issue an error on things like "jmp far eax".</p>
 2200 </li>
 2201 </ul>
 2202 <h4 id="section-C.2.7">C.2.7 Version 0.98.33</h4>
 2203 <ul>
 2204 <li>
 2205 <p>New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to round
 2206 out the version-query macros. version.pl now understands X.YYplWW or
 2207 X.YY.ZZplWW as a version number, equivalent to X.YY.ZZ.WW (or X.YY.0.WW, as
 2208 appropriate).</p>
 2209 </li>
 2210 <li>
 2211 <p>New keyword "strict" to disable the optimization of specific operands.</p>
 2212 </li>
 2213 <li>
 2214 <p>Fix the handing of size overrides with JMP instructions (instructions
 2215 such as "jmp dword foo".)</p>
 2216 </li>
 2217 <li>
 2218 <p>Fix the handling of "ABSOLUTE label", where "label" points into a
 2219 relocatable segment.</p>
 2220 </li>
 2221 <li>
 2222 <p>Fix OBJ output format with lots of externs.</p>
 2223 </li>
 2224 <li>
 2225 <p>More documentation updates.</p>
 2226 </li>
 2227 <li>
 2228 <p>Add &ndash;Ov option to get verbose information about optimizations.</p>
 2229 </li>
 2230 <li>
 2231 <p>Undo a braindead change which broke <code>%elif</code> directives.</p>
 2232 </li>
 2233 <li>
 2234 <p>Makefile updates.</p>
 2235 </li>
 2236 </ul>
 2237 <h4 id="section-C.2.8">C.2.8 Version 0.98.32</h4>
 2238 <ul>
 2239 <li>
 2240 <p>Fix NASM crashing when <code>%macro</code> directives were left
 2241 unterminated.</p>
 2242 </li>
 2243 <li>
 2244 <p>Lots of documentation updates.</p>
 2245 </li>
 2246 <li>
 2247 <p>Complete rewrite of the PostScript/PDF documentation generator.</p>
 2248 </li>
 2249 <li>
 2250 <p>The MS Visual C++ Makefile was updated and corrected.</p>
 2251 </li>
 2252 <li>
 2253 <p>Recognize .rodata as a standard section name in ELF.</p>
 2254 </li>
 2255 <li>
 2256 <p>Fix some obsolete Perl4-isms in Perl scripts.</p>
 2257 </li>
 2258 <li>
 2259 <p>Fix configure.in to work with autoconf 2.5x.</p>
 2260 </li>
 2261 <li>
 2262 <p>Fix a couple of "make cleaner" misses.</p>
 2263 </li>
 2264 <li>
 2265 <p>Make the normal "./configure &amp;&amp; make" work with Cygwin.</p>
 2266 </li>
 2267 </ul>
 2268 <h4 id="section-C.2.9">C.2.9 Version 0.98.31</h4>
 2269 <ul>
 2270 <li>
 2271 <p>Correctly build in a separate object directory again.</p>
 2272 </li>
 2273 <li>
 2274 <p>Derive all references to the version number from the version file.</p>
 2275 </li>
 2276 <li>
 2277 <p>New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.</p>
 2278 </li>
 2279 <li>
 2280 <p>Lots of Makefile updates and bug fixes.</p>
 2281 </li>
 2282 <li>
 2283 <p>New <code>%ifmacro</code> directive to test for multiline macros.</p>
 2284 </li>
 2285 <li>
 2286 <p>Documentation updates.</p>
 2287 </li>
 2288 <li>
 2289 <p>Fixes for 16-bit OBJ format output.</p>
 2290 </li>
 2291 <li>
 2292 <p>Changed the NASM environment variable to NASMENV.</p>
 2293 </li>
 2294 </ul>
 2295 <h4 id="section-C.2.10">C.2.10 Version 0.98.30</h4>
 2296 <ul>
 2297 <li>
 2298 <p>Changed doc files a lot: completely removed old READMExx and Wishlist
 2299 files, incorporating all information in CHANGES and TODO.</p>
 2300 </li>
 2301 <li>
 2302 <p>I waited a long time to rename zoutieee.c to (original) outieee.c</p>
 2303 </li>
 2304 <li>
 2305 <p>moved all output modules to output/ subdirectory.</p>
 2306 </li>
 2307 <li>
 2308 <p>Added 'make strip' target to strip debug info from nasm &amp; ndisasm.</p>
 2309 </li>
 2310 <li>
 2311 <p>Added INSTALL file with installation instructions.</p>
 2312 </li>
 2313 <li>
 2314 <p>Added &ndash;v option description to nasm man.</p>
 2315 </li>
 2316 <li>
 2317 <p>Added dist makefile target to produce source distributions.</p>
 2318 </li>
 2319 <li>
 2320 <p>16-bit support for ELF output format (GNU extension, but useful.)</p>
 2321 </li>
 2322 </ul>
 2323 <h4 id="section-C.2.11">C.2.11 Version 0.98.28</h4>
 2324 <ul>
 2325 <li>
 2326 <p>Fastcooked this for Debian's Woody release: Frank applied the INCBIN bug
 2327 patch to 0.98.25alt and called it 0.98.28 to not confuse poor little
 2328 apt-get.</p>
 2329 </li>
 2330 </ul>
 2331 <h4 id="section-C.2.12">C.2.12 Version 0.98.26</h4>
 2332 <ul>
 2333 <li>
 2334 <p>Reorganised files even better from 0.98.25alt</p>
 2335 </li>
 2336 </ul>
 2337 <h4 id="section-C.2.13">C.2.13 Version 0.98.25alt</h4>
 2338 <ul>
 2339 <li>
 2340 <p>Prettified the source tree. Moved files to more reasonable places.</p>
 2341 </li>
 2342 <li>
 2343 <p>Added findleak.pl script to misc/ directory.</p>
 2344 </li>
 2345 <li>
 2346 <p>Attempted to fix doc.</p>
 2347 </li>
 2348 </ul>
 2349 <h4 id="section-C.2.14">C.2.14 Version 0.98.25</h4>
 2350 <ul>
 2351 <li>
 2352 <p>Line continuation character <code>\</code>.</p>
 2353 </li>
 2354 <li>
 2355 <p>Docs inadvertantly reverted &ndash; "dos packaging".</p>
 2356 </li>
 2357 </ul>
 2358 <h4 id="section-C.2.15">C.2.15 Version 0.98.24p1</h4>
 2359 <ul>
 2360 <li>
 2361 <p>FIXME: Someone, document this please.</p>
 2362 </li>
 2363 </ul>
 2364 <h4 id="section-C.2.16">C.2.16 Version 0.98.24</h4>
 2365 <ul>
 2366 <li>
 2367 <p>Documentation &ndash; Ndisasm doc added to Nasm.doc.</p>
 2368 </li>
 2369 </ul>
 2370 <h4 id="section-C.2.17">C.2.17 Version 0.98.23</h4>
 2371 <ul>
 2372 <li>
 2373 <p>Attempted to remove rdoff version1</p>
 2374 </li>
 2375 <li>
 2376 <p>Lino Mastrodomenico's patches to preproc.c (%$$ bug?).</p>
 2377 </li>
 2378 </ul>
 2379 <h4 id="section-C.2.18">C.2.18 Version 0.98.22</h4>
 2380 <ul>
 2381 <li>
 2382 <p>Update rdoff2 &ndash; attempt to remove v1.</p>
 2383 </li>
 2384 </ul>
 2385 <h4 id="section-C.2.19">C.2.19 Version 0.98.21</h4>
 2386 <ul>
 2387 <li>
 2388 <p>Optimization fixes.</p>
 2389 </li>
 2390 </ul>
 2391 <h4 id="section-C.2.20">C.2.20 Version 0.98.20</h4>
 2392 <ul>
 2393 <li>
 2394 <p>Optimization fixes.</p>
 2395 </li>
 2396 </ul>
 2397 <h4 id="section-C.2.21">C.2.21 Version 0.98.19</h4>
 2398 <ul>
 2399 <li>
 2400 <p>H. J. Lu's patch back out.</p>
 2401 </li>
 2402 </ul>
 2403 <h4 id="section-C.2.22">C.2.22 Version 0.98.18</h4>
 2404 <ul>
 2405 <li>
 2406 <p>Added ".rdata" to "-f win32".</p>
 2407 </li>
 2408 </ul>
 2409 <h4 id="section-C.2.23">C.2.23 Version 0.98.17</h4>
 2410 <ul>
 2411 <li>
 2412 <p>H. J. Lu's "bogus elf" patch. (Red Hat problem?)</p>
 2413 </li>
 2414 </ul>
 2415 <h4 id="section-C.2.24">C.2.24 Version 0.98.16</h4>
 2416 <ul>
 2417 <li>
 2418 <p>Fix whitespace before "[section ..." bug.</p>
 2419 </li>
 2420 </ul>
 2421 <h4 id="section-C.2.25">C.2.25 Version 0.98.15</h4>
 2422 <ul>
 2423 <li>
 2424 <p>Rdoff changes (?).</p>
 2425 </li>
 2426 <li>
 2427 <p>Fix fixes to memory leaks.</p>
 2428 </li>
 2429 </ul>
 2430 <h4 id="section-C.2.26">C.2.26 Version 0.98.14</h4>
 2431 <ul>
 2432 <li>
 2433 <p>Fix memory leaks.</p>
 2434 </li>
 2435 </ul>
 2436 <h4 id="section-C.2.27">C.2.27 Version 0.98.13</h4>
 2437 <ul>
 2438 <li>
 2439 <p>There was no 0.98.13</p>
 2440 </li>
 2441 </ul>
 2442 <h4 id="section-C.2.28">C.2.28 Version 0.98.12</h4>
 2443 <ul>
 2444 <li>
 2445 <p>Update optimization (new function of "-O1")</p>
 2446 </li>
 2447 <li>
 2448 <p>Changes to test/bintest.asm (?).</p>
 2449 </li>
 2450 </ul>
 2451 <h4 id="section-C.2.29">C.2.29 Version 0.98.11</h4>
 2452 <ul>
 2453 <li>
 2454 <p>Optimization changes.</p>
 2455 </li>
 2456 <li>
 2457 <p>Ndisasm fixed.</p>
 2458 </li>
 2459 </ul>
 2460 <h4 id="section-C.2.30">C.2.30 Version 0.98.10</h4>
 2461 <ul>
 2462 <li>
 2463 <p>There was no 0.98.10</p>
 2464 </li>
 2465 </ul>
 2466 <h4 id="section-C.2.31">C.2.31 Version 0.98.09</h4>
 2467 <ul>
 2468 <li>
 2469 <p>Add multiple sections support to "-f bin".</p>
 2470 </li>
 2471 <li>
 2472 <p>Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.</p>
 2473 </li>
 2474 <li>
 2475 <p>Add "-v" as an alias to the "-r" switch.</p>
 2476 </li>
 2477 <li>
 2478 <p>Remove "#ifdef" from Tasm compatibility options.</p>
 2479 </li>
 2480 <li>
 2481 <p>Remove redundant size-overrides on "mov ds, ex", etc.</p>
 2482 </li>
 2483 <li>
 2484 <p>Fixes to SSE2, other insns.dat (?).</p>
 2485 </li>
 2486 <li>
 2487 <p>Enable uppercase "I" and "P" switches.</p>
 2488 </li>
 2489 <li>
 2490 <p>Case insinsitive "seg" and "wrt".</p>
 2491 </li>
 2492 <li>
 2493 <p>Update install.sh (?).</p>
 2494 </li>
 2495 <li>
 2496 <p>Allocate tokens in blocks.</p>
 2497 </li>
 2498 <li>
 2499 <p>Improve "invalid effective address" messages.</p>
 2500 </li>
 2501 </ul>
 2502 <h4 id="section-C.2.32">C.2.32 Version 0.98.08</h4>
 2503 <ul>
 2504 <li>
 2505 <p>Add "<code>%strlen</code>" and "<code>%substr</code>" macro operators</p>
 2506 </li>
 2507 <li>
 2508 <p>Fixed broken c16.mac.</p>
 2509 </li>
 2510 <li>
 2511 <p>Unterminated string error reported.</p>
 2512 </li>
 2513 <li>
 2514 <p>Fixed bugs as per 0.98bf</p>
 2515 </li>
 2516 </ul>
 2517 <h4 id="section-C.2.33">C.2.33 Version 0.98.09b with John Coffman patches released 28-Oct-2001</h4>
 2518 <p>Changes from 0.98.07 release to 98.09b as of 28-Oct-2001</p>
 2519 <ul>
 2520 <li>
 2521 <p>More closely compatible with 0.98 when &ndash;O0 is implied or
 2522 specified. Not strictly identical, since backward branches in range of
 2523 short offsets are recognized, and signed byte values with no explicit size
 2524 specification will be assembled as a single byte.</p>
 2525 </li>
 2526 <li>
 2527 <p>More forgiving with the PUSH instruction. 0.98 requires a size to be
 2528 specified always. 0.98.09b will imply the size from the current BITS
 2529 setting (16 or 32).</p>
 2530 </li>
 2531 <li>
 2532 <p>Changed definition of the optimization flag:</p>
 2533 <pre>
 2534    -O0     strict two-pass assembly, JMP and Jcc are 
 2535            handled more like 0.98, except that back- 
 2536            ward JMPs are short, if possible. 
 2537 
 2538    -O1     strict two-pass assembly, but forward 
 2539            branches are assembled with code guaranteed 
 2540            to reach; may produce larger code than 
 2541            -O0, but will produce successful assembly 
 2542            more often if branch offset sizes are not 
 2543            specified. 
 2544 
 2545    -O2     multi-pass optimization, minimize branch 
 2546            offsets; also will minimize signed immed- 
 2547            iate bytes, overriding size specification. 
 2548 
 2549    -O3     like -O2, but more passes taken, if needed
 2550 </pre>
 2551 </li>
 2552 </ul>
 2553 <h4 id="section-C.2.34">C.2.34 Version 0.98.07 released 01/28/01</h4>
 2554 <ul>
 2555 <li>
 2556 <p>Added Stepane Denis' SSE2 instructions to a *working* version of the
 2557 code &ndash; some earlier versions were based on broken code &ndash; sorry
 2558 'bout that. version "0.98.07"</p>
 2559 </li>
 2560 <li>
 2561 <p>Cosmetic modifications to nasm.c, nasm.h, AUTHORS, MODIFIED</p>
 2562 </li>
 2563 </ul>
 2564 <h4 id="section-C.2.35">C.2.35 Version 0.98.06f released 01/18/01</h4>
 2565 <ul>
 2566 <li>
 2567 <p>Add "metalbrain"s jecxz bug fix in insns.dat</p>
 2568 </li>
 2569 <li>
 2570 <p>Alter nasmdoc.src to match &ndash; version "0.98.06f"</p>
 2571 </li>
 2572 </ul>
 2573 <h4 id="section-C.2.36">C.2.36 Version 0.98.06e released 01/09/01</h4>
 2574 <ul>
 2575 <li>
 2576 <p>Removed the "outforms.h" file &ndash; it appears to be someone's old
 2577 backup of "outform.h". version "0.98.06e"</p>
 2578 </li>
 2579 <li>
 2580 <p>fbk &ndash; finally added the fix for the "multiple %includes bug",
 2581 known since 7/27/99 &ndash; reported originally (?) and sent to us by
 2582 Austin Lunnen &ndash; he reports that John Fine had a fix within the day.
 2583 Here it is...</p>
 2584 </li>
 2585 <li>
 2586 <p>Nelson Rush resigns from the group. Big thanks to Nelson for his
 2587 leadership and enthusiasm in getting these changes incorporated into Nasm!</p>
 2588 </li>
 2589 <li>
 2590 <p>fbk &ndash; [list +], [list &ndash;] directives &ndash; ineptly
 2591 implemented, should be re-written or removed, perhaps.</p>
 2592 </li>
 2593 <li>
 2594 <p>Brian Raiter / fbk &ndash; "elfso bug" fix &ndash; applied to aoutb
 2595 format as well &ndash; testing might be desirable...</p>
 2596 </li>
 2597 <li>
 2598 <p>James Seter &ndash; &ndash;postfix, &ndash;prefix command line switches.</p>
 2599 </li>
 2600 <li>
 2601 <p>Yuri Zaporozhets &ndash; rdoff utility changes.</p>
 2602 </li>
 2603 </ul>
 2604 <h4 id="section-C.2.37">C.2.37 Version 0.98p1</h4>
 2605 <ul>
 2606 <li>
 2607 <p>GAS-like palign (Panos Minos)</p>
 2608 </li>
 2609 <li>
 2610 <p>FIXME: Someone, fill this in with details</p>
 2611 </li>
 2612 </ul>
 2613 <h4 id="section-C.2.38">C.2.38 Version 0.98bf (bug-fixed)</h4>
 2614 <ul>
 2615 <li>
 2616 <p>Fixed &ndash; elf and aoutb bug &ndash; shared libraries &ndash;
 2617 multiple "%include" bug in "-f obj" &ndash; jcxz, jecxz bug &ndash;
 2618 unrecognized option bug in ndisasm</p>
 2619 </li>
 2620 </ul>
 2621 <h4 id="section-C.2.39">C.2.39 Version 0.98.03 with John Coffman's changes released 27-Jul-2000</h4>
 2622 <ul>
 2623 <li>
 2624 <p>Added signed byte optimizations for the 0x81/0x83 class of instructions:
 2625 ADC, ADD, AND, CMP, OR, SBB, SUB, XOR: when used as 'ADD reg16,imm' or 'ADD
 2626 reg32,imm.' Also optimization of signed byte form of 'PUSH imm' and 'IMUL
 2627 reg,imm'/'IMUL reg,reg,imm.' No size specification is needed.</p>
 2628 </li>
 2629 <li>
 2630 <p>Added multi-pass JMP and Jcc offset optimization. Offsets on forward
 2631 references will preferentially use the short form, without the need to code
 2632 a specific size (short or near) for the branch. Added instructions for 'Jcc
 2633 label' to use the form 'Jnotcc $+3/JMP label', in cases where a short
 2634 offset is out of bounds. If compiling for a 386 or higher CPU, then the 386
 2635 form of Jcc will be used instead.</p>
 2636 <p>This feature is controlled by a new command-line switch: "O", (upper
 2637 case letter O). "-O0" reverts the assembler to no extra optimization
 2638 passes, "-O1" allows up to 5 extra passes, and "-O2"(default), allows up to
 2639 10 extra optimization passes.</p>
 2640 </li>
 2641 <li>
 2642 <p>Added a new directive: 'cpu XXX', where XXX is any of: 8086, 186, 286,
 2643 386, 486, 586, pentium, 686, PPro, P2, P3 or Katmai. All are case
 2644 insensitive. All instructions will be selected only if they apply to the
 2645 selected cpu or lower. Corrected a couple of bugs in cpu-dependence in
 2646 'insns.dat'.</p>
 2647 </li>
 2648 <li>
 2649 <p>Added to 'standard.mac', the "use16" and "use32" forms of the "bits
 2650 16/32" directive. This is nothing new, just conforms to a lot of other
 2651 assemblers. (minor)</p>
 2652 </li>
 2653 <li>
 2654 <p>Changed label allocation from 320/32 (10000 labels @ 200K+) to 32/37
 2655 (1000 labels); makes running under DOS much easier. Since additional label
 2656 space is allocated dynamically, this should have no effect on large
 2657 programs with lots of labels. The 37 is a prime, believed to be better for
 2658 hashing. (minor)</p>
 2659 </li>
 2660 </ul>
 2661 <h4 id="section-C.2.40">C.2.40 Version 0.98.03</h4>
 2662 <p>"Integrated patchfile 0.98-0.98.01. I call this version 0.98.03 for
 2663 historical reasons: 0.98.02 was trashed." &ndash;&ndash;John Coffman
 2664 &lt;johninsd@san.rr.com&gt;, 27-Jul-2000</p>
 2665 <ul>
 2666 <li>
 2667 <p>Kendall Bennett's SciTech MGL changes</p>
 2668 </li>
 2669 <li>
 2670 <p>Note that you must define "TASM_COMPAT" at compile-time to get the Tasm
 2671 Ideal Mode compatibility.</p>
 2672 </li>
 2673 <li>
 2674 <p>All changes can be compiled in and out using the TASM_COMPAT macros, and
 2675 when compiled without TASM_COMPAT defined we get the exact same binary as
 2676 the unmodified 0.98 sources.</p>
 2677 </li>
 2678 <li>
 2679 <p>standard.mac, macros.c: Added macros to ignore TASM directives before
 2680 first include</p>
 2681 </li>
 2682 <li>
 2683 <p>nasm.h: Added extern declaration for tasm_compatible_mode</p>
 2684 </li>
 2685 <li>
 2686 <p>nasm.c: Added global variable tasm_compatible_mode</p>
 2687 </li>
 2688 <li>
 2689 <p>Added command line switch for TASM compatible mode (-t)</p>
 2690 </li>
 2691 <li>
 2692 <p>Changed version command line to reflect when compiled with TASM
 2693 additions</p>
 2694 </li>
 2695 <li>
 2696 <p>Added response file processing to allow all arguments on a single line
 2697 (response file is @resp rather than &ndash;@resp for NASM format).</p>
 2698 </li>
 2699 <li>
 2700 <p>labels.c: Changes islocal() macro to support TASM style @@local labels.</p>
 2701 </li>
 2702 <li>
 2703 <p>Added islocalchar() macro to support TASM style @@local labels.</p>
 2704 </li>
 2705 <li>
 2706 <p>parser.c: Added support for TASM style memory references (ie: mov [DWORD
 2707 eax],10 rather than the NASM style mov DWORD [eax],10).</p>
 2708 </li>
 2709 <li>
 2710 <p>preproc.c: Added new directives, <code>%arg</code>, <code>%local</code>,
 2711 <code>%stacksize</code> to directives table</p>
 2712 </li>
 2713 <li>
 2714 <p>Added support for TASM style directives without a leading % symbol.</p>
 2715 </li>
 2716 <li>
 2717 <p>Integrated a block of changes from Andrew Zabolotny
 2718 &lt;bit@eltech.ru&gt;:</p>
 2719 </li>
 2720 <li>
 2721 <p>A new keyword <code>%xdefine</code> and its case-insensitive counterpart
 2722 <code>%ixdefine</code>. They work almost the same way as
 2723 <code>%define</code> and <code>%idefine</code> but expand the definition
 2724 immediately, not on the invocation. Something like a cross between
 2725 <code>%define</code> and <code>%assign</code>. The "x" suffix stands for
 2726 "eXpand", so "xdefine" can be deciphered as "expand-and-define". Thus you
 2727 can do things like this:</p>
 2728 <pre>
 2729      %assign ofs     0 
 2730 
 2731      %macro  arg     1 
 2732              %xdefine %1 dword [esp+ofs] 
 2733              %assign ofs ofs+4 
 2734      %endmacro
 2735 </pre>
 2736 </li>
 2737 <li>
 2738 <p>Changed the place where the expansion of %$name macros are expanded. Now
 2739 they are converted into ..@ctxnum.name form when detokenizing, so there are
 2740 no quirks as before when using %$name arguments to macros, in macros etc.
 2741 For example:</p>
 2742 <pre>
 2743      %macro  abc     1 
 2744              %define %1 hello 
 2745      %endm 
 2746 
 2747      abc     %$here 
 2748      %$here
 2749 </pre>
 2750 <p>Now last line will be expanded into "hello" as expected. This also
 2751 allows for lots of goodies, a good example are extended "proc" macros
 2752 included in this archive.</p>
 2753 </li>
 2754 <li>
 2755 <p>Added a check for "cstk" in smacro_defined() before calling get_ctx()
 2756 &ndash; this allows for things like:</p>
 2757 <pre>
 2758      %ifdef %$abc 
 2759      %endif
 2760 </pre>
 2761 <p>to work without warnings even in no context.</p>
 2762 </li>
 2763 <li>
 2764 <p>Added a check for "cstk" in %if*ctx and %elif*ctx directives &ndash;
 2765 this allows to use <code>%ifctx</code> without excessive warnings. If there
 2766 is no active context, <code>%ifctx</code> goes through "false" branch.</p>
 2767 </li>
 2768 <li>
 2769 <p>Removed "user error: " prefix with <code>%error</code> directive: it
 2770 just clobbers the output and has absolutely no functionality. Besides, this
 2771 allows to write macros that does not differ from built-in functions in any
 2772 way.</p>
 2773 </li>
 2774 <li>
 2775 <p>Added expansion of string that is output by <code>%error</code>
 2776 directive. Now you can do things like:</p>
 2777 <pre>
 2778      %define hello(x) Hello, x! 
 2779 
 2780      %define %$name andy 
 2781      %error "hello(%$name)"
 2782 </pre>
 2783 <p>Same happened with <code>%include</code> directive.</p>
 2784 </li>
 2785 <li>
 2786 <p>Now all directives that expect an identifier will try to expand and
 2787 concatenate everything without whitespaces in between before usage. For
 2788 example, with "unfixed" nasm the commands</p>
 2789 <pre>
 2790      %define %$abc hello 
 2791      %define __%$abc goodbye 
 2792      __%$abc
 2793 </pre>
 2794 <p>would produce "incorrect" output: last line will expand to</p>
 2795 <pre>
 2796      hello goodbyehello
 2797 </pre>
 2798 <p>Not quite what you expected, eh? :-) The answer is that preprocessor
 2799 treats the <code>%define</code> construct as if it would be</p>
 2800 <pre>
 2801      %define __ %$abc goodbye
 2802 </pre>
 2803 <p>(note the white space between __ and %$abc). After my "fix" it will
 2804 "correctly" expand into</p>
 2805 <pre>
 2806      goodbye
 2807 </pre>
 2808 <p>as expected. Note that I use quotes around words "correct", "incorrect"
 2809 etc because this is rather a feature not a bug; however current behaviour
 2810 is more logical (and allows more advanced macro usage :-).</p>
 2811 </li>
 2812 </ul>
 2813 <p>Same change was applied to:
 2814 <code>%push</code>,<code>%macro</code>,<code>%imacro</code>,<code>%define</code>,<code>%idefine</code>,<code>%xdefine</code>,<code>%ixdefine</code>,
 2815 <code>%assign</code>,<code>%iassign</code>,<code>%undef</code></p>
 2816 <ul>
 2817 <li>
 2818 <p>A new directive [WARNING {+|-}warning-id] have been added. It works only
 2819 if the assembly phase is enabled (i.e. it doesn't work with nasm &ndash;e).</p>
 2820 </li>
 2821 <li>
 2822 <p>A new warning type: macro-selfref. By default this warning is disabled;
 2823 when enabled NASM warns when a macro self-references itself; for example
 2824 the following source:</p>
 2825 <pre>
 2826        [WARNING macro-selfref] 
 2827 
 2828        %macro          push    1-* 
 2829                %rep    %0 
 2830                        push    %1 
 2831                        %rotate 1 
 2832                %endrep 
 2833        %endmacro 
 2834 
 2835                        push    eax,ebx,ecx
 2836 </pre>
 2837 <p>will produce a warning, but if we remove the first line we won't see it
 2838 anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor eats
 2839 such constructs without warnings at all).</p>
 2840 </li>
 2841 <li>
 2842 <p>Added a "error" routine to preprocessor which always will set ERR_PASS1
 2843 bit in severity_code. This removes annoying repeated errors on first and
 2844 second passes from preprocessor.</p>
 2845 </li>
 2846 <li>
 2847 <p>Added the %+ operator in single-line macros for concatenating two
 2848 identifiers. Usage example:</p>
 2849 <pre>
 2850        %define _myfunc _otherfunc 
 2851        %define cextern(x) _ %+ x 
 2852        cextern (myfunc)
 2853 </pre>
 2854 <p>After first expansion, third line will become "_myfunc". After this
 2855 expansion is performed again so it becomes "_otherunc".</p>
 2856 </li>
 2857 <li>
 2858 <p>Now if preprocessor is in a non-emitting state, no warning or error will
 2859 be emitted. Example:</p>
 2860 <pre>
 2861        %if 1 
 2862                mov     eax,ebx 
 2863        %else 
 2864                put anything you want between these two brackets, 
 2865                even macro-parameter references %1 or local 
 2866                labels %$zz or macro-local labels %%zz - no 
 2867                warning will be emitted. 
 2868        %endif
 2869 </pre>
 2870 </li>
 2871 <li>
 2872 <p>Context-local variables on expansion as a last resort are looked up in
 2873 outer contexts. For example, the following piece:</p>
 2874 <pre>
 2875        %push   outer 
 2876        %define %$a [esp] 
 2877 
 2878                %push   inner 
 2879                %$a 
 2880                %pop 
 2881        %pop
 2882 </pre>
 2883 <p>will expand correctly the fourth line to [esp]; if we'll define another
 2884 %$a inside the "inner" context, it will take precedence over outer
 2885 definition. However, this modification has been applied only to
 2886 expand_smacro and not to smacro_define: as a consequence expansion looks in
 2887 outer contexts, but <code>%ifdef</code> won't look in outer contexts.</p>
 2888 <p>This behaviour is needed because we don't want nested contexts to act on
 2889 already defined local macros. Example:</p>
 2890 <pre>
 2891        %define %$arg1  [esp+4] 
 2892        test    eax,eax 
 2893        if      nz 
 2894                mov     eax,%$arg1 
 2895        endif
 2896 </pre>
 2897 <p>In this example the "if" mmacro enters into the "if" context, so %$arg1
 2898 is not valid anymore inside "if". Of course it could be worked around by
 2899 using explicitely %$$arg1 but this is ugly IMHO.</p>
 2900 </li>
 2901 <li>
 2902 <p>Fixed memory leak in <code>%undef</code>. The origline wasn't freed
 2903 before exiting on success.</p>
 2904 </li>
 2905 <li>
 2906 <p>Fixed trap in preprocessor when line expanded to empty set of tokens.
 2907 This happens, for example, in the following case:</p>
 2908 <pre>
 2909        #define SOMETHING 
 2910        SOMETHING
 2911 </pre>
 2912 </li>
 2913 </ul>
 2914 <h4 id="section-C.2.41">C.2.41 Version 0.98</h4>
 2915 <p>All changes since NASM 0.98p3 have been produced by H. Peter Anvin
 2916 &lt;hpa@zytor.com&gt;.</p>
 2917 <ul>
 2918 <li>
 2919 <p>The documentation comment delimiter is</p>
 2920 </li>
 2921 <li>
 2922 <p>Allow EQU definitions to refer to external labels; reported by Pedro
 2923 Gimeno.</p>
 2924 </li>
 2925 <li>
 2926 <p>Re-enable support for RDOFF v1; reported by Pedro Gimeno.</p>
 2927 </li>
 2928 <li>
 2929 <p>Updated License file per OK from Simon and Julian.</p>
 2930 </li>
 2931 </ul>
 2932 <h4 id="section-C.2.42">C.2.42 Version 0.98p9</h4>
 2933 <ul>
 2934 <li>
 2935 <p>Update documentation (although the instruction set reference will have
 2936 to wait; I don't want to hold up the 0.98 release for it.)</p>
 2937 </li>
 2938 <li>
 2939 <p>Verified that the NASM implementation of the PEXTRW and PMOVMSKB
 2940 instructions is correct. The encoding differs from what the Intel manuals
 2941 document, but the Pentium III behaviour matches NASM, not the Intel
 2942 manuals.</p>
 2943 </li>
 2944 <li>
 2945 <p>Fix handling of implicit sizes in PSHUFW and PINSRW, reported by Stefan
 2946 Hoffmeister.</p>
 2947 </li>
 2948 <li>
 2949 <p>Resurrect the &ndash;s option, which was removed when changing the
 2950 diagnostic output to stdout.</p>
 2951 </li>
 2952 </ul>
 2953 <h4 id="section-C.2.43">C.2.43 Version 0.98p8</h4>
 2954 <ul>
 2955 <li>
 2956 <p>Fix for "DB" when NASM is running on a bigendian machine.</p>
 2957 </li>
 2958 <li>
 2959 <p>Invoke insns.pl once for each output script, making Makefile.in legal
 2960 for "make &ndash;j".</p>
 2961 </li>
 2962 <li>
 2963 <p>Improve the Unix configure-based makefiles to make package creation
 2964 easier.</p>
 2965 </li>
 2966 <li>
 2967 <p>Included an RPM .spec file for building RPM (RedHat Package Manager)
 2968 packages on Linux or Unix systems.</p>
 2969 </li>
 2970 <li>
 2971 <p>Fix Makefile dependency problems.</p>
 2972 </li>
 2973 <li>
 2974 <p>Change src/rdsrc.pl to include sectioning information in info output;
 2975 required for install-info to work.</p>
 2976 </li>
 2977 <li>
 2978 <p>Updated the RDOFF distribution to version 2 from Jules; minor massaging
 2979 to make it compile in my environment.</p>
 2980 </li>
 2981 <li>
 2982 <p>Split doc files that can be built by anyone with a Perl interpreter off
 2983 into a separate archive.</p>
 2984 </li>
 2985 <li>
 2986 <p>"Dress rehearsal" release!</p>
 2987 </li>
 2988 </ul>
 2989 <h4 id="section-C.2.44">C.2.44 Version 0.98p7</h4>
 2990 <ul>
 2991 <li>
 2992 <p>Fixed opcodes with a third byte-sized immediate argument to not complain
 2993 if given "byte" on the immediate.</p>
 2994 </li>
 2995 <li>
 2996 <p>Allow <code>%undef</code> to remove single-line macros with arguments.
 2997 This matches the behaviour of #undef in the C preprocessor.</p>
 2998 </li>
 2999 <li>
 3000 <p>Allow &ndash;d, &ndash;u, &ndash;i and &ndash;p to be specified as
 3001 &ndash;D, &ndash;U, &ndash;I and &ndash;P for compatibility with most C
 3002 compilers and preprocessors. This allows Makefile options to be shared
 3003 between cc and nasm, for example.</p>
 3004 </li>
 3005 <li>
 3006 <p>Minor cleanups.</p>
 3007 </li>
 3008 <li>
 3009 <p>Went through the list of Katmai instructions and hopefully fixed the
 3010 (rather few) mistakes in it.</p>
 3011 </li>
 3012 <li>
 3013 <p>(Hopefully) fixed a number of disassembler bugs related to ambiguous
 3014 instructions (disambiguated by &ndash;p) and SSE instructions with REP.</p>
 3015 </li>
 3016 <li>
 3017 <p>Fix for bug reported by Mark Junger: "call dword 0x12345678" should work
 3018 and may add an OSP (affected CALL, JMP, Jcc).</p>
 3019 </li>
 3020 <li>
 3021 <p>Fix for environments when "stderr" isn't a compile-time constant.</p>
 3022 </li>
 3023 </ul>
 3024 <h4 id="section-C.2.45">C.2.45 Version 0.98p6</h4>
 3025 <ul>
 3026 <li>
 3027 <p>Took officially over coordination of the 0.98 release; so drop the p3.x
 3028 notation. Skipped p4 and p5 to avoid confusion with John Fine's J4 and J5
 3029 releases.</p>
 3030 </li>
 3031 <li>
 3032 <p>Update the documentation; however, it still doesn't include
 3033 documentation for the various new instructions. I somehow wonder if it
 3034 makes sense to have an instruction set reference in the assembler manual
 3035 when Intel et al have PDF versions of their manuals online.</p>
 3036 </li>
 3037 <li>
 3038 <p>Recognize "idt" or "centaur" for the &ndash;p option to ndisasm.</p>
 3039 </li>
 3040 <li>
 3041 <p>Changed error messages back to stderr where they belong, but add an
 3042 &ndash;E option to redirect them elsewhere (the DOS shell cannot redirect
 3043 stderr.)</p>
 3044 </li>
 3045 <li>
 3046 <p>&ndash;M option to generate Makefile dependencies (based on code from
 3047 Alex Verstak.)</p>
 3048 </li>
 3049 <li>
 3050 <p><code>%undef</code> preprocessor directive, and &ndash;u option, that
 3051 undefines a single-line macro.</p>
 3052 </li>
 3053 <li>
 3054 <p>OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from Chuck
 3055 Crayne.</p>
 3056 </li>
 3057 <li>
 3058 <p>Various minor bugfixes (reported by): &ndash; Dangling <code>%s</code>
 3059 in preproc.c (Martin Junker)</p>
 3060 </li>
 3061 <li>
 3062 <p>THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am on a
 3063 trip and didn't bring the Katmai instruction reference, so I can't work on
 3064 them right now.</p>
 3065 </li>
 3066 <li>
 3067 <p>Updated the License file per agreement with Simon and Jules to include a
 3068 GPL distribution clause.</p>
 3069 </li>
 3070 </ul>
 3071 <h4 id="section-C.2.46">C.2.46 Version 0.98p3.7</h4>
 3072 <ul>
 3073 <li>
 3074 <p>(Hopefully) fixed the canned Makefiles to include the outrdf2 and
 3075 zoutieee modules.</p>
 3076 </li>
 3077 <li>
 3078 <p>Renamed changes.asm to changed.asm.</p>
 3079 </li>
 3080 </ul>
 3081 <h4 id="section-C.2.47">C.2.47 Version 0.98p3.6</h4>
 3082 <ul>
 3083 <li>
 3084 <p>Fixed a bunch of instructions that were added in 0.98p3.5 which had
 3085 memory operands, and the address-size prefix was missing from the
 3086 instruction pattern.</p>
 3087 </li>
 3088 </ul>
 3089 <h4 id="section-C.2.48">C.2.48 Version 0.98p3.5</h4>
 3090 <ul>
 3091 <li>
 3092 <p>Merged in changes from John S. Fine's 0.98-J5 release. John's based
 3093 0.98-J5 on my 0.98p3.3 release; this merges the changes.</p>
 3094 </li>
 3095 <li>
 3096 <p>Expanded the instructions flag field to a long so we can fit more flags;
 3097 mark SSE (KNI) and AMD or Katmai-specific instructions as such.</p>
 3098 </li>
 3099 <li>
 3100 <p>Fix the "PRIV" flag on a bunch of instructions, and create new "PROT"
 3101 flag for protected-mode-only instructions (orthogonal to if the instruction
 3102 is privileged!) and new "SMM" flag for SMM-only instructions.</p>
 3103 </li>
 3104 <li>
 3105 <p>Added AMD-only SYSCALL and SYSRET instructions.</p>
 3106 </li>
 3107 <li>
 3108 <p>Make SSE actually work, and add new Katmai MMX instructions.</p>
 3109 </li>
 3110 <li>
 3111 <p>Added a &ndash;p (preferred vendor) option to ndisasm so that it can
 3112 distinguish e.g. Cyrix opcodes also used in SSE. For example:</p>
 3113 <pre>
 3114      ndisasm -p cyrix aliased.bin 
 3115      00000000  670F514310        paddsiw mm0,[ebx+0x10] 
 3116      00000005  670F514320        paddsiw mm0,[ebx+0x20] 
 3117      ndisasm -p intel aliased.bin 
 3118      00000000  670F514310        sqrtps xmm0,[ebx+0x10] 
 3119      00000005  670F514320        sqrtps xmm0,[ebx+0x20]
 3120 </pre>
 3121 </li>
 3122 <li>
 3123 <p>Added a bunch of Cyrix-specific instructions.</p>
 3124 </li>
 3125 </ul>
 3126 <h4 id="section-C.2.49">C.2.49 Version 0.98p3.4</h4>
 3127 <ul>
 3128 <li>
 3129 <p>Made at least an attempt to modify all the additional Makefiles (in the
 3130 Mkfiles directory). I can't test it, but this was the best I could do.</p>
 3131 </li>
 3132 <li>
 3133 <p>DOS DJGPP+"Opus Make" Makefile from John S. Fine.</p>
 3134 </li>
 3135 <li>
 3136 <p>changes.asm changes from John S. Fine.</p>
 3137 </li>
 3138 </ul>
 3139 <h4 id="section-C.2.50">C.2.50 Version 0.98p3.3</h4>
 3140 <ul>
 3141 <li>
 3142 <p>Patch from Conan Brink to allow nesting of <code>%rep</code> directives.</p>
 3143 </li>
 3144 <li>
 3145 <p>If we're going to allow INT01 as an alias for INT1/ICEBP (one of Jules
 3146 0.98p3 changes), then we should allow INT03 as an alias for INT3 as well.</p>
 3147 </li>
 3148 <li>
 3149 <p>Updated changes.asm to include the latest changes.</p>
 3150 </li>
 3151 <li>
 3152 <p>Tried to clean up the &lt;CR&gt;s that had snuck in from a DOS/Windows
 3153 environment into my Unix environment, and try to make sure than DOS/Windows
 3154 users get them back.</p>
 3155 </li>
 3156 <li>
 3157 <p>We would silently generate broken tools if insns.dat wasn't sorted
 3158 properly. Change insns.pl so that the order doesn't matter.</p>
 3159 </li>
 3160 <li>
 3161 <p>Fix bug in insns.pl (introduced by me) which would cause conditional
 3162 instructions to have an extra "cc" in disassembly, e.g. "jnz" disassembled
 3163 as "jccnz".</p>
 3164 </li>
 3165 </ul>
 3166 <h4 id="section-C.2.51">C.2.51 Version 0.98p3.2</h4>
 3167 <ul>
 3168 <li>
 3169 <p>Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
 3170 http://www.csoft.net/cz/johnfine/</p>
 3171 </li>
 3172 <li>
 3173 <p>Changed previous "spotless" Makefile target (appropriate for
 3174 distribution) to "distclean", and added "cleaner" target which is same as
 3175 "clean" except deletes files generated by Perl scripts; "spotless" is
 3176 union.</p>
 3177 </li>
 3178 <li>
 3179 <p>Removed BASIC programs from distribution. Get a Perl interpreter instead
 3180 (see below.)</p>
 3181 </li>
 3182 <li>
 3183 <p>Calling this "pre-release 3.2" rather than "p3-hpa2" because of John's
 3184 contributions.</p>
 3185 </li>
 3186 <li>
 3187 <p>Actually link in the IEEE output format (zoutieee.c); fix a bunch of
 3188 compiler warnings in that file. Note I don't know what IEEE output is
 3189 supposed to look like, so these changes were made "blind".</p>
 3190 </li>
 3191 </ul>
 3192 <h4 id="section-C.2.52">C.2.52 Version 0.98p3-hpa</h4>
 3193 <ul>
 3194 <li>
 3195 <p>Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully buildable
 3196 version for Unix systems (Makefile.in updates, etc.)</p>
 3197 </li>
 3198 <li>
 3199 <p>Changed insns.pl to create the instruction tables in nasm.h and names.c,
 3200 so that a new instruction can be added by adding it *only* to insns.dat.</p>
 3201 </li>
 3202 <li>
 3203 <p>Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
 3204 FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel guarantee will
 3205 never be used; one of them is documented as UD2 in Intel documentation, the
 3206 other one just as "Undefined Opcode" &ndash;&ndash; calling it UD1 seemed
 3207 to make sense.)</p>
 3208 </li>
 3209 <li>
 3210 <p>MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
 3211 characters long. Now MAX_SYMBOL is derived from insns.dat.</p>
 3212 </li>
 3213 <li>
 3214 <p>A note on the BASIC programs included: forget them. insns.bas is already
 3215 out of date. Get yourself a Perl interpreter for your platform of choice at
 3216 <a href="http://www.cpan.org/ports/index.html">http://www.cpan.org/ports/index.html</a>.</p>
 3217 </li>
 3218 </ul>
 3219 <h4 id="section-C.2.53">C.2.53 Version 0.98 pre-release 3</h4>
 3220 <ul>
 3221 <li>
 3222 <p>added response file support, improved command line handling, new layout
 3223 help screen</p>
 3224 </li>
 3225 <li>
 3226 <p>fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
 3227 related bugs, updated Wishlist; 0.98 Prerelease 3.</p>
 3228 </li>
 3229 </ul>
 3230 <h4 id="section-C.2.54">C.2.54 Version 0.98 pre-release 2</h4>
 3231 <ul>
 3232 <li>
 3233 <p>fixed bug in outcoff.c to do with truncating section names longer than 8
 3234 characters, referencing beyond end of string; 0.98 pre-release 2</p>
 3235 </li>
 3236 </ul>
 3237 <h4 id="section-C.2.55">C.2.55 Version 0.98 pre-release 1</h4>
 3238 <ul>
 3239 <li>
 3240 <p>Fixed a bug whereby STRUC didn't work at all in RDF.</p>
 3241 </li>
 3242 <li>
 3243 <p>Fixed a problem with group specification in PUBDEFs in OBJ.</p>
 3244 </li>
 3245 <li>
 3246 <p>Improved ease of adding new output formats. Contribution due to Fox
 3247 Cutter.</p>
 3248 </li>
 3249 <li>
 3250 <p>Fixed a bug in relocations in the `bin' format: was showing up when a
 3251 relocatable reference crossed an 8192-byte boundary in any output section.</p>
 3252 </li>
 3253 <li>
 3254 <p>Fixed a bug in local labels: local-label lookups were inconsistent
 3255 between passes one and two if an EQU occurred between the definition of a
 3256 global label and the subsequent use of a local label local to that global.</p>
 3257 </li>
 3258 <li>
 3259 <p>Fixed a seg-fault in the preprocessor (again) which happened when you
 3260 use a blank line as the first line of a multi-line macro definition and
 3261 then defined a label on the same line as a call to that macro.</p>
 3262 </li>
 3263 <li>
 3264 <p>Fixed a stale-pointer bug in the handling of the NASM environment
 3265 variable. Thanks to Thomas McWilliams.</p>
 3266 </li>
 3267 <li>
 3268 <p>ELF had a hard limit on the number of sections which caused segfaults
 3269 when transgressed. Fixed.</p>
 3270 </li>
 3271 <li>
 3272 <p>Added ability for ndisasm to read from stdin by using `-' as the
 3273 filename.</p>
 3274 </li>
 3275 <li>
 3276 <p>ndisasm wasn't outputting the TO keyword. Fixed.</p>
 3277 </li>
 3278 <li>
 3279 <p>Fixed error cascade on bogus expression in <code>%if</code> &ndash; an
 3280 error in evaluation was causing the entire <code>%if</code> to be
 3281 discarded, thus creating trouble later when the <code>%else</code> or
 3282 <code>%endif</code> was encountered.</p>
 3283 </li>
 3284 <li>
 3285 <p>Forward reference tracking was instruction-granular not operand-
 3286 granular, which was causing 286-specific code to be generated needlessly on
 3287 code of the form `shr word [forwardref],1'. Thanks to Jim Hague for sending
 3288 a patch.</p>
 3289 </li>
 3290 <li>
 3291 <p>All messages now appear on stdout, as sending them to stderr serves no
 3292 useful purpose other than to make redirection difficult.</p>
 3293 </li>
 3294 <li>
 3295 <p>Fixed the problem with EQUs pointing to an external symbol &ndash; this
 3296 now generates an error message.</p>
 3297 </li>
 3298 <li>
 3299 <p>Allowed multiple size prefixes to an operand, of which only the first is
 3300 taken into account.</p>
 3301 </li>
 3302 <li>
 3303 <p>Incorporated John Fine's changes, including fixes of a large number of
 3304 preprocessor bugs, some small problems in OBJ, and a reworking of label
 3305 handling to define labels before their line is assembled, rather than
 3306 after.</p>
 3307 </li>
 3308 <li>
 3309 <p>Reformatted a lot of the source code to be more readable. Included
 3310 'coding.txt' as a guideline for how to format code for contributors.</p>
 3311 </li>
 3312 <li>
 3313 <p>Stopped nested <code>%reps</code> causing a panic &ndash; they now cause
 3314 a slightly more friendly error message instead.</p>
 3315 </li>
 3316 <li>
 3317 <p>Fixed floating point constant problems (patch by Pedro Gimeno)</p>
 3318 </li>
 3319 <li>
 3320 <p>Fixed the return value of insn_size() not being checked for &ndash;1,
 3321 indicating an error.</p>
 3322 </li>
 3323 <li>
 3324 <p>Incorporated 3Dnow! instructions.</p>
 3325 </li>
 3326 <li>
 3327 <p>Fixed the 'mov eax, eax + ebx' bug.</p>
 3328 </li>
 3329 <li>
 3330 <p>Fixed the GLOBAL EQU bug in ELF. Released developers release 3.</p>
 3331 </li>
 3332 <li>
 3333 <p>Incorporated John Fine's command line parsing changes</p>
 3334 </li>
 3335 <li>
 3336 <p>Incorporated David Lindauer's OMF debug support</p>
 3337 </li>
 3338 <li>
 3339 <p>Made changes for LCC 4.0 support (<code>__NASM_CDecl__</code>, removed
 3340 register size specification warning when sizes agree).</p>
 3341 </li>
 3342 </ul>
 3343 <h3 id="section-C.3">C.3 NASM 0.9 Series</h3>
 3344 <p>Revisions before 0.98.</p>
 3345 <h4 id="section-C.3.1">C.3.1 Version 0.97 released December 1997</h4>
 3346 <ul>
 3347 <li>
 3348 <p>This was entirely a bug-fix release to 0.96, which seems to have got
 3349 cursed. Silly me.</p>
 3350 </li>
 3351 <li>
 3352 <p>Fixed stupid mistake in OBJ which caused `MOV EAX,&lt;constant&gt;' to
 3353 fail. Caused by an error in the `MOV EAX,&lt;segment&gt;' support.</p>
 3354 </li>
 3355 <li>
 3356 <p>ndisasm hung at EOF when compiled with lcc on Linux because lcc on Linux
 3357 somehow breaks feof(). ndisasm now does not rely on feof().</p>
 3358 </li>
 3359 <li>
 3360 <p>A heading in the documentation was missing due to a markup error in the
 3361 indexing. Fixed.</p>
 3362 </li>
 3363 <li>
 3364 <p>Fixed failure to update all pointers on realloc() within extended-
 3365 operand code in parser.c. Was causing wrong behaviour and seg faults on
 3366 lines such as `dd 0.0,0.0,0.0,0.0,...'</p>
 3367 </li>
 3368 <li>
 3369 <p>Fixed a subtle preprocessor bug whereby invoking one multi-line macro on
 3370 the first line of the expansion of another, when the second had been
 3371 invoked with a label defined before it, didn't expand the inner macro.</p>
 3372 </li>
 3373 <li>
 3374 <p>Added internal.doc back in to the distribution archives &ndash; it was
 3375 missing in 0.96 *blush*</p>
 3376 </li>
 3377 <li>
 3378 <p>Fixed bug causing 0.96 to be unable to assemble its own test files,
 3379 specifically objtest.asm. *blush again*</p>
 3380 </li>
 3381 <li>
 3382 <p>Fixed seg-faults and bogus error messages caused by mismatching
 3383 <code>%rep</code> and <code>%endrep</code> within multi-line macro
 3384 definitions.</p>
 3385 </li>
 3386 <li>
 3387 <p>Fixed a problem with buffer overrun in OBJ, which was causing corruption
 3388 at ends of long PUBDEF records.</p>
 3389 </li>
 3390 <li>
 3391 <p>Separated DOS archives into main-program and documentation to reduce
 3392 download size.</p>
 3393 </li>
 3394 </ul>
 3395 <h4 id="section-C.3.2">C.3.2 Version 0.96 released November 1997</h4>
 3396 <ul>
 3397 <li>
 3398 <p>Fixed a bug whereby, if `nasm sourcefile' would cause a filename
 3399 collision warning and put output into `nasm.out', then `nasm sourcefile
 3400 &ndash;o outputfile' still gave the warning even though the `-o' was
 3401 honoured. Fixed name pollution under Digital UNIX: one of its header files
 3402 defined R_SP, which broke the enum in nasm.h.</p>
 3403 </li>
 3404 <li>
 3405 <p>Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
 3406 two-operand forms; NDISASM didn't recognise the longer register forms of
 3407 PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was flagged as
 3408 undocumented; the 32-bit forms of CMOV had 16-bit operand size prefixes;
 3409 `AAD imm' and `AAM imm' are no longer flagged as undocumented because the
 3410 Intel Architecture reference documents them.</p>
 3411 </li>
 3412 <li>
 3413 <p>Fixed a problem with the local-label mechanism, whereby strange types of
 3414 symbol (EQUs, auto-defined OBJ segment base symbols) interfered with the
 3415 `previous global label' value and screwed up local labels.</p>
 3416 </li>
 3417 <li>
 3418 <p>Fixed a bug whereby the stub preprocessor didn't communicate with the
 3419 listing file generator, so that the &ndash;a and &ndash;l options in
 3420 conjunction would produce a useless listing file.</p>
 3421 </li>
 3422 <li>
 3423 <p>Merged `os2' object file format back into `obj', after discovering that
 3424 `obj' _also_ shouldn't have a link pass separator in a module containing a
 3425 non-trivial MODEND. Flat segments are now declared using the FLAT
 3426 attribute. `os2' is no longer a valid object format name: use `obj'.</p>
 3427 </li>
 3428 <li>
 3429 <p>Removed the fixed-size temporary storage in the evaluator. Very very
 3430 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or so)
 3431 should now no longer crash NASM.</p>
 3432 </li>
 3433 <li>
 3434 <p>Fixed a bug involving segfaults on disassembly of MMX instructions, by
 3435 changing the meaning of one of the operand-type flags in nasm.h. This may
 3436 cause other apparently unrelated MMX problems; it needs to be tested
 3437 thoroughly.</p>
 3438 </li>
 3439 <li>
 3440 <p>Fixed some buffer overrun problems with large OBJ output files. Thanks
 3441 to DJ Delorie for the bug report and fix.</p>
 3442 </li>
 3443 <li>
 3444 <p>Made preprocess-only mode actually listen to the <code>%line</code>
 3445 markers as it prints them, so that it can report errors more sanely.</p>
 3446 </li>
 3447 <li>
 3448 <p>Re-designed the evaluator to keep more sensible track of expressions
 3449 involving forward references: can now cope with previously-nightmare
 3450 situations such as:</p>
 3451 <pre>
 3452   mov ax,foo | bar 
 3453   foo equ 1 
 3454   bar equ 2
 3455 </pre>
 3456 </li>
 3457 <li>
 3458 <p>Added the ALIGN and ALIGNB standard macros.</p>
 3459 </li>
 3460 <li>
 3461 <p>Added PIC support in ELF: use of WRT to obtain the four extra relocation
 3462 types needed.</p>
 3463 </li>
 3464 <li>
 3465 <p>Added the ability for output file formats to define their own extensions
 3466 to the GLOBAL, COMMON and EXTERN directives.</p>
 3467 </li>
 3468 <li>
 3469 <p>Implemented common-variable alignment, and global-symbol type and size
 3470 declarations, in ELF.</p>
 3471 </li>
 3472 <li>
 3473 <p>Implemented NEAR and FAR keywords for common variables, plus far-common
 3474 element size specification, in OBJ.</p>
 3475 </li>
 3476 <li>
 3477 <p>Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
 3478 default WRT specification (either a segment or a group).</p>
 3479 </li>
 3480 <li>
 3481 <p>Transformed the Unix NASM archive into an auto-configuring package.</p>
 3482 </li>
 3483 <li>
 3484 <p>Added a sanity-check for people applying SEG to things which are already
 3485 segment bases: this previously went unnoticed by the SEG processing and
 3486 caused OBJ-driver panics later.</p>
 3487 </li>
 3488 <li>
 3489 <p>Added the ability, in OBJ format, to deal with `MOV EAX,&lt;segment&gt;'
 3490 type references: OBJ doesn't directly support dword-size segment base
 3491 fixups, but as long as the low two bytes of the constant term are zero, a
 3492 word-size fixup can be generated instead and it will work.</p>
 3493 </li>
 3494 <li>
 3495 <p>Added the ability to specify sections' alignment requirements in Win32
 3496 object files and pure binary files.</p>
 3497 </li>
 3498 <li>
 3499 <p>Added preprocess-time expression evaluation: the <code>%assign</code>
 3500 (and <code>%iassign</code>) directive and the bare <code>%if</code> (and
 3501 <code>%elif</code>) conditional. Added relational operators to the
 3502 evaluator, for use only in <code>%if</code> constructs: the standard
 3503 relationals = &lt; &gt; &lt;= &gt;= &lt;&gt; (and C-like synonyms == and
 3504 !=) plus low-precedence logical operators &amp;&amp;, ^^ and ||.</p>
 3505 </li>
 3506 <li>
 3507 <p>Added a preprocessor repeat construct: <code>%rep</code> /
 3508 <code>%exitrep</code> / <code>%endrep</code>.</p>
 3509 </li>
 3510 <li>
 3511 <p>Added the __FILE__ and __LINE__ standard macros.</p>
 3512 </li>
 3513 <li>
 3514 <p>Added a sanity check for number constants being greater than 0xFFFFFFFF.
 3515 The warning can be disabled.</p>
 3516 </li>
 3517 <li>
 3518 <p>Added the %0 token whereby a variadic multi-line macro can tell how many
 3519 parameters it's been given in a specific invocation.</p>
 3520 </li>
 3521 <li>
 3522 <p>Added <code>%rotate</code>, allowing multi-line macro parameters to be
 3523 cycled.</p>
 3524 </li>
 3525 <li>
 3526 <p>Added the `*' option for the maximum parameter count on multi-line
 3527 macros, allowing them to take arbitrarily many parameters.</p>
 3528 </li>
 3529 <li>
 3530 <p>Added the ability for the user-level forms of EXTERN, GLOBAL and COMMON
 3531 to take more than one argument.</p>
 3532 </li>
 3533 <li>
 3534 <p>Added the IMPORT and EXPORT directives in OBJ format, to deal with
 3535 Windows DLLs.</p>
 3536 </li>
 3537 <li>
 3538 <p>Added some more preprocessor <code>%if</code> constructs:
 3539 <code>%ifidn</code> / <code>%ifidni</code> (exact textual identity), and
 3540 <code>%ifid</code> / <code>%ifnum</code> / <code>%ifstr</code> (token type
 3541 testing).</p>
 3542 </li>
 3543 <li>
 3544 <p>Added the ability to distinguish SHL AX,1 (the 8086 version) from SHL
 3545 AX,BYTE 1 (the 286-and-upwards version whose constant happens to be 1).</p>
 3546 </li>
 3547 <li>
 3548 <p>Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete with
 3549 PIC shared library features.</p>
 3550 </li>
 3551 <li>
 3552 <p>Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
 3553 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the otherwise
 3554 accepted standard. The previous behaviour, though it was a deliberate
 3555 feature, was a deliberate feature based on a misunderstanding. Apologies
 3556 for the inconvenience.</p>
 3557 </li>
 3558 <li>
 3559 <p>Improved the flexibility of ABSOLUTE: you can now give it an expression
 3560 rather than being restricted to a constant, and it can take relocatable
 3561 arguments as well.</p>
 3562 </li>
 3563 <li>
 3564 <p>Added the ability for a variable to be declared as EXTERN multiple
 3565 times, and the subsequent definitions are just ignored.</p>
 3566 </li>
 3567 <li>
 3568 <p>We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be alone
 3569 on a line (without a following instruction).</p>
 3570 </li>
 3571 <li>
 3572 <p>Improved sanity checks on whether the arguments to EXTERN, GLOBAL and
 3573 COMMON are valid identifiers.</p>
 3574 </li>
 3575 <li>
 3576 <p>Added misc/exebin.mac to allow direct generation of .EXE files by
 3577 hacking up an EXE header using DB and DW; also added test/binexe.asm to
 3578 demonstrate the use of this. Thanks to Yann Guidon for contributing the EXE
 3579 header code.</p>
 3580 </li>
 3581 <li>
 3582 <p>ndisasm forgot to check whether the input file had been successfully
 3583 opened. Now it does. Doh!</p>
 3584 </li>
 3585 <li>
 3586 <p>Added the Cyrix extensions to the MMX instruction set.</p>
 3587 </li>
 3588 <li>
 3589 <p>Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
 3590 assembled differently. This is important since [ESI+EBP] and [EBP+ESI] have
 3591 different default base segment registers.</p>
 3592 </li>
 3593 <li>
 3594 <p>Added support for the PharLap OMF extension for 4096-byte segment
 3595 alignment.</p>
 3596 </li>
 3597 </ul>
 3598 <h4 id="section-C.3.3">C.3.3 Version 0.95 released July 1997</h4>
 3599 <ul>
 3600 <li>
 3601 <p>Fixed yet another ELF bug. This one manifested if the user relied on the
 3602 default segment, and attempted to define global symbols without first
 3603 explicitly declaring the target segment.</p>
 3604 </li>
 3605 <li>
 3606 <p>Added makefiles (for NASM and the RDF tools) to build Win32 console apps
 3607 under Symantec C++. Donated by Mark Junker.</p>
 3608 </li>
 3609 <li>
 3610 <p>Added `macros.bas' and `insns.bas', QBasic versions of the Perl scripts
 3611 that convert `standard.mac' to `macros.c' and convert `insns.dat' to
 3612 `insnsa.c' and `insnsd.c'. Also thanks to Mark Junker.</p>
 3613 </li>
 3614 <li>
 3615 <p>Changed the diassembled forms of the conditional instructions so that JB
 3616 is now emitted as JC, and other similar changes. Suggested list by Ulrich
 3617 Doewich.</p>
 3618 </li>
 3619 <li>
 3620 <p>Added `@' to the list of valid characters to begin an identifier with.</p>
 3621 </li>
 3622 <li>
 3623 <p>Documentary changes, notably the addition of the `Common Problems'
 3624 section in nasm.doc.</p>
 3625 </li>
 3626 <li>
 3627 <p>Fixed a bug relating to 32-bit PC-relative fixups in OBJ.</p>
 3628 </li>
 3629 <li>
 3630 <p>Fixed a bug in perm_copy() in labels.c which was causing exceptions in
 3631 cleanup_labels() on some systems.</p>
 3632 </li>
 3633 <li>
 3634 <p>Positivity sanity check in TIMES argument changed from a warning to an
 3635 error following a further complaint.</p>
 3636 </li>
 3637 <li>
 3638 <p>Changed the acceptable limits on byte and word operands to allow things
 3639 like `~10111001b' to work.</p>
 3640 </li>
 3641 <li>
 3642 <p>Fixed a major problem in the preprocessor which caused seg-faults if
 3643 macro definitions contained blank lines or comment-only lines.</p>
 3644 </li>
 3645 <li>
 3646 <p>Fixed inadequate error checking on the commas separating the arguments
 3647 to `db', `dw' etc.</p>
 3648 </li>
 3649 <li>
 3650 <p>Fixed a crippling bug in the handling of macros with operand counts
 3651 defined with a `+' modifier.</p>
 3652 </li>
 3653 <li>
 3654 <p>Fixed a bug whereby object file formats which stored the input file name
 3655 in the output file (such as OBJ and COFF) weren't doing so correctly when
 3656 the output file name was specified on the command line.</p>
 3657 </li>
 3658 <li>
 3659 <p>Removed [INC] and [INCLUDE] support for good, since they were obsolete
 3660 anyway.</p>
 3661 </li>
 3662 <li>
 3663 <p>Fixed a bug in OBJ which caused all fixups to be output in 16-bit
 3664 (old-format) FIXUPP records, rather than putting the 32-bit ones in
 3665 FIXUPP32 (new-format) records.</p>
 3666 </li>
 3667 <li>
 3668 <p>Added, tentatively, OS/2 object file support (as a minor variant on
 3669 OBJ).</p>
 3670 </li>
 3671 <li>
 3672 <p>Updates to Fox Cutter's Borland C makefile, Makefile.bc2.</p>
 3673 </li>
 3674 <li>
 3675 <p>Removed a spurious second fclose() on the output file.</p>
 3676 </li>
 3677 <li>
 3678 <p>Added the `-s' command line option to redirect all messages which would
 3679 go to stderr (errors, help text) to stdout instead.</p>
 3680 </li>
 3681 <li>
 3682 <p>Added the `-w' command line option to selectively suppress some classes
 3683 of assembly warning messages.</p>
 3684 </li>
 3685 <li>
 3686 <p>Added the `-p' pre-include and `-d' pre-define command-line options.</p>
 3687 </li>
 3688 <li>
 3689 <p>Added an include file search path: the `-i' command line option.</p>
 3690 </li>
 3691 <li>
 3692 <p>Fixed a silly little preprocessor bug whereby starting a line with a
 3693 `%!' environment-variable reference caused an `unknown directive' error.</p>
 3694 </li>
 3695 <li>
 3696 <p>Added the long-awaited listing file support: the `-l' command line
 3697 option.</p>
 3698 </li>
 3699 <li>
 3700 <p>Fixed a problem with OBJ format whereby, in the absence of any explicit
 3701 segment definition, non-global symbols declared in the implicit default
 3702 segment generated spurious EXTDEF records in the output.</p>
 3703 </li>
 3704 <li>
 3705 <p>Added the NASM environment variable.</p>
 3706 </li>
 3707 <li>
 3708 <p>From this version forward, Win32 console-mode binaries will be included
 3709 in the DOS distribution in addition to the 16-bit binaries. Added
 3710 Makefile.vc for this purpose.</p>
 3711 </li>
 3712 <li>
 3713 <p>Added `return 0;' to test/objlink.c to prevent compiler warnings.</p>
 3714 </li>
 3715 <li>
 3716 <p>Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.</p>
 3717 </li>
 3718 <li>
 3719 <p>Added an alternative memory-reference syntax in which prefixing an
 3720 operand with `&amp;' is equivalent to enclosing it in square brackets, at
 3721 the request of Fox Cutter.</p>
 3722 </li>
 3723 <li>
 3724 <p>Errors in pass two now cause the program to return a non-zero error
 3725 code, which they didn't before.</p>
 3726 </li>
 3727 <li>
 3728 <p>Fixed the single-line macro cycle detection, which didn't work at all on
 3729 macros with no parameters (caused an infinite loop). Also changed the
 3730 behaviour of single-line macro cycle detection to work like cpp, so that
 3731 macros like `extrn' as given in the documentation can be implemented.</p>
 3732 </li>
 3733 <li>
 3734 <p>Fixed the implementation of WRT, which was too restrictive in that you
 3735 couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't a
 3736 relocatable reference.</p>
 3737 </li>
 3738 </ul>
 3739 <h4 id="section-C.3.4">C.3.4 Version 0.94 released April 1997</h4>
 3740 <ul>
 3741 <li>
 3742 <p>Major item: added the macro processor.</p>
 3743 </li>
 3744 <li>
 3745 <p>Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
 3746 reorganised CMPXCHG instruction into early-486 and Pentium forms. Thanks to
 3747 Thobias Jones for the information.</p>
 3748 </li>
 3749 <li>
 3750 <p>Fixed two more stupid bugs in ELF, which were causing `ld' to continue
 3751 to seg-fault in a lot of non-trivial cases.</p>
 3752 </li>
 3753 <li>
 3754 <p>Fixed a seg-fault in the label manager.</p>
 3755 </li>
 3756 <li>
 3757 <p>Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is the
 3758 only option for BCD loads/stores in any case.</p>
 3759 </li>
 3760 <li>
 3761 <p>Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if anyone
 3762 bothers to provide it. Previously they complained unless no keyword at all
 3763 was present.</p>
 3764 </li>
 3765 <li>
 3766 <p>Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a vestige
 3767 of a bug that I thought had been fixed in 0.92. This was fixed, hopefully
 3768 for good this time...</p>
 3769 </li>
 3770 <li>
 3771 <p>Another minor phase error (insofar as a phase error can _ever_ be minor)
 3772 fixed, this one occurring in code of the form</p>
 3773 <pre>
 3774   rol ax,forward_reference 
 3775   forward_reference equ 1
 3776 </pre>
 3777 </li>
 3778 <li>
 3779 <p>The number supplied to TIMES is now sanity-checked for positivity, and
 3780 also may be greater than 64K (which previously didn't work on 16-bit
 3781 systems).</p>
 3782 </li>
 3783 <li>
 3784 <p>Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.</p>
 3785 </li>
 3786 <li>
 3787 <p>Added the INCBIN pseudo-opcode.</p>
 3788 </li>
 3789 <li>
 3790 <p>Due to the advent of the preprocessor, the [INCLUDE] and [INC]
 3791 directives have become obsolete. They are still supported in this version,
 3792 with a warning, but won't be in the next.</p>
 3793 </li>
 3794 <li>
 3795 <p>Fixed a bug in OBJ format, which caused incorrect object records to be
 3796 output when absolute labels were made global.</p>
 3797 </li>
 3798 <li>
 3799 <p>Updates to RDOFF subdirectory, and changes to outrdf.c.</p>
 3800 </li>
 3801 </ul>
 3802 <h4 id="section-C.3.5">C.3.5 Version 0.93 released January 1997</h4>
 3803 <p>This release went out in a great hurry after semi-crippling bugs were
 3804 found in 0.92.</p>
 3805 <ul>
 3806 <li>
 3807 <p>Really <em>did</em> fix the stack overflows this time. *blush*</p>
 3808 </li>
 3809 <li>
 3810 <p>Had problems with EA instruction sizes changing between passes, when an
 3811 offset contained a forward reference and so 4 bytes were allocated for the
 3812 offset in pass one; by pass two the symbol had been defined and happened to
 3813 be a small absolute value, so only 1 byte got allocated, causing
 3814 instruction size mismatch between passes and hence incorrect address
 3815 calculations. Fixed.</p>
 3816 </li>
 3817 <li>
 3818 <p>Stupid bug in the revised ELF section generation fixed (associated
 3819 string-table section for .symtab was hard-coded as 7, even when this didn't
 3820 fit with the real section table). Was causing `ld' to seg-fault under
 3821 Linux.</p>
 3822 </li>
 3823 <li>
 3824 <p>Included a new Borland C makefile, Makefile.bc2, donated by Fox Cutter
 3825 &lt;lmb@comtch.iea.com&gt;.</p>
 3826 </li>
 3827 </ul>
 3828 <h4 id="section-C.3.6">C.3.6 Version 0.92 released January 1997</h4>
 3829 <ul>
 3830 <li>
 3831 <p>The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
 3832 fixed. This also affected the LCC driver.</p>
 3833 </li>
 3834 <li>
 3835 <p>Fixed a bug regarding 32-bit effective addresses of the form
 3836 <code>[other_register+ESP]</code>.</p>
 3837 </li>
 3838 <li>
 3839 <p>Documentary changes, notably documentation of the fact that Borland
 3840 Win32 compilers use `obj' rather than `win32' object format.</p>
 3841 </li>
 3842 <li>
 3843 <p>Fixed the COMENT record in OBJ files, which was formatted incorrectly.</p>
 3844 </li>
 3845 <li>
 3846 <p>Fixed a bug causing segfaults in large RDF files.</p>
 3847 </li>
 3848 <li>
 3849 <p>OBJ format now strips initial periods from segment and group
 3850 definitions, in order to avoid complications with the local label syntax.</p>
 3851 </li>
 3852 <li>
 3853 <p>Fixed a bug in disassembling far calls and jumps in NDISASM.</p>
 3854 </li>
 3855 <li>
 3856 <p>Added support for user-defined sections in COFF and ELF files.</p>
 3857 </li>
 3858 <li>
 3859 <p>Compiled the DOS binaries with a sensible amount of stack, to prevent
 3860 stack overflows on any arithmetic expression containing parentheses.</p>
 3861 </li>
 3862 <li>
 3863 <p>Fixed a bug in handling of files that do not terminate in a newline.</p>
 3864 </li>
 3865 </ul>
 3866 <h4 id="section-C.3.7">C.3.7 Version 0.91 released November 1996</h4>
 3867 <ul>
 3868 <li>
 3869 <p>Loads of bug fixes.</p>
 3870 </li>
 3871 <li>
 3872 <p>Support for RDF added.</p>
 3873 </li>
 3874 <li>
 3875 <p>Support for DBG debugging format added.</p>
 3876 </li>
 3877 <li>
 3878 <p>Support for 32-bit extensions to Microsoft OBJ format added.</p>
 3879 </li>
 3880 <li>
 3881 <p>Revised for Borland C: some variable names changed, makefile added.</p>
 3882 </li>
 3883 <li>
 3884 <p>LCC support revised to actually work.</p>
 3885 </li>
 3886 <li>
 3887 <p>JMP/CALL NEAR/FAR notation added.</p>
 3888 </li>
 3889 <li>
 3890 <p>`a16', `o16', `a32' and `o32' prefixes added.</p>
 3891 </li>
 3892 <li>
 3893 <p>Range checking on short jumps implemented.</p>
 3894 </li>
 3895 <li>
 3896 <p>MMX instruction support added.</p>
 3897 </li>
 3898 <li>
 3899 <p>Negative floating point constant support added.</p>
 3900 </li>
 3901 <li>
 3902 <p>Memory handling improved to bypass 64K barrier under DOS.</p>
 3903 </li>
 3904 <li>
 3905 <p><code>$</code> prefix to force treatment of reserved words as
 3906 identifiers added.</p>
 3907 </li>
 3908 <li>
 3909 <p>Default-size mechanism for object formats added.</p>
 3910 </li>
 3911 <li>
 3912 <p>Compile-time configurability added.</p>
 3913 </li>
 3914 <li>
 3915 <p><code>#</code>, <code>@</code>, <code>~</code> and c{?} are now valid
 3916 characters in labels.</p>
 3917 </li>
 3918 <li>
 3919 <p><code>-e</code> and <code>-k</code> options in NDISASM added.</p>
 3920 </li>
 3921 </ul>
 3922 <h4 id="section-C.3.8">C.3.8 Version 0.90 released October 1996</h4>
 3923 <p>First release version. First support for object file output. Other
 3924 changes from previous version (0.3x) too numerous to document.</p>
 3925 </div>
 3926 </body>
 3927 </html>