Correct handling of SEG <nonsegment>; per BR 560575
[nasm.git] / CHANGES
blobf3eaa2020730852f717714410437afe0d5008e4b
1 0.98.33
2 -------
4 * New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
5   round out the version-query macros.  version.pl now understands
6   X.YYplWW or X.YY.ZZplWW as a version number, equivalent to
7   X.YY.ZZ.WW (or X.YY.0.WW, as appropriate).
8 * New keyword "strict" to disable the optimization of specific
9   operands.
10 * Fix the handing of size overrides with JMP instructions
11   (instructions such as "jmp dword foo".)
12 * Fix the handling of "ABSOLUTE label", where "label" points into a
13   relocatable segment.
14 * Fix OBJ output format with lots of externs.
15 * More documentation updates.
16 * Add -Ov option to get verbose information about optimizations.
17 * Undo a braindead change which broke %elif directives.
18 * Makefile updates.
21 0.98.32
22 -------
24 * Fix NASM crashing when %macro directives were left unterminated.
25 * Lots of documentation updates.
26 * Complete rewrite of the PostScript/PDF documentation generator.
27 * The MS Visual C++ Makefile was updated and corrected.
28 * Recognize .rodata as a standard section name in ELF.
29 * Fix some obsolete Perl4-isms in Perl scripts.
30 * Fix configure.in to work with autoconf 2.5x.
31 * Fix a couple of "make cleaner" misses.
32 * Make the normal "./configure && make" work with Cygwin.
35 0.98.31
36 -------
38 * Correctly build in a separate object directory again.
39 * Derive all references to the version number from the version file.
40 * New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
41 * Lots of Makefile updates and bug fixes.
42 * New %ifmacro directive to test for multiline macros.
43 * Documentation updates.
44 * Fixes for 16-bit OBJ format output.
45 * Changed the NASM environment variable to NASMENV.
48 0.98.30
49 -------
51 * Changed doc files a lot: completely removed old READMExx and
52   Wishlist files, incorporating all information in CHANGES and TODO.
53 * I waited a long time to rename zoutieee.c to (original) outieee.c
54 * moved all output modules to output/ subdirectory.
55 * Added 'make strip' target to strip debug info from nasm & ndisasm.
56 * Added INSTALL file with installation instructions.
57 * Added -v option description to nasm man.
58 * Added dist makefile target to produce source distributions.
59 * 16-bit support for ELF output format (GNU extension, but useful.)
62 0.98.28
63 -------
65 * Fastcooked this for Debian's Woody release:
66 Frank applied the INCBIN bug patch to 0.98.25alt and called
67 it 0.98.28 to not confuse poor little apt-get.
70 0.98.26
71 -------
73 * Reorganised files even better from 0.98.25alt
76 0.98.25alt
77 ----------
79 * Prettified the source tree. Moved files to more
80 reasonable places.
81 * Added findleak.pl script to misc/ directory.
82 * FIXME: Frank, document this please.
85 0.98.25
86 -------
88 * FIXME: Frank, document this please.
91 0.98.24p1
92 ---------
94 * FIXME: Frank, document this please.
97 0.98.24
98 -------
100 * FIXME: Frank, document this please.
103 0.98.23
104 -------
106 * FIXME: Frank, document this please.
109 0.98.22
110 -------
112 * FIXME: Frank, document this please.
115 0.98.21
116 -------
118 * FIXME: Frank, document this please.
121 0.98.20
122 -------
124 * FIXME: Frank, document this please.
127 0.98.19
128 -------
130 * FIXME: Frank, document this please.
133 0.98.18
134 -------
136 * FIXME: Frank, document this please.
139 0.98.17
140 -------
142 * FIXME: Frank, document this please.
145 0.98.16
146 -------
148 * FIXME: Frank, document this please.
151 0.98.14
152 -------
154 * FIXME: Frank, document this please.
157 0.98.12
158 -------
160 * FIXME: Frank, document this please.
163 0.98.09
164 -------
166 * FIXME: Frank, document this please.
169 0.98.08
170 -------
172 * FIXME: Frank, document this please.
175 0.98.09b with John Coffman patches released 28-Oct-2001
176 -------------------------------------------------------
178 Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
180 * More closely compatible with 0.98 when -O0 is implied
181 or specified.  Not strictly identical, since backward 
182 branches in range of short offsets are recognized, and signed
183 byte values with no explicit size specification will be
184 assembled as a single byte.
186 * More forgiving with the PUSH instruction.  0.98 requires
187 a size to be specified always.  0.98.09b will imply the size
188 from the current BITS setting (16 or 32).
190 * Changed definition of the optimization flag:
192         -O0     strict two-pass assembly, JMP and Jcc are
193                 handled more like 0.98, except that back-
194                 ward JMPs are short, if possible.
196         -O1     strict two-pass assembly, but forward
197                 branches are assembled with code guaranteed
198                 to reach; may produce larger code than
199                 -O0, but will produce successful assembly
200                 more often if branch offset sizes are not
201                 specified.
203         -O2     multi-pass optimization, minimize branch
204                 offsets; also will minimize signed immed-
205                 iate bytes, overriding size specification.
207         -O3     like -O2, but more passes taken, if needed
210 0.98.07 released 01/28/01
211 -------------------------
213 * fbk - added Stepane Denis' SSE2 instructions to a *working*
214         version of the code - some earlier versions were based on
215         broken code - sorry 'bout that. version "0.98.07"
218 01/28/01
219 --------
221 * fbk - cosmetic modifications to nasm.c, nasm.h,
222         AUTHORS, MODIFIED
225 0.98.06f released 01/18/01
226 --------------------------
228 * fbk - "metalbrain"s jecxz bug fix in insns.dat
229         - alter nasmdoc.src to match - version "0.98.06f"
232 0.98.06e released 01/09/01
233 --------------------------
235 * fbk - removed the "outforms.h" file - it appears to be
236         someone's old backup of "outform.h". version "0.98.06e" 
239 01/09/01
240 --------
242 * fbk - finally added the fix for the "multiple %includes bug",
243         known since 7/27/99 - reported originally (?) and sent to
244         us by Austin Lunnen - he reports that John Fine had a fix
245         within the day. Here it is...
247 * Nelson Rush resigns from the group. Big thanks to Nelson for
248   his leadership and enthusiasm in getting these changes
249   incorporated into Nasm!
251 * fbk - [list +], [list -] directives - ineptly implemented, should
252         be re-written or removed, perhaps.
254 * Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
255                        as well - testing might be desirable...
258 08/07/00
259 --------
261 * James Seter - -postfix, -prefix command line switches.
262 * Yuri Zaporogets - rdoff utility changes.
265 0.98p1
266 ------
268 * GAS-like palign (Panos Minos)
269 * FIXME: Frank, fill this in with details
272 0.98bf (bug-fixed, aka brain-fuck)
273 ----------------------------------
275 * FIXME: Frank, fill this in
278 0.98.03 with John Coffman's changes released 27-Jul-2000
279 --------------------------------------------------------
281 * Added signed byte optimizations for the 0x81/0x83 class
282 of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
283 when used as 'ADD reg16,imm' or 'ADD reg32,imm.'  Also
284 optimization of signed byte form of 'PUSH imm' and 'IMUL
285 reg,imm'/'IMUL reg,reg,imm.'  No size specification is needed.
287 * Added multi-pass JMP and Jcc offset optimization.  Offsets
288 on forward references will preferentially use the short form,
289 without the need to code a specific size (short or near) for
290 the branch.  Added instructions for 'Jcc label' to use the
291 form 'Jnotcc $+3/JMP label', in cases where a short offset
292 is out of bounds.  If compiling for a 386 or higher CPU, then
293 the 386 form of Jcc will be used instead.
295 This feature is controlled by a new command-line switch: "O",
296 (upper case letter O).  "-O0" reverts the assembler to no
297 extra optimization passes, "-O1" allows up to 5 extra passes,
298 and "-O2"(default), allows up to 10 extra optimization passes.
300 * Added a new directive:  'cpu XXX', where XXX is any of: 
301 8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
302 Katmai.  All are case insensitive.  All instructions will
303 be selected only if they apply to the selected cpu or lower.
304 Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
306 * Added to 'standard.mac', the "use16" and "use32" forms of
307 the "bits 16/32" directive. This is nothing new, just conforms
308 to a lot of other assemblers. (minor)
310 * Changed label allocation from 320/32 (10000 labels @ 200K+) 
311 to 32/37 (1000 labels); makes running under DOS much easier.
312 Since additional label space is allocated dynamically, this
313 should have no effect on large programs with lots of labels.
314 The 37 is a prime, believed to be better for hashing. (minor)
316 * Integrated patchfile 0.98-0.98.01.  I call this version
317 0.98.03, for historical reasons:  0.98.02 was trashed.
319 --John Coffman <johninsd@san.rr.com>               27-Jul-2000
322 Kendall Bennett's SciTech MGL changes
323 -------------------------------------
324 Note that you must define "TASM_COMPAT" at compile-time
325 to get the Tasm Ideal Mode compatibility.
327 All changes can be compiled in and out using the TASM_COMPAT macros,
328 and when compiled without TASM_COMPAT defined we get the exact same
329 binary as the unmodified 0.98 sources.
331 standard.mac, macros.c:
332  . Added macros to ignore TASM directives before first include
334 nasm.h:
335  . Added extern declaration for tasm_compatible_mode
337 nasm.c:
338  . Added global variable tasm_compatible_mode
339  . Added command line switch for TASM compatible mode (-t)
340  . Changed version command line to reflect when compiled with TASM additions
341  . Added response file processing to allow all arguments on a single
342    line (response file is @resp rather than -@resp for NASM format).
344 labels.c:
345  . Changes islocal() macro to support TASM style @@local labels.
346  . Added islocalchar() macro to support TASM style @@local labels.
348 parser.c:
349  . Added support for TASM style memory references (ie: mov [DWORD eax],10
350    rather than the NASM style mov DWORD [eax],10).
352 preproc.c:
353  . Added new directives, %arg, %local, %stacksize to directives table
354  . Added support for TASM style directives without a leading % symbol.
356 Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
358 * A new keyword %xdefine and its case-insensitive counterpart %ixdefine.
359     They work almost the same way as %define and %idefine but expand
360     the definition immediately, not on the invocation. Something like a cross
361     between %define and %assign. The "x" suffix stands for "eXpand", so
362     "xdefine" can be deciphered as "expand-and-define". Thus you can do
363     things like this:
365         %assign ofs     0
366         
367         %macro  arg     1
368                 %xdefine %1 dword [esp+ofs]
369                 %assign ofs ofs+4
370         %endmacro
372 * Changed the place where the expansion of %$name macros are expanded.
373     Now they are converted into ..@ctxnum.name form when detokenizing, so
374     there are no quirks as before when using %$name arguments to macros,
375     in macros etc. For example:
377         %macro  abc     1
378                 %define %1 hello
379         %endm
381         abc     %$here
382         %$here
384     Now last line will be expanded into "hello" as expected. This also allows
385     for lots of goodies, a good example are extended "proc" macros included
386     in this archive.
388 * Added a check for "cstk" in smacro_defined() before calling get_ctx() -
389     this allows for things like:
391         %ifdef %$abc
392         %endif
394     to work without warnings even in no context.
396 * Added a check for "cstk" in %if*ctx and %elif*ctx directives -
397     this allows to use %ifctx without excessive warnings. If there is
398     no active context, %ifctx goes through "false" branch.
400 * Removed "user error: " prefix with %error directive: it just clobbers the
401     output and has absolutely no functionality. Besides, this allows to write
402     macros that does not differ from built-in functions in any way.
404 * Added expansion of string that is output by %error directive. Now you
405     can do things like:
407         %define hello(x) Hello, x!
409         %define %$name andy
410         %error "hello(%$name)"
412     Same happened with %include directive.
414 * Now all directives that expect an identifier will try to expand and
415     concatenate everything without whitespaces in between before usage.
416     For example, with "unfixed" nasm the commands
418         %define %$abc hello
419         %define __%$abc goodbye
420         __%$abc
422     would produce "incorrect" output: last line will expand to
424         hello goodbyehello
426     Not quite what you expected, eh? :-) The answer is that preprocessor
427     treats the %define construct as if it would be
429         %define __ %$abc goodbye
431     (note the white space between __ and %$abc). After my "fix" it
432     will "correctly" expand into
434         goodbye
436     as expected. Note that I use quotes around words "correct", "incorrect"
437     etc because this is rather a feature not a bug; however current behaviour
438     is more logical (and allows more advanced macro usage :-).
440     Same change was applied to:
441         %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine,
442         %assign,%iassign,%undef
444 * A new directive [WARNING {+|-}warning-id] have been added. It works only
445     if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
447 * A new warning type: macro-selfref. By default this warning is disabled;
448     when enabled NASM warns when a macro self-references itself; for example
449     the following source:
451         [WARNING macro-selfref]
453         %macro          push    1-*
454                 %rep    %0
455                         push    %1
456                         %rotate 1
457                 %endrep
458         %endmacro
460                         push    eax,ebx,ecx
462     will produce a warning, but if we remove the first line we won't see it
463     anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
464     eats such constructs without warnings at all).
466 * Added a "error" routine to preprocessor which always will set ERR_PASS1
467     bit in severity_code. This removes annoying repeated errors on first
468     and second passes from preprocessor.
470 * Added the %+ operator in single-line macros for concatenating two
471     identifiers. Usage example:
473         %define _myfunc _otherfunc
474         %define cextern(x) _ %+ x
475         cextern (myfunc)
477     After first expansion, third line will become "_myfunc". After this
478     expansion is performed again so it becomes "_otherunc".
480 * Now if preprocessor is in a non-emmitting state, no warning or error
481     will be emmitted. Example:
483         %if 1
484                 mov     eax,ebx
485         %else
486                 put anything you want between these two brackets,
487                 even macro-parameter references %1 or local labels %$zz
488                 or macro-local labels %%zz - no warning will be emmitted.
489         %endif
491 * Context-local variables on expansion as a last resort are looked up
492     in outer contexts. For example, the following piece:
494         %push   outer
495         %define %$a [esp]
497                 %push   inner
498                 %$a
499                 %pop
500         %pop
502     will expand correctly the fourth line to [esp]; if we'll define another
503     %$a inside the "inner" context, it will take precedence over outer
504     definition. However, this modification has been applied only to
505     expand_smacro and not to smacro_define: as a consequence expansion
506     looks in outer contexts, but %ifdef won't look in outer contexts.
508     This behaviour is needed because we don't want nested contexts to
509     act on already defined local macros. Example:
511         %define %$arg1  [esp+4]
512         test    eax,eax
513         if      nz
514                 mov     eax,%$arg1
515         endif
517     In this example the "if" mmacro enters into the "if" context, so %$arg1
518     is not valid anymore inside "if". Of course it could be worked around
519     by using explicitely %$$arg1 but this is ugly IMHO.
521 * Fixed memory leak in %undef. The origline wasn't freed before
522     exiting on success.
524 * Fixed trap in preprocessor when line expanded to empty set of tokens.
525     This happens, for example, in the following case:
527         #define SOMETHING
528         SOMETHING
531 0.98
532 ----
534 All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
536 * The documentation comment delimiter is \# not #.
537 * Allow EQU definitions to refer to external labels; reported by
538   Pedro Gimeno.
539 * Re-enable support for RDOFF v1; reported by Pedro Gimeno.
540 * Updated License file per OK from Simon and Julian.
543 0.98p9
544 ------
546 * Update documentation (although the instruction set reference will
547   have to wait; I don't want to hold up the 0.98 release for it.)
548 * Verified that the NASM implementation of the PEXTRW and PMOVMSKB
549   instructions is correct.  The encoding differs from what the Intel
550   manuals document, but the Pentium III behaviour matches NASM, not
551   the Intel manuals.
552 * Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
553   Stefan Hoffmeister.
554 * Resurrect the -s option, which was removed when changing the
555   diagnostic output to stdout.
558 0.98p8
559 ------
561 * Fix for "DB" when NASM is running on a bigendian machine.
562 * Invoke insns.pl once for each output script, making Makefile.in
563   legal for "make -j".
564 * Improve the Unix configure-based makefiles to make package
565   creation easier.
566 * Included an RPM .spec file for building RPM (RedHat Package Manager)
567   packages on Linux or Unix systems.
568 * Fix Makefile dependency problems.
569 * Change src/rdsrc.pl to include sectioning information in info
570   output; required for install-info to work.
571 * Updated the RDOFF distribution to version 2 from Jules; minor
572   massaging to make it compile in my environment.
573 * Split doc files that can be built by anyone with a Perl interpreter off
574   into a separate archive.
575 * "Dress rehearsal" release!
578 0.98p7
579 ------
581 * Fixed opcodes with a third byte-sized immediate argument to not
582   complain if given "byte" on the immediate.
583 * Allow %undef to remove single-line macros with arguments.  This
584   matches the behaviour of #undef in the C preprocessor.
585 * Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
586   compatibility with most C compilers and preprocessors.  This allows
587   Makefile options to be shared between cc and nasm, for example.
588 * Minor cleanups.
589 * Went through the list of Katmai instructions and hopefully fixed the
590   (rather few) mistakes in it.
591 * (Hopefully) fixed a number of disassembler bugs related to ambiguous
592   instructions (disambiguated by -p) and SSE instructions with REP.
593 * Fix for bug reported by Mark Junger: "call dword 0x12345678" should
594   work and may add an OSP (affected CALL, JMP, Jcc).
595 * Fix for environments when "stderr" isn't a compile-time constant.
598 0.98p6
599 ------
601 * Took officially over coordination of the 0.98 release; so drop
602   the p3.x notation. Skipped p4 and p5 to avoid confusion with John
603   Fine's J4 and J5 releases.
604 * Update the documentation; however, it still doesn't include
605   documentation for the various new instructions.  I somehow wonder if
606   it makes sense to have an instruction set reference in the assembler
607   manual when Intel et al have PDF versions of their manuals online.
608 * Recognize "idt" or "centaur" for the -p option to ndisasm.
609 * Changed error messages back to stderr where they belong, but add an
610   -E option to redirect them elsewhere (the DOS shell cannot redirect
611   stderr.)
612 * -M option to generate Makefile dependencies (based on code from Alex
613   Verstak.)
614 * %undef preprocessor directive, and -u option, that undefines a
615   single-line macro.
616 * OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
617   Chuck Crayne.
618 * Various minor bugfixes (reported by):
619   - Dangling %s in preproc.c (Martin Junker)
620 * THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS.  I am
621   on a trip and didn't bring the Katmai instruction reference, so I
622   can't work on them right now.
623 * Updated the License file per agreement with Simon and Jules to
624   include a GPL distribution clause.
627 0.98p3.7
628 --------
630 * (Hopefully) fixed the canned Makefiles to include the outrdf2 and
631   zoutieee modules.
632 * Renamed changes.asm to changed.asm.
635 0.98p3.6
636 --------
638 * Fixed a bunch of instructions that were added in 0.98p3.5 which had
639   memory operands, and the address-size prefix was missing from the
640   instruction pattern.
643 0.98p3.5
644 --------
646 * Merged in changes from John S. Fine's 0.98-J5 release.  John's based
647   0.98-J5 on my 0.98p3.3 release; this merges the changes.
648 * Expanded the instructions flag field to a long so we can fit more
649   flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
650   such.
651 * Fix the "PRIV" flag on a bunch of instructions, and create new
652   "PROT" flag for protected-mode-only instructions (orthogonal to if
653   the instruction is privileged!) and new "SMM" flag for SMM-only
654   instructions.
655 * Added AMD-only SYSCALL and SYSRET instructions.
656 * Make SSE actually work, and add new Katmai MMX instructions.
657 * Added a -p (preferred vendor) option to ndisasm so that it can
658   distinguish e.g. Cyrix opcodes also used in SSE.  For example:
660         ndisasm -p cyrix aliased.bin
661         00000000  670F514310        paddsiw mm0,[ebx+0x10]
662         00000005  670F514320        paddsiw mm0,[ebx+0x20]
663         ndisasm -p intel aliased.bin
664         00000000  670F514310        sqrtps xmm0,[ebx+0x10]
665         00000005  670F514320        sqrtps xmm0,[ebx+0x20]
666 * Added a bunch of Cyrix-specific instructions.
669 0.98p3.4
670 --------
672 * Made at least an attempt to modify all the additional Makefiles (in
673   the Mkfiles directory).  I can't test it, but this was the best I
674   could do.
675 * DOS DJGPP+"Opus Make" Makefile from John S. Fine.
676 * changes.asm changes from John S. Fine.
679 0.98p3.3
680 --------
682 * Patch from Conan Brink to allow nesting of %rep directives.
683 * If we're going to allow INT01 as an alias for INT1/ICEBP (one of
684   Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
685   as well.
686 * Updated changes.asm to include the latest changes.
687 * Tried to clean up the <CR>s that had snuck in from a DOS/Windows
688   environment into my Unix environment, and try to make sure than
689   DOS/Windows users get them back.
690 * We would silently generate broken tools if insns.dat wasn't sorted
691   properly.  Change insns.pl so that the order doesn't matter.
692 * Fix bug in insns.pl (introduced by me) which would cause conditional
693   instructions to have an extra "cc" in disassembly, e.g. "jnz"
694   disassembled as "jccnz".
697 0.98p3.2
698 --------
700 * Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
701   http://www.csoft.net/cz/johnfine/
702 * Changed previous "spotless" Makefile target (appropriate for distribution)
703   to "distclean", and added "cleaner" target which is same as "clean"
704   except deletes files generated by Perl scripts; "spotless" is union.
705 * Removed BASIC programs from distribution.  Get a Perl interpreter
706   instead (see below.)
707 * Calling this "pre-release 3.2" rather than "p3-hpa2" because of
708   John's contributions.
709 * Actually link in the IEEE output format (zoutieee.c); fix a bunch of
710   compiler warnings in that file.  Note I don't know what IEEE output
711   is supposed to look like, so these changes were made "blind".
714 0.98p3-hpa
715 ----------
717 * Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
718   buildable version for Unix systems (Makefile.in updates, etc.)
719 * Changed insns.pl to create the instruction tables in nasm.h and
720   names.c, so that a new instruction can be added by adding it *only*
721   to insns.dat.
722 * Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
723   FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
724   guarantee will never be used; one of them is documented as UD2 in
725   Intel documentation, the other one just as "Undefined Opcode" --
726   calling it UD1 seemed to make sense.)
727 * MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
728   characters long.  Now MAX_SYMBOL is derived from insns.dat.
729 * A note on the BASIC programs included: forget them.  insns.bas is
730   already out of date.  Get yourself a Perl interpreter for your
731   platform of choice at:
733         http://www.cpan.org/ports/index.html
736 0.98 pre-release 3
737 -------------------
739 added response file support, improved command line handling, new layout
740 help screen
742 fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
743 related bugs, updated Wishlist; 0.98 Prerelease 3.
746 0.98 pre-release 2
747 -------------------
749 fixed bug in outcoff.c to do with truncating section names longer
750 than 8 characters, referencing beyond end of string; 0.98 pre-release 2
753 0.98 pre-released May 1999
754 --------------------------
756 Fixed a bug whereby STRUC didn't work at all in RDF.
758 Fixed a problem with group specification in PUBDEFs in OBJ.
760 Improved ease of adding new output formats. Contribution due to
761 Fox Cutter.
763 Fixed a bug in relocations in the `bin' format: was showing up when
764 a relocatable reference crossed an 8192-byte boundary in any output
765 section.
767 Fixed a bug in local labels: local-label lookups were inconsistent
768 between passes one and two if an EQU occurred between the definition
769 of a global label and the subsequent use of a local label local to
770 that global.
772 Fixed a seg-fault in the preprocessor (again) which happened when
773 you use a blank line as the first line of a multi-line macro
774 definition and then defined a label on the same line as a call to
775 that macro.
777 Fixed a stale-pointer bug in the handling of the NASM environment
778 variable. Thanks to Thomas McWilliams.
780 ELF had a hard limit on the number of sections which caused
781 segfaults when transgressed. Fixed.
783 Added ability for ndisasm to read from stdin by using `-' as the
784 filename.
786 ndisasm wasn't outputting the TO keyword. Fixed.
788 Fixed error cascade on bogus expression in %if - an error in
789 evaluation was causing the entire %if to be discarded, thus creating
790 trouble later when the %else or %endif was encountered.
792 Forward reference tracking was instruction-granular not operand-
793 granular, which was causing 286-specific code to be generated
794 needlessly on code of the form `shr word [forwardref],1'. Thanks to
795 Jim Hague for sending a patch.
797 All messages now appear on stdout, as sending them to stderr serves
798 no useful purpose other than to make redirection difficult.
800 Fixed the problem with EQUs pointing to an external symbol - this
801 now generates an error message.
803 Allowed multiple size prefixes to an operand, of which only the first
804 is taken into account.
806 Incorporated John Fine's changes, including fixes of a large number
807 of preprocessor bugs, some small problems in OBJ, and a reworking of
808 label handling to define labels before their line is assembled, rather
809 than after.
811 Reformatted a lot of the source code to be more readable. Included
812 'coding.txt' as a guideline for how to format code for contributors.
814 Stopped nested %reps causing a panic - they now cause a slightly more
815 friendly error message instead.
817 Fixed floating point constant problems (patch by Pedro Gimeno)
819 Fixed the return value of insn_size() not being checked for -1, indicating
820 an error.
822 Incorporated 3D now instructions.
824 Fixed the 'mov eax, eax + ebx' bug.
826 Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
828 Incorporated John Fine's command line parsing changes
830 Incorporated David Lindauer's OMF debug support
832 Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
833 specification warning when sizes agree).
835 Released NASM 0.98 Pre-release 1
838 0.97 released December 1997
839 ---------------------------
841 This was entirely a bug-fix release to 0.96, which seems to have got
842 cursed. Silly me.
844 Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
845 fail. Caused by an error in the `MOV EAX,<segment>' support.
847 ndisasm hung at EOF when compiled with lcc on Linux because lcc on
848 Linux somehow breaks feof(). ndisasm now does not rely on feof().
850 A heading in the documentation was missing due to a markup error in
851 the indexing. Fixed.
853 Fixed failure to update all pointers on realloc() within extended-
854 operand code in parser.c. Was causing wrong behaviour and seg faults
855 on lines such as `dd 0.0,0.0,0.0,0.0,...'
857 Fixed a subtle preprocessor bug whereby invoking one multi-line
858 macro on the first line of the expansion of another, when the second
859 had been invoked with a label defined before it, didn't expand the
860 inner macro. 
862 Added internal.doc back in to the distribution archives - it was
863 missing in 0.96 *blush*
865 Fixed bug causing 0.96 to be unable to assemble its own test files,
866 specifically objtest.asm. *blush again*
868 Fixed seg-faults and bogus error messages caused by mismatching
869 %rep and %endrep within multi-line macro definitions.
871 Fixed a problem with buffer overrun in OBJ, which was causing
872 corruption at ends of long PUBDEF records.
874 Separated DOS archives into main-program and documentation to reduce
875 download size.
878 0.96 released November 1997
879 ---------------------------
881 Fixed a bug whereby, if `nasm sourcefile' would cause a filename
882 collision warning and put output into `nasm.out', then `nasm
883 sourcefile -o outputfile' still gave the warning even though the
884 `-o' was honoured.
886 Fixed name pollution under Digital UNIX: one of its header files
887 defined R_SP, which broke the enum in nasm.h.
889 Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
890 two-operand forms; NDISASM didn't recognise the longer register
891 forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
892 flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
893 size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
894 undocumented because the Intel Architecture reference documents
895 them.
897 Fixed a problem with the local-label mechanism, whereby strange
898 types of symbol (EQUs, auto-defined OBJ segment base symbols)
899 interfered with the `previous global label' value and screwed up
900 local labels.
902 Fixed a bug whereby the stub preprocessor didn't communicate with
903 the listing file generator, so that the -a and -l options in
904 conjunction would produce a useless listing file.
906 Merged `os2' object file format back into `obj', after discovering
907 that `obj' _also_ shouldn't have a link pass separator in a module
908 containing a non-trivial MODEND. Flat segments are now declared
909 using the FLAT attribute. `os2' is no longer a valid object format
910 name: use `obj'.
912 Removed the fixed-size temporary storage in the evaluator. Very very
913 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
914 so) should now no longer crash NASM.
916 Fixed a bug involving segfaults on disassembly of MMX instructions,
917 by changing the meaning of one of the operand-type flags in nasm.h.
918 This may cause other apparently unrelated MMX problems; it needs to
919 be tested thoroughly.
921 Fixed some buffer overrun problems with large OBJ output files.
922 Thanks to DJ Delorie for the bug report and fix.
924 Made preprocess-only mode actually listen to the %line markers as it
925 prints them, so that it can report errors more sanely.
927 Re-designed the evaluator to keep more sensible track of expressions
928 involving forward references: can now cope with previously-nightmare
929 situations such as
930    mov ax,foo | bar
931    foo equ 1
932    bar equ 2
934 Added the ALIGN and ALIGNB standard macros.
936 Added PIC support in ELF: use of WRT to obtain the four extra
937 relocation types needed.
939 Added the ability for output file formats to define their own
940 extensions to the GLOBAL, COMMON and EXTERN directives.
942 Implemented common-variable alignment, and global-symbol type and
943 size declarations, in ELF.
945 Implemented NEAR and FAR keywords for common variables, plus
946 far-common element size specification, in OBJ.
948 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
949 default WRT specification (either a segment or a group).
951 Transformed the Unix NASM archive into an auto-configuring package.
953 Added a sanity-check for people applying SEG to things which are
954 already segment bases: this previously went unnoticed by the SEG
955 processing and caused OBJ-driver panics later.
957 Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
958 type references: OBJ doesn't directly support dword-size segment
959 base fixups, but as long as the low two bytes of the constant term
960 are zero, a word-size fixup can be generated instead and it will
961 work.
963 Added the ability to specify sections' alignment requirements in
964 Win32 object files and pure binary files.
966 Added preprocess-time expression evaluation: the %assign (and
967 %iassign) directive and the bare %if (and %elif) conditional. Added
968 relational operators to the evaluator, for use only in %if
969 constructs: the standard relationals = < > <= >= <> (and C-like
970 synonyms == and !=) plus low-precedence logical operators &&, ^^ and
973 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
975 Added the __FILE__ and __LINE__ standard macros.
977 Added a sanity check for number constants being greater than
978 0xFFFFFFFF. The warning can be disabled.
980 Added the %0 token whereby a variadic multi-line macro can tell how
981 many parameters it's been given in a specific invocation.
983 Added %rotate, allowing multi-line macro parameters to be cycled.
985 Added the `*' option for the maximum parameter count on multi-line
986 macros, allowing them to take arbitrarily many parameters.
988 Added the ability for the user-level forms of EXTERN, GLOBAL and
989 COMMON to take more than one argument.
991 Added the IMPORT and EXPORT directives in OBJ format, to deal with
992 Windows DLLs.
994 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
995 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
997 Added the ability to distinguish SHL AX,1 (the 8086 version) from
998 SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
999 be 1).
1001 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
1002 with PIC shared library features.
1004 Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
1005 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
1006 otherwise accepted standard. The previous behaviour, though it was a
1007 deliberate feature, was a deliberate feature based on a
1008 misunderstanding. Apologies for the inconvenience.
1010 Improved the flexibility of ABSOLUTE: you can now give it an
1011 expression rather than being restricted to a constant, and it can
1012 take relocatable arguments as well.
1014 Added the ability for a variable to be declared as EXTERN multiple
1015 times, and the subsequent definitions are just ignored.
1017 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
1018 alone on a line (without a following instruction).
1020 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
1021 and COMMON are valid identifiers.
1023 Added misc/exebin.mac to allow direct generation of .EXE files by
1024 hacking up an EXE header using DB and DW; also added test/binexe.asm
1025 to demonstrate the use of this. Thanks to Yann Guidon for
1026 contributing the EXE header code.
1028 ndisasm forgot to check whether the input file had been successfully
1029 opened. Now it does. Doh!
1031 Added the Cyrix extensions to the MMX instruction set.
1033 Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
1034 assembled differently. This is important since [ESI+EBP] and
1035 [EBP+ESI] have different default base segment registers.
1037 Added support for the PharLap OMF extension for 4096-byte segment
1038 alignment.
1041 0.95 released July 1997
1042 -----------------------
1044 Fixed yet another ELF bug. This one manifested if the user relied on
1045 the default segment, and attempted to define global symbols without
1046 first explicitly declaring the target segment.
1048 Added makefiles (for NASM and the RDF tools) to build Win32 console
1049 apps under Symantec C++. Donated by Mark Junker.
1051 Added `macros.bas' and `insns.bas', QBasic versions of the Perl
1052 scripts that convert `standard.mac' to `macros.c' and convert
1053 `insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
1054 Junker.
1056 Changed the diassembled forms of the conditional instructions so
1057 that JB is now emitted as JC, and other similar changes. Suggested
1058 list by Ulrich Doewich.
1060 Added `@' to the list of valid characters to begin an identifier
1061 with.
1063 Documentary changes, notably the addition of the `Common Problems'
1064 section in nasm.doc.
1066 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
1068 Fixed a bug in perm_copy() in labels.c which was causing exceptions
1069 in cleanup_labels() on some systems.
1071 Positivity sanity check in TIMES argument changed from a warning to
1072 an error following a further complaint.
1074 Changed the acceptable limits on byte and word operands to allow
1075 things like `~10111001b' to work.
1077 Fixed a major problem in the preprocessor which caused seg-faults if
1078 macro definitions contained blank lines or comment-only lines.
1080 Fixed inadequate error checking on the commas separating the
1081 arguments to `db', `dw' etc.
1083 Fixed a crippling bug in the handling of macros with operand counts
1084 defined with a `+' modifier.
1086 Fixed a bug whereby object file formats which stored the input file
1087 name in the output file (such as OBJ and COFF) weren't doing so
1088 correctly when the output file name was specified on the command
1089 line.
1091 Removed [INC] and [INCLUDE] support for good, since they were
1092 obsolete anyway.
1094 Fixed a bug in OBJ which caused all fixups to be output in 16-bit
1095 (old-format) FIXUPP records, rather than putting the 32-bit ones in
1096 FIXUPP32 (new-format) records.
1098 Added, tentatively, OS/2 object file support (as a minor variant on
1099 OBJ).
1101 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
1103 Removed a spurious second fclose() on the output file.
1105 Added the `-s' command line option to redirect all messages which
1106 would go to stderr (errors, help text) to stdout instead.
1108 Added the `-w' command line option to selectively suppress some
1109 classes of assembly warning messages.
1111 Added the `-p' pre-include and `-d' pre-define command-line options.
1113 Added an include file search path: the `-i' command line option.
1115 Fixed a silly little preprocessor bug whereby starting a line with a
1116 `%!' environment-variable reference caused an `unknown directive'
1117 error.
1119 Added the long-awaited listing file support: the `-l' command line
1120 option.
1122 Fixed a problem with OBJ format whereby, in the absence of any
1123 explicit segment definition, non-global symbols declared in the
1124 implicit default segment generated spurious EXTDEF records in the
1125 output.
1127 Added the NASM environment variable.
1129 From this version forward, Win32 console-mode binaries will be
1130 included in the DOS distribution in addition to the 16-bit binaries.
1131 Added Makefile.vc for this purpose.
1133 Added `return 0;' to test/objlink.c to prevent compiler warnings.
1135 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
1137 Added an alternative memory-reference syntax in which prefixing an
1138 operand with `&' is equivalent to enclosing it in square brackets,
1139 at the request of Fox Cutter.
1141 Errors in pass two now cause the program to return a non-zero error
1142 code, which they didn't before.
1144 Fixed the single-line macro cycle detection, which didn't work at
1145 all on macros with no parameters (caused an infinite loop). Also
1146 changed the behaviour of single-line macro cycle detection to work
1147 like cpp, so that macros like `extrn' as given in the documentation
1148 can be implemented.
1150 Fixed the implementation of WRT, which was too restrictive in that
1151 you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
1152 a relocatable reference.
1155 0.94 released April 1997
1156 ------------------------
1158 Major item: added the macro processor.
1160 Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
1161 reorganised CMPXCHG instruction into early-486 and Pentium forms.
1162 Thanks to Thobias Jones for the information.
1164 Fixed two more stupid bugs in ELF, which were causing `ld' to
1165 continue to seg-fault in a lot of non-trivial cases.
1167 Fixed a seg-fault in the label manager.
1169 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
1170 the only option for BCD loads/stores in any case.
1172 Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
1173 anyone bothers to provide it. Previously they complained unless no
1174 keyword at all was present.
1176 Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
1177 vestige of a bug that I thought had been fixed in 0.92. This was
1178 fixed, hopefully for good this time...
1180 Another minor phase error (insofar as a phase error can _ever_ be
1181 minor) fixed, this one occurring in code of the form
1182    rol ax,forward_reference
1183    forward_reference equ 1
1185 The number supplied to TIMES is now sanity-checked for positivity,
1186 and also may be greater than 64K (which previously didn't work on
1187 16-bit systems).
1189 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
1191 Added the INCBIN pseudo-opcode.
1193 Due to the advent of the preprocessor, the [INCLUDE] and [INC]
1194 directives have become obsolete. They are still supported in this
1195 version, with a warning, but won't be in the next.
1197 Fixed a bug in OBJ format, which caused incorrect object records to
1198 be output when absolute labels were made global.
1200 Updates to RDOFF subdirectory, and changes to outrdf.c.
1203 0.93 released January 1997
1204 --------------------------
1206 This release went out in a great hurry after semi-crippling bugs
1207 were found in 0.92.
1209 Really _did_ fix the stack overflows this time. *blush*
1211 Had problems with EA instruction sizes changing between passes, when
1212 an offset contained a forward reference and so 4 bytes were
1213 allocated for the offset in pass one; by pass two the symbol had
1214 been defined and happened to be a small absolute value, so only 1
1215 byte got allocated, causing instruction size mismatch between passes
1216 and hence incorrect address calculations. Fixed.
1218 Stupid bug in the revised ELF section generation fixed (associated
1219 string-table section for .symtab was hard-coded as 7, even when this
1220 didn't fit with the real section table). Was causing `ld' to
1221 seg-fault under Linux.
1223 Included a new Borland C makefile, Makefile.bc2, donated by Fox
1224 Cutter <lmb@comtch.iea.com>.
1227 0.92 released January 1997
1228 --------------------------
1230 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
1231 fixed. This also affected the LCC driver.
1233 Fixed a bug regarding 32-bit effective addresses of the form
1234 [other_register+ESP].
1236 Documentary changes, notably documentation of the fact that Borland
1237 Win32 compilers use `obj' rather than `win32' object format.
1239 Fixed the COMENT record in OBJ files, which was formatted
1240 incorrectly.
1242 Fixed a bug causing segfaults in large RDF files.
1244 OBJ format now strips initial periods from segment and group
1245 definitions, in order to avoid complications with the local label
1246 syntax.
1248 Fixed a bug in disassembling far calls and jumps in NDISASM.
1250 Added support for user-defined sections in COFF and ELF files.
1252 Compiled the DOS binaries with a sensible amount of stack, to
1253 prevent stack overflows on any arithmetic expression containing
1254 parentheses.
1256 Fixed a bug in handling of files that do not terminate in a newline.
1259 0.91 released November 1996
1260 ---------------------------
1262 Loads of bug fixes.
1263 Support for RDF added.
1264 Support for DBG debugging format added.
1265 Support for 32-bit extensions to Microsoft OBJ format added.
1266 Revised for Borland C: some variable names changed, makefile added.
1267 LCC support revised to actually work.
1268 JMP/CALL NEAR/FAR notation added.
1269 `a16', `o16', `a32' and `o32' prefixes added.
1270 Range checking on short jumps implemented.
1271 MMX instruction support added.
1272 Negative floating point constant support added.
1273 Memory handling improved to bypass 64K barrier under DOS.
1274 $ prefix to force treatment of reserved words as identifiers added.
1275 Default-size mechanism for object formats added.
1276 Compile-time configurability added.
1277 `#', `@', `~' and `?' are now valid characters in labels.
1278 `-e' and `-k' options in NDISASM added.
1281 0.90 released October 1996
1282 --------------------------
1284 First release version. First support for object file output. Other
1285 changes from previous version (0.3x) too numerous to document.