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