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