More test files...
[nasm.git] / CHANGES
blobdcff79accb836c899fc8eae3790696f148baa2e7
1 0.98.38
2 -------
3 * Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
4   mkdep.pl to be able to generate completely pathless dependencies, as
5   required by OpenWatcom wmake (it supports path searches, but not
6   explicit paths.)
7 * Fix the STR instruction.
8 * Fix the ELF output format, which was broken under certain
9   circumstances due to the addition of stabs support.
10 * Quick-fix Borland format debug-info for -f obj  
11 * Fix for %rep with no arguments (#560568)
12 * Fix concatenation of preprocessor function call  (#794686)
13 * Fix long label causes coredump (#677841)
14 * Use autoheader as well as autoconf to keep configure from generating
15   ridiculously long command lines.
17 0.98.37
18 -------
19 * Paths given in "-I" switch searched for "incbin"ed as
20   well as "%include"ed files.
21 * Added stabs debugging for the ELF output format, patch from
22   Martin Wawro.
23 * Fix output/outbin.c to allow origin > 80000000h.
24 * Make -U switch work.
25 * Fix the use of relative offsets with explicit prefixes, e.g. "a32 loop foo".
26 * Remove "backslash()".
27 * Fix the SMSW and SLDT instructions.
28 * -O2 and -O3 are no longer aliases for -O10 and -O15.  If you mean the
29   latter, please say so! :)
31 0.98.36
32 -------
33 * Update rdoff - librarian/archiver - common rec - docs!
34 * Fix signed/unsigned problems.
35 * Fix JMP FAR label and CALL FAR label.
36 * Add new multisection support - map files - fix align bug
37 * Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
38 * "Q" or "O" suffixes indicate octal
39 * Support Prescott new instructions (PNI).
40 * Cyrix XSTORE instruction.
42 0.98.35
43 -------
44 * Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.)
45 * Fix dependencies and compiler warnings.
46 * Add "const" in a number of places.
47 * Add -X option to specify error reporting format (use -Xvc to
48   integrate with Microsoft Visual Studio.)
49 * Minor changes for code legibility.
50 * Drop use of tmpnam() in rdoff (security fix.)
52 0.98.34
53 -------
54 * Correct additional address-size vs. operand-size confusions.
55 * Generate dependencies for all Makefiles automatically.
56 * Add support for unimplemented (but theoretically available)
57   registers such as tr0 and cr5.  Segment registers 6 and 7 are called
58   segr6 and segr7 for the operations which they can be represented.
59 * Correct some disassembler bugs related to redundant address-size prefixes.
60   Some work still remains in this area.
61 * Correctly generate an error for things like "SEG eax".
62 * Add the JMPE instruction, enabled by "CPU IA64".
63 * Correct compilation on newer gcc/glibc platforms.
64 * Issue an error on things like "jmp far eax".
67 0.98.33
68 -------
70 * New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
71   round out the version-query macros.  version.pl now understands
72   X.YYplWW or X.YY.ZZplWW as a version number, equivalent to
73   X.YY.ZZ.WW (or X.YY.0.WW, as appropriate).
74 * New keyword "strict" to disable the optimization of specific
75   operands.
76 * Fix the handing of size overrides with JMP instructions
77   (instructions such as "jmp dword foo".)
78 * Fix the handling of "ABSOLUTE label", where "label" points into a
79   relocatable segment.
80 * Fix OBJ output format with lots of externs.
81 * More documentation updates.
82 * Add -Ov option to get verbose information about optimizations.
83 * Undo a braindead change which broke %elif directives.
84 * Makefile updates.
87 0.98.32
88 -------
90 * Fix NASM crashing when %macro directives were left unterminated.
91 * Lots of documentation updates.
92 * Complete rewrite of the PostScript/PDF documentation generator.
93 * The MS Visual C++ Makefile was updated and corrected.
94 * Recognize .rodata as a standard section name in ELF.
95 * Fix some obsolete Perl4-isms in Perl scripts.
96 * Fix configure.in to work with autoconf 2.5x.
97 * Fix a couple of "make cleaner" misses.
98 * Make the normal "./configure && make" work with Cygwin.
101 0.98.31
102 -------
104 * Correctly build in a separate object directory again.
105 * Derive all references to the version number from the version file.
106 * New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
107 * Lots of Makefile updates and bug fixes.
108 * New %ifmacro directive to test for multiline macros.
109 * Documentation updates.
110 * Fixes for 16-bit OBJ format output.
111 * Changed the NASM environment variable to NASMENV.
114 0.98.30
115 -------
117 * Changed doc files a lot: completely removed old READMExx and
118   Wishlist files, incorporating all information in CHANGES and TODO.
119 * I waited a long time to rename zoutieee.c to (original) outieee.c
120 * moved all output modules to output/ subdirectory.
121 * Added 'make strip' target to strip debug info from nasm & ndisasm.
122 * Added INSTALL file with installation instructions.
123 * Added -v option description to nasm man.
124 * Added dist makefile target to produce source distributions.
125 * 16-bit support for ELF output format (GNU extension, but useful.)
128 0.98.28
129 -------
131 * Fastcooked this for Debian's Woody release:
132 Frank applied the INCBIN bug patch to 0.98.25alt and called
133 it 0.98.28 to not confuse poor little apt-get.
136 0.98.26
137 -------
139 * Reorganised files even better from 0.98.25alt
142 0.98.25alt
143 ----------
145 * Prettified the source tree. Moved files to more reasonable places.
146 * Added findleak.pl script to misc/ directory.
147 * Attempted to fix doc.
149 0.98.25
150 -------
152 * Line continuation character '\'
153 * Docs inadvertantly reverted - "dos packaging".
156 0.98.24p1
157 ---------
159 * FIXME: Someone, document this please.
162 0.98.24
163 -------
165 * Documentation - Ndisasm doc added to Nasm.doc.
168 0.98.23
169 -------
171 * Attempted to remove rdoff version1
172 * Lino Mastrodomenico's patches to preproc.c (%$$ bug?).
175 0.98.22
176 -------
178 * Update rdoff2 - attempt to remove v1.
181 0.98.21
182 -------
184 * Optimization fixes.
187 0.98.20
188 -------
190 * Optimization fixes.
193 0.98.19
194 -------
196 * H. J. Lu's patch back out.
199 0.98.18
200 -------
202 * Added ".rdata" to "-f win32".
205 0.98.17
206 -------
208 * H. J. Lu's "bogus elf" patch. (Red Hat problem?)
211 0.98.16
212 -------
214 * Fix whitespace before "[section ..." bug.
216 0.98.15
217 -------
219 * Rdoff changes (?).
220 * Fix fixes to memory leaks.
222 0.98.14
223 -------
225 * Fix memory leaks.
226 * (there was no '.13)
228 0.98.12
229 -------
231 * Update optimization (new function of "-O1")
232 * Changes to test/bintest.asm (?).
234 0.98.11
235 -------
237 * Optimization changes.
238 * Ndisasm fixed.
239 * (there was no '.10)
241 0.98.09
242 -------
244 * Add multiple sections support to "-f bin".
245 * Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.
246 * Add "-v" as an alias to the "-r" switch.
247 * Remove "#ifdef" from Tasm compatibility options.
248 * Remove redundant size-overrides on "mov ds, ex", etc.
249 * Fixes to SSE2, other insns.dat (?).
250 * Enable uppercase "I" and "P" switches.
251 * Case insinsitive "seg" and "wrt".
252 * Update install.sh (?).
253 * Allocate tokens in blocks.
254 * Improve "invalid effective address" messages.
256 0.98.08
257 -------
259 * Add "%strlen" and "%substr" macro operators
260 * Fixed broken c16.mac.
261 * Unterminated string error reported.
262 * Fixed bugs as per 0.98bf
265 0.98.09b with John Coffman patches released 28-Oct-2001
266 -------------------------------------------------------
268 Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
270 * More closely compatible with 0.98 when -O0 is implied
271 or specified.  Not strictly identical, since backward 
272 branches in range of short offsets are recognized, and signed
273 byte values with no explicit size specification will be
274 assembled as a single byte.
276 * More forgiving with the PUSH instruction.  0.98 requires
277 a size to be specified always.  0.98.09b will imply the size
278 from the current BITS setting (16 or 32).
280 * Changed definition of the optimization flag:
282         -O0     strict two-pass assembly, JMP and Jcc are
283                 handled more like 0.98, except that back-
284                 ward JMPs are short, if possible.
286         -O1     strict two-pass assembly, but forward
287                 branches are assembled with code guaranteed
288                 to reach; may produce larger code than
289                 -O0, but will produce successful assembly
290                 more often if branch offset sizes are not
291                 specified.
293         -O2     multi-pass optimization, minimize branch
294                 offsets; also will minimize signed immed-
295                 iate bytes, overriding size specification.
297         -O3     like -O2, but more passes taken, if needed
300 0.98.07 released 01/28/01
301 -------------------------
303 *       Added Stepane Denis' SSE2 instructions to a *working*
304         version of the code - some earlier versions were based on
305         broken code - sorry 'bout that. version "0.98.07"
308 01/28/01
309 --------
311 *       Cosmetic modifications to nasm.c, nasm.h,
312         AUTHORS, MODIFIED
315 0.98.06f released 01/18/01
316 --------------------------
318 *       - Add "metalbrain"s jecxz bug fix in insns.dat
319         - alter nasmdoc.src to match - version "0.98.06f"
322 0.98.06e released 01/09/01
323 --------------------------
325 *       Removed the "outforms.h" file - it appears to be
326         someone's old backup of "outform.h". version "0.98.06e" 
329 01/09/01
330 --------
332 * fbk - finally added the fix for the "multiple %includes bug",
333         known since 7/27/99 - reported originally (?) and sent to
334         us by Austin Lunnen - he reports that John Fine had a fix
335         within the day. Here it is...
337 * Nelson Rush resigns from the group. Big thanks to Nelson for
338   his leadership and enthusiasm in getting these changes
339   incorporated into Nasm!
341 * fbk - [list +], [list -] directives - ineptly implemented, should
342         be re-written or removed, perhaps.
344 * Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
345                        as well - testing might be desirable...
348 08/07/00
349 --------
351 * James Seter - -postfix, -prefix command line switches.
352 * Yuri Zaporogets - rdoff utility changes.
355 0.98p1
356 ------
358 * GAS-like palign (Panos Minos)
359 * FIXME: Someone, fill this in with details
362 0.98bf (bug-fixed)
363 ----------------------------------
365 * Fixed - elf and aoutb bug - shared libraries
366         - multiple "%include" bug in "-f obj"   
367         - jcxz, jecxz bug
368         - unrecognized option bug in ndisasm 
370 0.98.03 with John Coffman's changes released 27-Jul-2000
371 --------------------------------------------------------
373 * Added signed byte optimizations for the 0x81/0x83 class
374 of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
375 when used as 'ADD reg16,imm' or 'ADD reg32,imm.'  Also
376 optimization of signed byte form of 'PUSH imm' and 'IMUL
377 reg,imm'/'IMUL reg,reg,imm.'  No size specification is needed.
379 * Added multi-pass JMP and Jcc offset optimization.  Offsets
380 on forward references will preferentially use the short form,
381 without the need to code a specific size (short or near) for
382 the branch.  Added instructions for 'Jcc label' to use the
383 form 'Jnotcc $+3/JMP label', in cases where a short offset
384 is out of bounds.  If compiling for a 386 or higher CPU, then
385 the 386 form of Jcc will be used instead.
387 This feature is controlled by a new command-line switch: "O",
388 (upper case letter O).  "-O0" reverts the assembler to no
389 extra optimization passes, "-O1" allows up to 5 extra passes,
390 and "-O2"(default), allows up to 10 extra optimization passes.
392 * Added a new directive:  'cpu XXX', where XXX is any of: 
393 8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
394 Katmai.  All are case insensitive.  All instructions will
395 be selected only if they apply to the selected cpu or lower.
396 Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
398 * Added to 'standard.mac', the "use16" and "use32" forms of
399 the "bits 16/32" directive. This is nothing new, just conforms
400 to a lot of other assemblers. (minor)
402 * Changed label allocation from 320/32 (10000 labels @ 200K+) 
403 to 32/37 (1000 labels); makes running under DOS much easier.
404 Since additional label space is allocated dynamically, this
405 should have no effect on large programs with lots of labels.
406 The 37 is a prime, believed to be better for hashing. (minor)
408 * Integrated patchfile 0.98-0.98.01.  I call this version
409 0.98.03, for historical reasons:  0.98.02 was trashed.
411 --John Coffman <johninsd@san.rr.com>               27-Jul-2000
414 Kendall Bennett's SciTech MGL changes
415 -------------------------------------
416 Note that you must define "TASM_COMPAT" at compile-time
417 to get the Tasm Ideal Mode compatibility.
419 All changes can be compiled in and out using the TASM_COMPAT macros,
420 and when compiled without TASM_COMPAT defined we get the exact same
421 binary as the unmodified 0.98 sources.
423 standard.mac, macros.c:
424  . Added macros to ignore TASM directives before first include
426 nasm.h:
427  . Added extern declaration for tasm_compatible_mode
429 nasm.c:
430  . Added global variable tasm_compatible_mode
431  . Added command line switch for TASM compatible mode (-t)
432  . Changed version command line to reflect when compiled with TASM additions
433  . Added response file processing to allow all arguments on a single
434    line (response file is @resp rather than -@resp for NASM format).
436 labels.c:
437  . Changes islocal() macro to support TASM style @@local labels.
438  . Added islocalchar() macro to support TASM style @@local labels.
440 parser.c:
441  . Added support for TASM style memory references (ie: mov [DWORD eax],10
442    rather than the NASM style mov DWORD [eax],10).
444 preproc.c:
445  . Added new directives, %arg, %local, %stacksize to directives table
446  . Added support for TASM style directives without a leading % symbol.
448 Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
450 * A new keyword %xdefine and its case-insensitive counterpart %ixdefine.
451     They work almost the same way as %define and %idefine but expand
452     the definition immediately, not on the invocation. Something like a cross
453     between %define and %assign. The "x" suffix stands for "eXpand", so
454     "xdefine" can be deciphered as "expand-and-define". Thus you can do
455     things like this:
457         %assign ofs     0
458         
459         %macro  arg     1
460                 %xdefine %1 dword [esp+ofs]
461                 %assign ofs ofs+4
462         %endmacro
464 * Changed the place where the expansion of %$name macros are expanded.
465     Now they are converted into ..@ctxnum.name form when detokenizing, so
466     there are no quirks as before when using %$name arguments to macros,
467     in macros etc. For example:
469         %macro  abc     1
470                 %define %1 hello
471         %endm
473         abc     %$here
474         %$here
476     Now last line will be expanded into "hello" as expected. This also allows
477     for lots of goodies, a good example are extended "proc" macros included
478     in this archive.
480 * Added a check for "cstk" in smacro_defined() before calling get_ctx() -
481     this allows for things like:
483         %ifdef %$abc
484         %endif
486     to work without warnings even in no context.
488 * Added a check for "cstk" in %if*ctx and %elif*ctx directives -
489     this allows to use %ifctx without excessive warnings. If there is
490     no active context, %ifctx goes through "false" branch.
492 * Removed "user error: " prefix with %error directive: it just clobbers the
493     output and has absolutely no functionality. Besides, this allows to write
494     macros that does not differ from built-in functions in any way.
496 * Added expansion of string that is output by %error directive. Now you
497     can do things like:
499         %define hello(x) Hello, x!
501         %define %$name andy
502         %error "hello(%$name)"
504     Same happened with %include directive.
506 * Now all directives that expect an identifier will try to expand and
507     concatenate everything without whitespaces in between before usage.
508     For example, with "unfixed" nasm the commands
510         %define %$abc hello
511         %define __%$abc goodbye
512         __%$abc
514     would produce "incorrect" output: last line will expand to
516         hello goodbyehello
518     Not quite what you expected, eh? :-) The answer is that preprocessor
519     treats the %define construct as if it would be
521         %define __ %$abc goodbye
523     (note the white space between __ and %$abc). After my "fix" it
524     will "correctly" expand into
526         goodbye
528     as expected. Note that I use quotes around words "correct", "incorrect"
529     etc because this is rather a feature not a bug; however current behaviour
530     is more logical (and allows more advanced macro usage :-).
532     Same change was applied to:
533         %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine,
534         %assign,%iassign,%undef
536 * A new directive [WARNING {+|-}warning-id] have been added. It works only
537     if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
539 * A new warning type: macro-selfref. By default this warning is disabled;
540     when enabled NASM warns when a macro self-references itself; for example
541     the following source:
543         [WARNING macro-selfref]
545         %macro          push    1-*
546                 %rep    %0
547                         push    %1
548                         %rotate 1
549                 %endrep
550         %endmacro
552                         push    eax,ebx,ecx
554     will produce a warning, but if we remove the first line we won't see it
555     anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
556     eats such constructs without warnings at all).
558 * Added a "error" routine to preprocessor which always will set ERR_PASS1
559     bit in severity_code. This removes annoying repeated errors on first
560     and second passes from preprocessor.
562 * Added the %+ operator in single-line macros for concatenating two
563     identifiers. Usage example:
565         %define _myfunc _otherfunc
566         %define cextern(x) _ %+ x
567         cextern (myfunc)
569     After first expansion, third line will become "_myfunc". After this
570     expansion is performed again so it becomes "_otherunc".
572 * Now if preprocessor is in a non-emmitting state, no warning or error
573     will be emmitted. Example:
575         %if 1
576                 mov     eax,ebx
577         %else
578                 put anything you want between these two brackets,
579                 even macro-parameter references %1 or local labels %$zz
580                 or macro-local labels %%zz - no warning will be emmitted.
581         %endif
583 * Context-local variables on expansion as a last resort are looked up
584     in outer contexts. For example, the following piece:
586         %push   outer
587         %define %$a [esp]
589                 %push   inner
590                 %$a
591                 %pop
592         %pop
594     will expand correctly the fourth line to [esp]; if we'll define another
595     %$a inside the "inner" context, it will take precedence over outer
596     definition. However, this modification has been applied only to
597     expand_smacro and not to smacro_define: as a consequence expansion
598     looks in outer contexts, but %ifdef won't look in outer contexts.
600     This behaviour is needed because we don't want nested contexts to
601     act on already defined local macros. Example:
603         %define %$arg1  [esp+4]
604         test    eax,eax
605         if      nz
606                 mov     eax,%$arg1
607         endif
609     In this example the "if" mmacro enters into the "if" context, so %$arg1
610     is not valid anymore inside "if". Of course it could be worked around
611     by using explicitely %$$arg1 but this is ugly IMHO.
613 * Fixed memory leak in %undef. The origline wasn't freed before
614     exiting on success.
616 * Fixed trap in preprocessor when line expanded to empty set of tokens.
617     This happens, for example, in the following case:
619         #define SOMETHING
620         SOMETHING
623 0.98
624 ----
626 All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
628 * The documentation comment delimiter is \# not #.
629 * Allow EQU definitions to refer to external labels; reported by
630   Pedro Gimeno.
631 * Re-enable support for RDOFF v1; reported by Pedro Gimeno.
632 * Updated License file per OK from Simon and Julian.
635 0.98p9
636 ------
638 * Update documentation (although the instruction set reference will
639   have to wait; I don't want to hold up the 0.98 release for it.)
640 * Verified that the NASM implementation of the PEXTRW and PMOVMSKB
641   instructions is correct.  The encoding differs from what the Intel
642   manuals document, but the Pentium III behaviour matches NASM, not
643   the Intel manuals.
644 * Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
645   Stefan Hoffmeister.
646 * Resurrect the -s option, which was removed when changing the
647   diagnostic output to stdout.
650 0.98p8
651 ------
653 * Fix for "DB" when NASM is running on a bigendian machine.
654 * Invoke insns.pl once for each output script, making Makefile.in
655   legal for "make -j".
656 * Improve the Unix configure-based makefiles to make package
657   creation easier.
658 * Included an RPM .spec file for building RPM (RedHat Package Manager)
659   packages on Linux or Unix systems.
660 * Fix Makefile dependency problems.
661 * Change src/rdsrc.pl to include sectioning information in info
662   output; required for install-info to work.
663 * Updated the RDOFF distribution to version 2 from Jules; minor
664   massaging to make it compile in my environment.
665 * Split doc files that can be built by anyone with a Perl interpreter off
666   into a separate archive.
667 * "Dress rehearsal" release!
670 0.98p7
671 ------
673 * Fixed opcodes with a third byte-sized immediate argument to not
674   complain if given "byte" on the immediate.
675 * Allow %undef to remove single-line macros with arguments.  This
676   matches the behaviour of #undef in the C preprocessor.
677 * Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
678   compatibility with most C compilers and preprocessors.  This allows
679   Makefile options to be shared between cc and nasm, for example.
680 * Minor cleanups.
681 * Went through the list of Katmai instructions and hopefully fixed the
682   (rather few) mistakes in it.
683 * (Hopefully) fixed a number of disassembler bugs related to ambiguous
684   instructions (disambiguated by -p) and SSE instructions with REP.
685 * Fix for bug reported by Mark Junger: "call dword 0x12345678" should
686   work and may add an OSP (affected CALL, JMP, Jcc).
687 * Fix for environments when "stderr" isn't a compile-time constant.
690 0.98p6
691 ------
693 * Took officially over coordination of the 0.98 release; so drop
694   the p3.x notation. Skipped p4 and p5 to avoid confusion with John
695   Fine's J4 and J5 releases.
696 * Update the documentation; however, it still doesn't include
697   documentation for the various new instructions.  I somehow wonder if
698   it makes sense to have an instruction set reference in the assembler
699   manual when Intel et al have PDF versions of their manuals online.
700 * Recognize "idt" or "centaur" for the -p option to ndisasm.
701 * Changed error messages back to stderr where they belong, but add an
702   -E option to redirect them elsewhere (the DOS shell cannot redirect
703   stderr.)
704 * -M option to generate Makefile dependencies (based on code from Alex
705   Verstak.)
706 * %undef preprocessor directive, and -u option, that undefines a
707   single-line macro.
708 * OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
709   Chuck Crayne.
710 * Various minor bugfixes (reported by):
711   - Dangling %s in preproc.c (Martin Junker)
712 * THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS.  I am
713   on a trip and didn't bring the Katmai instruction reference, so I
714   can't work on them right now.
715 * Updated the License file per agreement with Simon and Jules to
716   include a GPL distribution clause.
719 0.98p3.7
720 --------
722 * (Hopefully) fixed the canned Makefiles to include the outrdf2 and
723   zoutieee modules.
724 * Renamed changes.asm to changed.asm.
727 0.98p3.6
728 --------
730 * Fixed a bunch of instructions that were added in 0.98p3.5 which had
731   memory operands, and the address-size prefix was missing from the
732   instruction pattern.
735 0.98p3.5
736 --------
738 * Merged in changes from John S. Fine's 0.98-J5 release.  John's based
739   0.98-J5 on my 0.98p3.3 release; this merges the changes.
740 * Expanded the instructions flag field to a long so we can fit more
741   flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
742   such.
743 * Fix the "PRIV" flag on a bunch of instructions, and create new
744   "PROT" flag for protected-mode-only instructions (orthogonal to if
745   the instruction is privileged!) and new "SMM" flag for SMM-only
746   instructions.
747 * Added AMD-only SYSCALL and SYSRET instructions.
748 * Make SSE actually work, and add new Katmai MMX instructions.
749 * Added a -p (preferred vendor) option to ndisasm so that it can
750   distinguish e.g. Cyrix opcodes also used in SSE.  For example:
752         ndisasm -p cyrix aliased.bin
753         00000000  670F514310        paddsiw mm0,[ebx+0x10]
754         00000005  670F514320        paddsiw mm0,[ebx+0x20]
755         ndisasm -p intel aliased.bin
756         00000000  670F514310        sqrtps xmm0,[ebx+0x10]
757         00000005  670F514320        sqrtps xmm0,[ebx+0x20]
758 * Added a bunch of Cyrix-specific instructions.
761 0.98p3.4
762 --------
764 * Made at least an attempt to modify all the additional Makefiles (in
765   the Mkfiles directory).  I can't test it, but this was the best I
766   could do.
767 * DOS DJGPP+"Opus Make" Makefile from John S. Fine.
768 * changes.asm changes from John S. Fine.
771 0.98p3.3
772 --------
774 * Patch from Conan Brink to allow nesting of %rep directives.
775 * If we're going to allow INT01 as an alias for INT1/ICEBP (one of
776   Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
777   as well.
778 * Updated changes.asm to include the latest changes.
779 * Tried to clean up the <CR>s that had snuck in from a DOS/Windows
780   environment into my Unix environment, and try to make sure than
781   DOS/Windows users get them back.
782 * We would silently generate broken tools if insns.dat wasn't sorted
783   properly.  Change insns.pl so that the order doesn't matter.
784 * Fix bug in insns.pl (introduced by me) which would cause conditional
785   instructions to have an extra "cc" in disassembly, e.g. "jnz"
786   disassembled as "jccnz".
789 0.98p3.2
790 --------
792 * Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
793   http://www.csoft.net/cz/johnfine/
794 * Changed previous "spotless" Makefile target (appropriate for distribution)
795   to "distclean", and added "cleaner" target which is same as "clean"
796   except deletes files generated by Perl scripts; "spotless" is union.
797 * Removed BASIC programs from distribution.  Get a Perl interpreter
798   instead (see below.)
799 * Calling this "pre-release 3.2" rather than "p3-hpa2" because of
800   John's contributions.
801 * Actually link in the IEEE output format (zoutieee.c); fix a bunch of
802   compiler warnings in that file.  Note I don't know what IEEE output
803   is supposed to look like, so these changes were made "blind".
806 0.98p3-hpa
807 ----------
809 * Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
810   buildable version for Unix systems (Makefile.in updates, etc.)
811 * Changed insns.pl to create the instruction tables in nasm.h and
812   names.c, so that a new instruction can be added by adding it *only*
813   to insns.dat.
814 * Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
815   FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
816   guarantee will never be used; one of them is documented as UD2 in
817   Intel documentation, the other one just as "Undefined Opcode" --
818   calling it UD1 seemed to make sense.)
819 * MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
820   characters long.  Now MAX_SYMBOL is derived from insns.dat.
821 * A note on the BASIC programs included: forget them.  insns.bas is
822   already out of date.  Get yourself a Perl interpreter for your
823   platform of choice at:
825         http://www.cpan.org/ports/index.html
828 0.98 pre-release 3
829 -------------------
831 added response file support, improved command line handling, new layout
832 help screen
834 fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
835 related bugs, updated Wishlist; 0.98 Prerelease 3.
838 0.98 pre-release 2
839 -------------------
841 fixed bug in outcoff.c to do with truncating section names longer
842 than 8 characters, referencing beyond end of string; 0.98 pre-release 2
845 0.98 pre-released May 1999
846 --------------------------
848 Fixed a bug whereby STRUC didn't work at all in RDF.
850 Fixed a problem with group specification in PUBDEFs in OBJ.
852 Improved ease of adding new output formats. Contribution due to
853 Fox Cutter.
855 Fixed a bug in relocations in the `bin' format: was showing up when
856 a relocatable reference crossed an 8192-byte boundary in any output
857 section.
859 Fixed a bug in local labels: local-label lookups were inconsistent
860 between passes one and two if an EQU occurred between the definition
861 of a global label and the subsequent use of a local label local to
862 that global.
864 Fixed a seg-fault in the preprocessor (again) which happened when
865 you use a blank line as the first line of a multi-line macro
866 definition and then defined a label on the same line as a call to
867 that macro.
869 Fixed a stale-pointer bug in the handling of the NASM environment
870 variable. Thanks to Thomas McWilliams.
872 ELF had a hard limit on the number of sections which caused
873 segfaults when transgressed. Fixed.
875 Added ability for ndisasm to read from stdin by using `-' as the
876 filename.
878 ndisasm wasn't outputting the TO keyword. Fixed.
880 Fixed error cascade on bogus expression in %if - an error in
881 evaluation was causing the entire %if to be discarded, thus creating
882 trouble later when the %else or %endif was encountered.
884 Forward reference tracking was instruction-granular not operand-
885 granular, which was causing 286-specific code to be generated
886 needlessly on code of the form `shr word [forwardref],1'. Thanks to
887 Jim Hague for sending a patch.
889 All messages now appear on stdout, as sending them to stderr serves
890 no useful purpose other than to make redirection difficult.
892 Fixed the problem with EQUs pointing to an external symbol - this
893 now generates an error message.
895 Allowed multiple size prefixes to an operand, of which only the first
896 is taken into account.
898 Incorporated John Fine's changes, including fixes of a large number
899 of preprocessor bugs, some small problems in OBJ, and a reworking of
900 label handling to define labels before their line is assembled, rather
901 than after.
903 Reformatted a lot of the source code to be more readable. Included
904 'coding.txt' as a guideline for how to format code for contributors.
906 Stopped nested %reps causing a panic - they now cause a slightly more
907 friendly error message instead.
909 Fixed floating point constant problems (patch by Pedro Gimeno)
911 Fixed the return value of insn_size() not being checked for -1, indicating
912 an error.
914 Incorporated 3D now instructions.
916 Fixed the 'mov eax, eax + ebx' bug.
918 Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
920 Incorporated John Fine's command line parsing changes
922 Incorporated David Lindauer's OMF debug support
924 Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
925 specification warning when sizes agree).
927 Released NASM 0.98 Pre-release 1
930 0.97 released December 1997
931 ---------------------------
933 This was entirely a bug-fix release to 0.96, which seems to have got
934 cursed. Silly me.
936 Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
937 fail. Caused by an error in the `MOV EAX,<segment>' support.
939 ndisasm hung at EOF when compiled with lcc on Linux because lcc on
940 Linux somehow breaks feof(). ndisasm now does not rely on feof().
942 A heading in the documentation was missing due to a markup error in
943 the indexing. Fixed.
945 Fixed failure to update all pointers on realloc() within extended-
946 operand code in parser.c. Was causing wrong behaviour and seg faults
947 on lines such as `dd 0.0,0.0,0.0,0.0,...'
949 Fixed a subtle preprocessor bug whereby invoking one multi-line
950 macro on the first line of the expansion of another, when the second
951 had been invoked with a label defined before it, didn't expand the
952 inner macro. 
954 Added internal.doc back in to the distribution archives - it was
955 missing in 0.96 *blush*
957 Fixed bug causing 0.96 to be unable to assemble its own test files,
958 specifically objtest.asm. *blush again*
960 Fixed seg-faults and bogus error messages caused by mismatching
961 %rep and %endrep within multi-line macro definitions.
963 Fixed a problem with buffer overrun in OBJ, which was causing
964 corruption at ends of long PUBDEF records.
966 Separated DOS archives into main-program and documentation to reduce
967 download size.
970 0.96 released November 1997
971 ---------------------------
973 Fixed a bug whereby, if `nasm sourcefile' would cause a filename
974 collision warning and put output into `nasm.out', then `nasm
975 sourcefile -o outputfile' still gave the warning even though the
976 `-o' was honoured.
978 Fixed name pollution under Digital UNIX: one of its header files
979 defined R_SP, which broke the enum in nasm.h.
981 Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
982 two-operand forms; NDISASM didn't recognise the longer register
983 forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
984 flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
985 size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
986 undocumented because the Intel Architecture reference documents
987 them.
989 Fixed a problem with the local-label mechanism, whereby strange
990 types of symbol (EQUs, auto-defined OBJ segment base symbols)
991 interfered with the `previous global label' value and screwed up
992 local labels.
994 Fixed a bug whereby the stub preprocessor didn't communicate with
995 the listing file generator, so that the -a and -l options in
996 conjunction would produce a useless listing file.
998 Merged `os2' object file format back into `obj', after discovering
999 that `obj' _also_ shouldn't have a link pass separator in a module
1000 containing a non-trivial MODEND. Flat segments are now declared
1001 using the FLAT attribute. `os2' is no longer a valid object format
1002 name: use `obj'.
1004 Removed the fixed-size temporary storage in the evaluator. Very very
1005 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
1006 so) should now no longer crash NASM.
1008 Fixed a bug involving segfaults on disassembly of MMX instructions,
1009 by changing the meaning of one of the operand-type flags in nasm.h.
1010 This may cause other apparently unrelated MMX problems; it needs to
1011 be tested thoroughly.
1013 Fixed some buffer overrun problems with large OBJ output files.
1014 Thanks to DJ Delorie for the bug report and fix.
1016 Made preprocess-only mode actually listen to the %line markers as it
1017 prints them, so that it can report errors more sanely.
1019 Re-designed the evaluator to keep more sensible track of expressions
1020 involving forward references: can now cope with previously-nightmare
1021 situations such as
1022    mov ax,foo | bar
1023    foo equ 1
1024    bar equ 2
1026 Added the ALIGN and ALIGNB standard macros.
1028 Added PIC support in ELF: use of WRT to obtain the four extra
1029 relocation types needed.
1031 Added the ability for output file formats to define their own
1032 extensions to the GLOBAL, COMMON and EXTERN directives.
1034 Implemented common-variable alignment, and global-symbol type and
1035 size declarations, in ELF.
1037 Implemented NEAR and FAR keywords for common variables, plus
1038 far-common element size specification, in OBJ.
1040 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
1041 default WRT specification (either a segment or a group).
1043 Transformed the Unix NASM archive into an auto-configuring package.
1045 Added a sanity-check for people applying SEG to things which are
1046 already segment bases: this previously went unnoticed by the SEG
1047 processing and caused OBJ-driver panics later.
1049 Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
1050 type references: OBJ doesn't directly support dword-size segment
1051 base fixups, but as long as the low two bytes of the constant term
1052 are zero, a word-size fixup can be generated instead and it will
1053 work.
1055 Added the ability to specify sections' alignment requirements in
1056 Win32 object files and pure binary files.
1058 Added preprocess-time expression evaluation: the %assign (and
1059 %iassign) directive and the bare %if (and %elif) conditional. Added
1060 relational operators to the evaluator, for use only in %if
1061 constructs: the standard relationals = < > <= >= <> (and C-like
1062 synonyms == and !=) plus low-precedence logical operators &&, ^^ and
1065 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
1067 Added the __FILE__ and __LINE__ standard macros.
1069 Added a sanity check for number constants being greater than
1070 0xFFFFFFFF. The warning can be disabled.
1072 Added the %0 token whereby a variadic multi-line macro can tell how
1073 many parameters it's been given in a specific invocation.
1075 Added %rotate, allowing multi-line macro parameters to be cycled.
1077 Added the `*' option for the maximum parameter count on multi-line
1078 macros, allowing them to take arbitrarily many parameters.
1080 Added the ability for the user-level forms of EXTERN, GLOBAL and
1081 COMMON to take more than one argument.
1083 Added the IMPORT and EXPORT directives in OBJ format, to deal with
1084 Windows DLLs.
1086 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
1087 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
1089 Added the ability to distinguish SHL AX,1 (the 8086 version) from
1090 SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
1091 be 1).
1093 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
1094 with PIC shared library features.
1096 Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
1097 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
1098 otherwise accepted standard. The previous behaviour, though it was a
1099 deliberate feature, was a deliberate feature based on a
1100 misunderstanding. Apologies for the inconvenience.
1102 Improved the flexibility of ABSOLUTE: you can now give it an
1103 expression rather than being restricted to a constant, and it can
1104 take relocatable arguments as well.
1106 Added the ability for a variable to be declared as EXTERN multiple
1107 times, and the subsequent definitions are just ignored.
1109 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
1110 alone on a line (without a following instruction).
1112 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
1113 and COMMON are valid identifiers.
1115 Added misc/exebin.mac to allow direct generation of .EXE files by
1116 hacking up an EXE header using DB and DW; also added test/binexe.asm
1117 to demonstrate the use of this. Thanks to Yann Guidon for
1118 contributing the EXE header code.
1120 ndisasm forgot to check whether the input file had been successfully
1121 opened. Now it does. Doh!
1123 Added the Cyrix extensions to the MMX instruction set.
1125 Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
1126 assembled differently. This is important since [ESI+EBP] and
1127 [EBP+ESI] have different default base segment registers.
1129 Added support for the PharLap OMF extension for 4096-byte segment
1130 alignment.
1133 0.95 released July 1997
1134 -----------------------
1136 Fixed yet another ELF bug. This one manifested if the user relied on
1137 the default segment, and attempted to define global symbols without
1138 first explicitly declaring the target segment.
1140 Added makefiles (for NASM and the RDF tools) to build Win32 console
1141 apps under Symantec C++. Donated by Mark Junker.
1143 Added `macros.bas' and `insns.bas', QBasic versions of the Perl
1144 scripts that convert `standard.mac' to `macros.c' and convert
1145 `insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
1146 Junker.
1148 Changed the diassembled forms of the conditional instructions so
1149 that JB is now emitted as JC, and other similar changes. Suggested
1150 list by Ulrich Doewich.
1152 Added `@' to the list of valid characters to begin an identifier
1153 with.
1155 Documentary changes, notably the addition of the `Common Problems'
1156 section in nasm.doc.
1158 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
1160 Fixed a bug in perm_copy() in labels.c which was causing exceptions
1161 in cleanup_labels() on some systems.
1163 Positivity sanity check in TIMES argument changed from a warning to
1164 an error following a further complaint.
1166 Changed the acceptable limits on byte and word operands to allow
1167 things like `~10111001b' to work.
1169 Fixed a major problem in the preprocessor which caused seg-faults if
1170 macro definitions contained blank lines or comment-only lines.
1172 Fixed inadequate error checking on the commas separating the
1173 arguments to `db', `dw' etc.
1175 Fixed a crippling bug in the handling of macros with operand counts
1176 defined with a `+' modifier.
1178 Fixed a bug whereby object file formats which stored the input file
1179 name in the output file (such as OBJ and COFF) weren't doing so
1180 correctly when the output file name was specified on the command
1181 line.
1183 Removed [INC] and [INCLUDE] support for good, since they were
1184 obsolete anyway.
1186 Fixed a bug in OBJ which caused all fixups to be output in 16-bit
1187 (old-format) FIXUPP records, rather than putting the 32-bit ones in
1188 FIXUPP32 (new-format) records.
1190 Added, tentatively, OS/2 object file support (as a minor variant on
1191 OBJ).
1193 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
1195 Removed a spurious second fclose() on the output file.
1197 Added the `-s' command line option to redirect all messages which
1198 would go to stderr (errors, help text) to stdout instead.
1200 Added the `-w' command line option to selectively suppress some
1201 classes of assembly warning messages.
1203 Added the `-p' pre-include and `-d' pre-define command-line options.
1205 Added an include file search path: the `-i' command line option.
1207 Fixed a silly little preprocessor bug whereby starting a line with a
1208 `%!' environment-variable reference caused an `unknown directive'
1209 error.
1211 Added the long-awaited listing file support: the `-l' command line
1212 option.
1214 Fixed a problem with OBJ format whereby, in the absence of any
1215 explicit segment definition, non-global symbols declared in the
1216 implicit default segment generated spurious EXTDEF records in the
1217 output.
1219 Added the NASM environment variable.
1221 From this version forward, Win32 console-mode binaries will be
1222 included in the DOS distribution in addition to the 16-bit binaries.
1223 Added Makefile.vc for this purpose.
1225 Added `return 0;' to test/objlink.c to prevent compiler warnings.
1227 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
1229 Added an alternative memory-reference syntax in which prefixing an
1230 operand with `&' is equivalent to enclosing it in square brackets,
1231 at the request of Fox Cutter.
1233 Errors in pass two now cause the program to return a non-zero error
1234 code, which they didn't before.
1236 Fixed the single-line macro cycle detection, which didn't work at
1237 all on macros with no parameters (caused an infinite loop). Also
1238 changed the behaviour of single-line macro cycle detection to work
1239 like cpp, so that macros like `extrn' as given in the documentation
1240 can be implemented.
1242 Fixed the implementation of WRT, which was too restrictive in that
1243 you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
1244 a relocatable reference.
1247 0.94 released April 1997
1248 ------------------------
1250 Major item: added the macro processor.
1252 Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
1253 reorganised CMPXCHG instruction into early-486 and Pentium forms.
1254 Thanks to Thobias Jones for the information.
1256 Fixed two more stupid bugs in ELF, which were causing `ld' to
1257 continue to seg-fault in a lot of non-trivial cases.
1259 Fixed a seg-fault in the label manager.
1261 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
1262 the only option for BCD loads/stores in any case.
1264 Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
1265 anyone bothers to provide it. Previously they complained unless no
1266 keyword at all was present.
1268 Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
1269 vestige of a bug that I thought had been fixed in 0.92. This was
1270 fixed, hopefully for good this time...
1272 Another minor phase error (insofar as a phase error can _ever_ be
1273 minor) fixed, this one occurring in code of the form
1274    rol ax,forward_reference
1275    forward_reference equ 1
1277 The number supplied to TIMES is now sanity-checked for positivity,
1278 and also may be greater than 64K (which previously didn't work on
1279 16-bit systems).
1281 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
1283 Added the INCBIN pseudo-opcode.
1285 Due to the advent of the preprocessor, the [INCLUDE] and [INC]
1286 directives have become obsolete. They are still supported in this
1287 version, with a warning, but won't be in the next.
1289 Fixed a bug in OBJ format, which caused incorrect object records to
1290 be output when absolute labels were made global.
1292 Updates to RDOFF subdirectory, and changes to outrdf.c.
1295 0.93 released January 1997
1296 --------------------------
1298 This release went out in a great hurry after semi-crippling bugs
1299 were found in 0.92.
1301 Really _did_ fix the stack overflows this time. *blush*
1303 Had problems with EA instruction sizes changing between passes, when
1304 an offset contained a forward reference and so 4 bytes were
1305 allocated for the offset in pass one; by pass two the symbol had
1306 been defined and happened to be a small absolute value, so only 1
1307 byte got allocated, causing instruction size mismatch between passes
1308 and hence incorrect address calculations. Fixed.
1310 Stupid bug in the revised ELF section generation fixed (associated
1311 string-table section for .symtab was hard-coded as 7, even when this
1312 didn't fit with the real section table). Was causing `ld' to
1313 seg-fault under Linux.
1315 Included a new Borland C makefile, Makefile.bc2, donated by Fox
1316 Cutter <lmb@comtch.iea.com>.
1319 0.92 released January 1997
1320 --------------------------
1322 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
1323 fixed. This also affected the LCC driver.
1325 Fixed a bug regarding 32-bit effective addresses of the form
1326 [other_register+ESP].
1328 Documentary changes, notably documentation of the fact that Borland
1329 Win32 compilers use `obj' rather than `win32' object format.
1331 Fixed the COMENT record in OBJ files, which was formatted
1332 incorrectly.
1334 Fixed a bug causing segfaults in large RDF files.
1336 OBJ format now strips initial periods from segment and group
1337 definitions, in order to avoid complications with the local label
1338 syntax.
1340 Fixed a bug in disassembling far calls and jumps in NDISASM.
1342 Added support for user-defined sections in COFF and ELF files.
1344 Compiled the DOS binaries with a sensible amount of stack, to
1345 prevent stack overflows on any arithmetic expression containing
1346 parentheses.
1348 Fixed a bug in handling of files that do not terminate in a newline.
1351 0.91 released November 1996
1352 ---------------------------
1354 Loads of bug fixes.
1355 Support for RDF added.
1356 Support for DBG debugging format added.
1357 Support for 32-bit extensions to Microsoft OBJ format added.
1358 Revised for Borland C: some variable names changed, makefile added.
1359 LCC support revised to actually work.
1360 JMP/CALL NEAR/FAR notation added.
1361 `a16', `o16', `a32' and `o32' prefixes added.
1362 Range checking on short jumps implemented.
1363 MMX instruction support added.
1364 Negative floating point constant support added.
1365 Memory handling improved to bypass 64K barrier under DOS.
1366 $ prefix to force treatment of reserved words as identifiers added.
1367 Default-size mechanism for object formats added.
1368 Compile-time configurability added.
1369 `#', `@', `~' and `?' are now valid characters in labels.
1370 `-e' and `-k' options in NDISASM added.
1373 0.90 released October 1996
1374 --------------------------
1376 First release version. First support for object file output. Other
1377 changes from previous version (0.3x) too numerous to document.