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