3 * Added c99 data-type compliance.
4 * Added general x86-64 support.
5 * Added win64 (x86-64 COFF) output format.
6 * Added __BITS__ standard macro which returns current [BITS XX] mode.
7 * fix (???) bug in outobj.c - every 256th "extern" caused Nasm crash.
8 (is this during definition or use, I made over 260 externs with obj
9 and could not duplicate the gripe -Keith Kanios)
14 * fix outas86's .bss handling
15 * "make spotless" no longer deletes config.h.in.
16 * %(el)if(n)idn insensitivity to string quotes difference (#809300).
17 * (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol.
21 * Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
22 mkdep.pl to be able to generate completely pathless dependencies, as
23 required by OpenWatcom wmake (it supports path searches, but not
25 * Fix the STR instruction.
26 * Fix the ELF output format, which was broken under certain
27 circumstances due to the addition of stabs support.
28 * Quick-fix Borland format debug-info for -f obj
29 * Fix for %rep with no arguments (#560568)
30 * Fix concatenation of preprocessor function call (#794686)
31 * Fix long label causes coredump (#677841)
32 * Use autoheader as well as autoconf to keep configure from generating
33 ridiculously long command lines.
34 * Make sure that all of the formats which support debugging output
35 actually will suppress debugging output when -g not specified.
39 * Paths given in "-I" switch searched for "incbin"ed as
40 well as "%include"ed files.
41 * Added stabs debugging for the ELF output format, patch from
43 * Fix output/outbin.c to allow origin > 80000000h.
44 * Make -U switch work.
45 * Fix the use of relative offsets with explicit prefixes, e.g. "a32 loop foo".
46 * Remove "backslash()".
47 * Fix the SMSW and SLDT instructions.
48 * -O2 and -O3 are no longer aliases for -O10 and -O15. If you mean the
49 latter, please say so! :)
53 * Update rdoff - librarian/archiver - common rec - docs!
54 * Fix signed/unsigned problems.
55 * Fix JMP FAR label and CALL FAR label.
56 * Add new multisection support - map files - fix align bug
57 * Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
58 * "Q" or "O" suffixes indicate octal
59 * Support Prescott new instructions (PNI).
60 * Cyrix XSTORE instruction.
64 * Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.)
65 * Fix dependencies and compiler warnings.
66 * Add "const" in a number of places.
67 * Add -X option to specify error reporting format (use -Xvc to
68 integrate with Microsoft Visual Studio.)
69 * Minor changes for code legibility.
70 * Drop use of tmpnam() in rdoff (security fix.)
74 * Correct additional address-size vs. operand-size confusions.
75 * Generate dependencies for all Makefiles automatically.
76 * Add support for unimplemented (but theoretically available)
77 registers such as tr0 and cr5. Segment registers 6 and 7 are called
78 segr6 and segr7 for the operations which they can be represented.
79 * Correct some disassembler bugs related to redundant address-size prefixes.
80 Some work still remains in this area.
81 * Correctly generate an error for things like "SEG eax".
82 * Add the JMPE instruction, enabled by "CPU IA64".
83 * Correct compilation on newer gcc/glibc platforms.
84 * Issue an error on things like "jmp far eax".
90 * New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
91 round out the version-query macros. version.pl now understands
92 X.YYplWW or X.YY.ZZplWW as a version number, equivalent to
93 X.YY.ZZ.WW (or X.YY.0.WW, as appropriate).
94 * New keyword "strict" to disable the optimization of specific
96 * Fix the handing of size overrides with JMP instructions
97 (instructions such as "jmp dword foo".)
98 * Fix the handling of "ABSOLUTE label", where "label" points into a
100 * Fix OBJ output format with lots of externs.
101 * More documentation updates.
102 * Add -Ov option to get verbose information about optimizations.
103 * Undo a braindead change which broke %elif directives.
110 * Fix NASM crashing when %macro directives were left unterminated.
111 * Lots of documentation updates.
112 * Complete rewrite of the PostScript/PDF documentation generator.
113 * The MS Visual C++ Makefile was updated and corrected.
114 * Recognize .rodata as a standard section name in ELF.
115 * Fix some obsolete Perl4-isms in Perl scripts.
116 * Fix configure.in to work with autoconf 2.5x.
117 * Fix a couple of "make cleaner" misses.
118 * Make the normal "./configure && make" work with Cygwin.
124 * Correctly build in a separate object directory again.
125 * Derive all references to the version number from the version file.
126 * New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
127 * Lots of Makefile updates and bug fixes.
128 * New %ifmacro directive to test for multiline macros.
129 * Documentation updates.
130 * Fixes for 16-bit OBJ format output.
131 * Changed the NASM environment variable to NASMENV.
137 * Changed doc files a lot: completely removed old READMExx and
138 Wishlist files, incorporating all information in CHANGES and TODO.
139 * I waited a long time to rename zoutieee.c to (original) outieee.c
140 * moved all output modules to output/ subdirectory.
141 * Added 'make strip' target to strip debug info from nasm & ndisasm.
142 * Added INSTALL file with installation instructions.
143 * Added -v option description to nasm man.
144 * Added dist makefile target to produce source distributions.
145 * 16-bit support for ELF output format (GNU extension, but useful.)
151 * Fastcooked this for Debian's Woody release:
152 Frank applied the INCBIN bug patch to 0.98.25alt and called
153 it 0.98.28 to not confuse poor little apt-get.
159 * Reorganised files even better from 0.98.25alt
165 * Prettified the source tree. Moved files to more reasonable places.
166 * Added findleak.pl script to misc/ directory.
167 * Attempted to fix doc.
172 * Line continuation character '\'
173 * Docs inadvertantly reverted - "dos packaging".
179 * FIXME: Someone, document this please.
185 * Documentation - Ndisasm doc added to Nasm.doc.
191 * Attempted to remove rdoff version1
192 * Lino Mastrodomenico's patches to preproc.c (%$$ bug?).
198 * Update rdoff2 - attempt to remove v1.
204 * Optimization fixes.
210 * Optimization fixes.
216 * H. J. Lu's patch back out.
222 * Added ".rdata" to "-f win32".
228 * H. J. Lu's "bogus elf" patch. (Red Hat problem?)
234 * Fix whitespace before "[section ..." bug.
240 * Fix fixes to memory leaks.
246 * (there was no '.13)
251 * Update optimization (new function of "-O1")
252 * Changes to test/bintest.asm (?).
257 * Optimization changes.
259 * (there was no '.10)
264 * Add multiple sections support to "-f bin".
265 * Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.
266 * Add "-v" as an alias to the "-r" switch.
267 * Remove "#ifdef" from Tasm compatibility options.
268 * Remove redundant size-overrides on "mov ds, ex", etc.
269 * Fixes to SSE2, other insns.dat (?).
270 * Enable uppercase "I" and "P" switches.
271 * Case insinsitive "seg" and "wrt".
272 * Update install.sh (?).
273 * Allocate tokens in blocks.
274 * Improve "invalid effective address" messages.
279 * Add "%strlen" and "%substr" macro operators
280 * Fixed broken c16.mac.
281 * Unterminated string error reported.
282 * Fixed bugs as per 0.98bf
285 0.98.09b with John Coffman patches released 28-Oct-2001
286 -------------------------------------------------------
288 Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
290 * More closely compatible with 0.98 when -O0 is implied
291 or specified. Not strictly identical, since backward
292 branches in range of short offsets are recognized, and signed
293 byte values with no explicit size specification will be
294 assembled as a single byte.
296 * More forgiving with the PUSH instruction. 0.98 requires
297 a size to be specified always. 0.98.09b will imply the size
298 from the current BITS setting (16 or 32).
300 * Changed definition of the optimization flag:
302 -O0 strict two-pass assembly, JMP and Jcc are
303 handled more like 0.98, except that back-
304 ward JMPs are short, if possible.
306 -O1 strict two-pass assembly, but forward
307 branches are assembled with code guaranteed
308 to reach; may produce larger code than
309 -O0, but will produce successful assembly
310 more often if branch offset sizes are not
313 -O2 multi-pass optimization, minimize branch
314 offsets; also will minimize signed immed-
315 iate bytes, overriding size specification.
317 -O3 like -O2, but more passes taken, if needed
320 0.98.07 released 01/28/01
321 -------------------------
323 * Added Stepane Denis' SSE2 instructions to a *working*
324 version of the code - some earlier versions were based on
325 broken code - sorry 'bout that. version "0.98.07"
331 * Cosmetic modifications to nasm.c, nasm.h,
335 0.98.06f released 01/18/01
336 --------------------------
338 * - Add "metalbrain"s jecxz bug fix in insns.dat
339 - alter nasmdoc.src to match - version "0.98.06f"
342 0.98.06e released 01/09/01
343 --------------------------
345 * Removed the "outforms.h" file - it appears to be
346 someone's old backup of "outform.h". version "0.98.06e"
352 * fbk - finally added the fix for the "multiple %includes bug",
353 known since 7/27/99 - reported originally (?) and sent to
354 us by Austin Lunnen - he reports that John Fine had a fix
355 within the day. Here it is...
357 * Nelson Rush resigns from the group. Big thanks to Nelson for
358 his leadership and enthusiasm in getting these changes
359 incorporated into Nasm!
361 * fbk - [list +], [list -] directives - ineptly implemented, should
362 be re-written or removed, perhaps.
364 * Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
365 as well - testing might be desirable...
371 * James Seter - -postfix, -prefix command line switches.
372 * Yuri Zaporogets - rdoff utility changes.
378 * GAS-like palign (Panos Minos)
379 * FIXME: Someone, fill this in with details
383 ----------------------------------
385 * Fixed - elf and aoutb bug - shared libraries
386 - multiple "%include" bug in "-f obj"
388 - unrecognized option bug in ndisasm
390 0.98.03 with John Coffman's changes released 27-Jul-2000
391 --------------------------------------------------------
393 * Added signed byte optimizations for the 0x81/0x83 class
394 of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
395 when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also
396 optimization of signed byte form of 'PUSH imm' and 'IMUL
397 reg,imm'/'IMUL reg,reg,imm.' No size specification is needed.
399 * Added multi-pass JMP and Jcc offset optimization. Offsets
400 on forward references will preferentially use the short form,
401 without the need to code a specific size (short or near) for
402 the branch. Added instructions for 'Jcc label' to use the
403 form 'Jnotcc $+3/JMP label', in cases where a short offset
404 is out of bounds. If compiling for a 386 or higher CPU, then
405 the 386 form of Jcc will be used instead.
407 This feature is controlled by a new command-line switch: "O",
408 (upper case letter O). "-O0" reverts the assembler to no
409 extra optimization passes, "-O1" allows up to 5 extra passes,
410 and "-O2"(default), allows up to 10 extra optimization passes.
412 * Added a new directive: 'cpu XXX', where XXX is any of:
413 8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
414 Katmai. All are case insensitive. All instructions will
415 be selected only if they apply to the selected cpu or lower.
416 Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
418 * Added to 'standard.mac', the "use16" and "use32" forms of
419 the "bits 16/32" directive. This is nothing new, just conforms
420 to a lot of other assemblers. (minor)
422 * Changed label allocation from 320/32 (10000 labels @ 200K+)
423 to 32/37 (1000 labels); makes running under DOS much easier.
424 Since additional label space is allocated dynamically, this
425 should have no effect on large programs with lots of labels.
426 The 37 is a prime, believed to be better for hashing. (minor)
428 * Integrated patchfile 0.98-0.98.01. I call this version
429 0.98.03, for historical reasons: 0.98.02 was trashed.
431 --John Coffman <johninsd@san.rr.com> 27-Jul-2000
434 Kendall Bennett's SciTech MGL changes
435 -------------------------------------
436 Note that you must define "TASM_COMPAT" at compile-time
437 to get the Tasm Ideal Mode compatibility.
439 All changes can be compiled in and out using the TASM_COMPAT macros,
440 and when compiled without TASM_COMPAT defined we get the exact same
441 binary as the unmodified 0.98 sources.
443 standard.mac, macros.c:
444 . Added macros to ignore TASM directives before first include
447 . Added extern declaration for tasm_compatible_mode
450 . Added global variable tasm_compatible_mode
451 . Added command line switch for TASM compatible mode (-t)
452 . Changed version command line to reflect when compiled with TASM additions
453 . Added response file processing to allow all arguments on a single
454 line (response file is @resp rather than -@resp for NASM format).
457 . Changes islocal() macro to support TASM style @@local labels.
458 . Added islocalchar() macro to support TASM style @@local labels.
461 . Added support for TASM style memory references (ie: mov [DWORD eax],10
462 rather than the NASM style mov DWORD [eax],10).
465 . Added new directives, %arg, %local, %stacksize to directives table
466 . Added support for TASM style directives without a leading % symbol.
468 Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
470 * A new keyword %xdefine and its case-insensitive counterpart %ixdefine.
471 They work almost the same way as %define and %idefine but expand
472 the definition immediately, not on the invocation. Something like a cross
473 between %define and %assign. The "x" suffix stands for "eXpand", so
474 "xdefine" can be deciphered as "expand-and-define". Thus you can do
480 %xdefine %1 dword [esp+ofs]
484 * Changed the place where the expansion of %$name macros are expanded.
485 Now they are converted into ..@ctxnum.name form when detokenizing, so
486 there are no quirks as before when using %$name arguments to macros,
487 in macros etc. For example:
496 Now last line will be expanded into "hello" as expected. This also allows
497 for lots of goodies, a good example are extended "proc" macros included
500 * Added a check for "cstk" in smacro_defined() before calling get_ctx() -
501 this allows for things like:
506 to work without warnings even in no context.
508 * Added a check for "cstk" in %if*ctx and %elif*ctx directives -
509 this allows to use %ifctx without excessive warnings. If there is
510 no active context, %ifctx goes through "false" branch.
512 * Removed "user error: " prefix with %error directive: it just clobbers the
513 output and has absolutely no functionality. Besides, this allows to write
514 macros that does not differ from built-in functions in any way.
516 * Added expansion of string that is output by %error directive. Now you
519 %define hello(x) Hello, x!
522 %error "hello(%$name)"
524 Same happened with %include directive.
526 * Now all directives that expect an identifier will try to expand and
527 concatenate everything without whitespaces in between before usage.
528 For example, with "unfixed" nasm the commands
531 %define __%$abc goodbye
534 would produce "incorrect" output: last line will expand to
538 Not quite what you expected, eh? :-) The answer is that preprocessor
539 treats the %define construct as if it would be
541 %define __ %$abc goodbye
543 (note the white space between __ and %$abc). After my "fix" it
544 will "correctly" expand into
548 as expected. Note that I use quotes around words "correct", "incorrect"
549 etc because this is rather a feature not a bug; however current behaviour
550 is more logical (and allows more advanced macro usage :-).
552 Same change was applied to:
553 %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine,
554 %assign,%iassign,%undef
556 * A new directive [WARNING {+|-}warning-id] have been added. It works only
557 if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
559 * A new warning type: macro-selfref. By default this warning is disabled;
560 when enabled NASM warns when a macro self-references itself; for example
561 the following source:
563 [WARNING macro-selfref]
574 will produce a warning, but if we remove the first line we won't see it
575 anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
576 eats such constructs without warnings at all).
578 * Added a "error" routine to preprocessor which always will set ERR_PASS1
579 bit in severity_code. This removes annoying repeated errors on first
580 and second passes from preprocessor.
582 * Added the %+ operator in single-line macros for concatenating two
583 identifiers. Usage example:
585 %define _myfunc _otherfunc
586 %define cextern(x) _ %+ x
589 After first expansion, third line will become "_myfunc". After this
590 expansion is performed again so it becomes "_otherunc".
592 * Now if preprocessor is in a non-emmitting state, no warning or error
593 will be emmitted. Example:
598 put anything you want between these two brackets,
599 even macro-parameter references %1 or local labels %$zz
600 or macro-local labels %%zz - no warning will be emmitted.
603 * Context-local variables on expansion as a last resort are looked up
604 in outer contexts. For example, the following piece:
614 will expand correctly the fourth line to [esp]; if we'll define another
615 %$a inside the "inner" context, it will take precedence over outer
616 definition. However, this modification has been applied only to
617 expand_smacro and not to smacro_define: as a consequence expansion
618 looks in outer contexts, but %ifdef won't look in outer contexts.
620 This behaviour is needed because we don't want nested contexts to
621 act on already defined local macros. Example:
623 %define %$arg1 [esp+4]
629 In this example the "if" mmacro enters into the "if" context, so %$arg1
630 is not valid anymore inside "if". Of course it could be worked around
631 by using explicitely %$$arg1 but this is ugly IMHO.
633 * Fixed memory leak in %undef. The origline wasn't freed before
636 * Fixed trap in preprocessor when line expanded to empty set of tokens.
637 This happens, for example, in the following case:
646 All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
648 * The documentation comment delimiter is \# not #.
649 * Allow EQU definitions to refer to external labels; reported by
651 * Re-enable support for RDOFF v1; reported by Pedro Gimeno.
652 * Updated License file per OK from Simon and Julian.
658 * Update documentation (although the instruction set reference will
659 have to wait; I don't want to hold up the 0.98 release for it.)
660 * Verified that the NASM implementation of the PEXTRW and PMOVMSKB
661 instructions is correct. The encoding differs from what the Intel
662 manuals document, but the Pentium III behaviour matches NASM, not
664 * Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
666 * Resurrect the -s option, which was removed when changing the
667 diagnostic output to stdout.
673 * Fix for "DB" when NASM is running on a bigendian machine.
674 * Invoke insns.pl once for each output script, making Makefile.in
676 * Improve the Unix configure-based makefiles to make package
678 * Included an RPM .spec file for building RPM (RedHat Package Manager)
679 packages on Linux or Unix systems.
680 * Fix Makefile dependency problems.
681 * Change src/rdsrc.pl to include sectioning information in info
682 output; required for install-info to work.
683 * Updated the RDOFF distribution to version 2 from Jules; minor
684 massaging to make it compile in my environment.
685 * Split doc files that can be built by anyone with a Perl interpreter off
686 into a separate archive.
687 * "Dress rehearsal" release!
693 * Fixed opcodes with a third byte-sized immediate argument to not
694 complain if given "byte" on the immediate.
695 * Allow %undef to remove single-line macros with arguments. This
696 matches the behaviour of #undef in the C preprocessor.
697 * Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
698 compatibility with most C compilers and preprocessors. This allows
699 Makefile options to be shared between cc and nasm, for example.
701 * Went through the list of Katmai instructions and hopefully fixed the
702 (rather few) mistakes in it.
703 * (Hopefully) fixed a number of disassembler bugs related to ambiguous
704 instructions (disambiguated by -p) and SSE instructions with REP.
705 * Fix for bug reported by Mark Junger: "call dword 0x12345678" should
706 work and may add an OSP (affected CALL, JMP, Jcc).
707 * Fix for environments when "stderr" isn't a compile-time constant.
713 * Took officially over coordination of the 0.98 release; so drop
714 the p3.x notation. Skipped p4 and p5 to avoid confusion with John
715 Fine's J4 and J5 releases.
716 * Update the documentation; however, it still doesn't include
717 documentation for the various new instructions. I somehow wonder if
718 it makes sense to have an instruction set reference in the assembler
719 manual when Intel et al have PDF versions of their manuals online.
720 * Recognize "idt" or "centaur" for the -p option to ndisasm.
721 * Changed error messages back to stderr where they belong, but add an
722 -E option to redirect them elsewhere (the DOS shell cannot redirect
724 * -M option to generate Makefile dependencies (based on code from Alex
726 * %undef preprocessor directive, and -u option, that undefines a
728 * OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
730 * Various minor bugfixes (reported by):
731 - Dangling %s in preproc.c (Martin Junker)
732 * THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am
733 on a trip and didn't bring the Katmai instruction reference, so I
734 can't work on them right now.
735 * Updated the License file per agreement with Simon and Jules to
736 include a GPL distribution clause.
742 * (Hopefully) fixed the canned Makefiles to include the outrdf2 and
744 * Renamed changes.asm to changed.asm.
750 * Fixed a bunch of instructions that were added in 0.98p3.5 which had
751 memory operands, and the address-size prefix was missing from the
758 * Merged in changes from John S. Fine's 0.98-J5 release. John's based
759 0.98-J5 on my 0.98p3.3 release; this merges the changes.
760 * Expanded the instructions flag field to a long so we can fit more
761 flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
763 * Fix the "PRIV" flag on a bunch of instructions, and create new
764 "PROT" flag for protected-mode-only instructions (orthogonal to if
765 the instruction is privileged!) and new "SMM" flag for SMM-only
767 * Added AMD-only SYSCALL and SYSRET instructions.
768 * Make SSE actually work, and add new Katmai MMX instructions.
769 * Added a -p (preferred vendor) option to ndisasm so that it can
770 distinguish e.g. Cyrix opcodes also used in SSE. For example:
772 ndisasm -p cyrix aliased.bin
773 00000000 670F514310 paddsiw mm0,[ebx+0x10]
774 00000005 670F514320 paddsiw mm0,[ebx+0x20]
775 ndisasm -p intel aliased.bin
776 00000000 670F514310 sqrtps xmm0,[ebx+0x10]
777 00000005 670F514320 sqrtps xmm0,[ebx+0x20]
778 * Added a bunch of Cyrix-specific instructions.
784 * Made at least an attempt to modify all the additional Makefiles (in
785 the Mkfiles directory). I can't test it, but this was the best I
787 * DOS DJGPP+"Opus Make" Makefile from John S. Fine.
788 * changes.asm changes from John S. Fine.
794 * Patch from Conan Brink to allow nesting of %rep directives.
795 * If we're going to allow INT01 as an alias for INT1/ICEBP (one of
796 Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
798 * Updated changes.asm to include the latest changes.
799 * Tried to clean up the <CR>s that had snuck in from a DOS/Windows
800 environment into my Unix environment, and try to make sure than
801 DOS/Windows users get them back.
802 * We would silently generate broken tools if insns.dat wasn't sorted
803 properly. Change insns.pl so that the order doesn't matter.
804 * Fix bug in insns.pl (introduced by me) which would cause conditional
805 instructions to have an extra "cc" in disassembly, e.g. "jnz"
806 disassembled as "jccnz".
812 * Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
813 http://www.csoft.net/cz/johnfine/
814 * Changed previous "spotless" Makefile target (appropriate for distribution)
815 to "distclean", and added "cleaner" target which is same as "clean"
816 except deletes files generated by Perl scripts; "spotless" is union.
817 * Removed BASIC programs from distribution. Get a Perl interpreter
819 * Calling this "pre-release 3.2" rather than "p3-hpa2" because of
820 John's contributions.
821 * Actually link in the IEEE output format (zoutieee.c); fix a bunch of
822 compiler warnings in that file. Note I don't know what IEEE output
823 is supposed to look like, so these changes were made "blind".
829 * Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
830 buildable version for Unix systems (Makefile.in updates, etc.)
831 * Changed insns.pl to create the instruction tables in nasm.h and
832 names.c, so that a new instruction can be added by adding it *only*
834 * Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
835 FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
836 guarantee will never be used; one of them is documented as UD2 in
837 Intel documentation, the other one just as "Undefined Opcode" --
838 calling it UD1 seemed to make sense.)
839 * MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
840 characters long. Now MAX_SYMBOL is derived from insns.dat.
841 * A note on the BASIC programs included: forget them. insns.bas is
842 already out of date. Get yourself a Perl interpreter for your
843 platform of choice at:
845 http://www.cpan.org/ports/index.html
851 added response file support, improved command line handling, new layout
854 fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
855 related bugs, updated Wishlist; 0.98 Prerelease 3.
861 fixed bug in outcoff.c to do with truncating section names longer
862 than 8 characters, referencing beyond end of string; 0.98 pre-release 2
865 0.98 pre-released May 1999
866 --------------------------
868 Fixed a bug whereby STRUC didn't work at all in RDF.
870 Fixed a problem with group specification in PUBDEFs in OBJ.
872 Improved ease of adding new output formats. Contribution due to
875 Fixed a bug in relocations in the `bin' format: was showing up when
876 a relocatable reference crossed an 8192-byte boundary in any output
879 Fixed a bug in local labels: local-label lookups were inconsistent
880 between passes one and two if an EQU occurred between the definition
881 of a global label and the subsequent use of a local label local to
884 Fixed a seg-fault in the preprocessor (again) which happened when
885 you use a blank line as the first line of a multi-line macro
886 definition and then defined a label on the same line as a call to
889 Fixed a stale-pointer bug in the handling of the NASM environment
890 variable. Thanks to Thomas McWilliams.
892 ELF had a hard limit on the number of sections which caused
893 segfaults when transgressed. Fixed.
895 Added ability for ndisasm to read from stdin by using `-' as the
898 ndisasm wasn't outputting the TO keyword. Fixed.
900 Fixed error cascade on bogus expression in %if - an error in
901 evaluation was causing the entire %if to be discarded, thus creating
902 trouble later when the %else or %endif was encountered.
904 Forward reference tracking was instruction-granular not operand-
905 granular, which was causing 286-specific code to be generated
906 needlessly on code of the form `shr word [forwardref],1'. Thanks to
907 Jim Hague for sending a patch.
909 All messages now appear on stdout, as sending them to stderr serves
910 no useful purpose other than to make redirection difficult.
912 Fixed the problem with EQUs pointing to an external symbol - this
913 now generates an error message.
915 Allowed multiple size prefixes to an operand, of which only the first
916 is taken into account.
918 Incorporated John Fine's changes, including fixes of a large number
919 of preprocessor bugs, some small problems in OBJ, and a reworking of
920 label handling to define labels before their line is assembled, rather
923 Reformatted a lot of the source code to be more readable. Included
924 'coding.txt' as a guideline for how to format code for contributors.
926 Stopped nested %reps causing a panic - they now cause a slightly more
927 friendly error message instead.
929 Fixed floating point constant problems (patch by Pedro Gimeno)
931 Fixed the return value of insn_size() not being checked for -1, indicating
934 Incorporated 3D now instructions.
936 Fixed the 'mov eax, eax + ebx' bug.
938 Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
940 Incorporated John Fine's command line parsing changes
942 Incorporated David Lindauer's OMF debug support
944 Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
945 specification warning when sizes agree).
947 Released NASM 0.98 Pre-release 1
950 0.97 released December 1997
951 ---------------------------
953 This was entirely a bug-fix release to 0.96, which seems to have got
956 Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
957 fail. Caused by an error in the `MOV EAX,<segment>' support.
959 ndisasm hung at EOF when compiled with lcc on Linux because lcc on
960 Linux somehow breaks feof(). ndisasm now does not rely on feof().
962 A heading in the documentation was missing due to a markup error in
965 Fixed failure to update all pointers on realloc() within extended-
966 operand code in parser.c. Was causing wrong behaviour and seg faults
967 on lines such as `dd 0.0,0.0,0.0,0.0,...'
969 Fixed a subtle preprocessor bug whereby invoking one multi-line
970 macro on the first line of the expansion of another, when the second
971 had been invoked with a label defined before it, didn't expand the
974 Added internal.doc back in to the distribution archives - it was
975 missing in 0.96 *blush*
977 Fixed bug causing 0.96 to be unable to assemble its own test files,
978 specifically objtest.asm. *blush again*
980 Fixed seg-faults and bogus error messages caused by mismatching
981 %rep and %endrep within multi-line macro definitions.
983 Fixed a problem with buffer overrun in OBJ, which was causing
984 corruption at ends of long PUBDEF records.
986 Separated DOS archives into main-program and documentation to reduce
990 0.96 released November 1997
991 ---------------------------
993 Fixed a bug whereby, if `nasm sourcefile' would cause a filename
994 collision warning and put output into `nasm.out', then `nasm
995 sourcefile -o outputfile' still gave the warning even though the
998 Fixed name pollution under Digital UNIX: one of its header files
999 defined R_SP, which broke the enum in nasm.h.
1001 Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
1002 two-operand forms; NDISASM didn't recognise the longer register
1003 forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
1004 flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
1005 size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
1006 undocumented because the Intel Architecture reference documents
1009 Fixed a problem with the local-label mechanism, whereby strange
1010 types of symbol (EQUs, auto-defined OBJ segment base symbols)
1011 interfered with the `previous global label' value and screwed up
1014 Fixed a bug whereby the stub preprocessor didn't communicate with
1015 the listing file generator, so that the -a and -l options in
1016 conjunction would produce a useless listing file.
1018 Merged `os2' object file format back into `obj', after discovering
1019 that `obj' _also_ shouldn't have a link pass separator in a module
1020 containing a non-trivial MODEND. Flat segments are now declared
1021 using the FLAT attribute. `os2' is no longer a valid object format
1024 Removed the fixed-size temporary storage in the evaluator. Very very
1025 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
1026 so) should now no longer crash NASM.
1028 Fixed a bug involving segfaults on disassembly of MMX instructions,
1029 by changing the meaning of one of the operand-type flags in nasm.h.
1030 This may cause other apparently unrelated MMX problems; it needs to
1031 be tested thoroughly.
1033 Fixed some buffer overrun problems with large OBJ output files.
1034 Thanks to DJ Delorie for the bug report and fix.
1036 Made preprocess-only mode actually listen to the %line markers as it
1037 prints them, so that it can report errors more sanely.
1039 Re-designed the evaluator to keep more sensible track of expressions
1040 involving forward references: can now cope with previously-nightmare
1046 Added the ALIGN and ALIGNB standard macros.
1048 Added PIC support in ELF: use of WRT to obtain the four extra
1049 relocation types needed.
1051 Added the ability for output file formats to define their own
1052 extensions to the GLOBAL, COMMON and EXTERN directives.
1054 Implemented common-variable alignment, and global-symbol type and
1055 size declarations, in ELF.
1057 Implemented NEAR and FAR keywords for common variables, plus
1058 far-common element size specification, in OBJ.
1060 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
1061 default WRT specification (either a segment or a group).
1063 Transformed the Unix NASM archive into an auto-configuring package.
1065 Added a sanity-check for people applying SEG to things which are
1066 already segment bases: this previously went unnoticed by the SEG
1067 processing and caused OBJ-driver panics later.
1069 Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
1070 type references: OBJ doesn't directly support dword-size segment
1071 base fixups, but as long as the low two bytes of the constant term
1072 are zero, a word-size fixup can be generated instead and it will
1075 Added the ability to specify sections' alignment requirements in
1076 Win32 object files and pure binary files.
1078 Added preprocess-time expression evaluation: the %assign (and
1079 %iassign) directive and the bare %if (and %elif) conditional. Added
1080 relational operators to the evaluator, for use only in %if
1081 constructs: the standard relationals = < > <= >= <> (and C-like
1082 synonyms == and !=) plus low-precedence logical operators &&, ^^ and
1085 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
1087 Added the __FILE__ and __LINE__ standard macros.
1089 Added a sanity check for number constants being greater than
1090 0xFFFFFFFF. The warning can be disabled.
1092 Added the %0 token whereby a variadic multi-line macro can tell how
1093 many parameters it's been given in a specific invocation.
1095 Added %rotate, allowing multi-line macro parameters to be cycled.
1097 Added the `*' option for the maximum parameter count on multi-line
1098 macros, allowing them to take arbitrarily many parameters.
1100 Added the ability for the user-level forms of EXTERN, GLOBAL and
1101 COMMON to take more than one argument.
1103 Added the IMPORT and EXPORT directives in OBJ format, to deal with
1106 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
1107 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
1109 Added the ability to distinguish SHL AX,1 (the 8086 version) from
1110 SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
1113 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
1114 with PIC shared library features.
1116 Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
1117 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
1118 otherwise accepted standard. The previous behaviour, though it was a
1119 deliberate feature, was a deliberate feature based on a
1120 misunderstanding. Apologies for the inconvenience.
1122 Improved the flexibility of ABSOLUTE: you can now give it an
1123 expression rather than being restricted to a constant, and it can
1124 take relocatable arguments as well.
1126 Added the ability for a variable to be declared as EXTERN multiple
1127 times, and the subsequent definitions are just ignored.
1129 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
1130 alone on a line (without a following instruction).
1132 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
1133 and COMMON are valid identifiers.
1135 Added misc/exebin.mac to allow direct generation of .EXE files by
1136 hacking up an EXE header using DB and DW; also added test/binexe.asm
1137 to demonstrate the use of this. Thanks to Yann Guidon for
1138 contributing the EXE header code.
1140 ndisasm forgot to check whether the input file had been successfully
1141 opened. Now it does. Doh!
1143 Added the Cyrix extensions to the MMX instruction set.
1145 Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
1146 assembled differently. This is important since [ESI+EBP] and
1147 [EBP+ESI] have different default base segment registers.
1149 Added support for the PharLap OMF extension for 4096-byte segment
1153 0.95 released July 1997
1154 -----------------------
1156 Fixed yet another ELF bug. This one manifested if the user relied on
1157 the default segment, and attempted to define global symbols without
1158 first explicitly declaring the target segment.
1160 Added makefiles (for NASM and the RDF tools) to build Win32 console
1161 apps under Symantec C++. Donated by Mark Junker.
1163 Added `macros.bas' and `insns.bas', QBasic versions of the Perl
1164 scripts that convert `standard.mac' to `macros.c' and convert
1165 `insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
1168 Changed the diassembled forms of the conditional instructions so
1169 that JB is now emitted as JC, and other similar changes. Suggested
1170 list by Ulrich Doewich.
1172 Added `@' to the list of valid characters to begin an identifier
1175 Documentary changes, notably the addition of the `Common Problems'
1176 section in nasm.doc.
1178 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
1180 Fixed a bug in perm_copy() in labels.c which was causing exceptions
1181 in cleanup_labels() on some systems.
1183 Positivity sanity check in TIMES argument changed from a warning to
1184 an error following a further complaint.
1186 Changed the acceptable limits on byte and word operands to allow
1187 things like `~10111001b' to work.
1189 Fixed a major problem in the preprocessor which caused seg-faults if
1190 macro definitions contained blank lines or comment-only lines.
1192 Fixed inadequate error checking on the commas separating the
1193 arguments to `db', `dw' etc.
1195 Fixed a crippling bug in the handling of macros with operand counts
1196 defined with a `+' modifier.
1198 Fixed a bug whereby object file formats which stored the input file
1199 name in the output file (such as OBJ and COFF) weren't doing so
1200 correctly when the output file name was specified on the command
1203 Removed [INC] and [INCLUDE] support for good, since they were
1206 Fixed a bug in OBJ which caused all fixups to be output in 16-bit
1207 (old-format) FIXUPP records, rather than putting the 32-bit ones in
1208 FIXUPP32 (new-format) records.
1210 Added, tentatively, OS/2 object file support (as a minor variant on
1213 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
1215 Removed a spurious second fclose() on the output file.
1217 Added the `-s' command line option to redirect all messages which
1218 would go to stderr (errors, help text) to stdout instead.
1220 Added the `-w' command line option to selectively suppress some
1221 classes of assembly warning messages.
1223 Added the `-p' pre-include and `-d' pre-define command-line options.
1225 Added an include file search path: the `-i' command line option.
1227 Fixed a silly little preprocessor bug whereby starting a line with a
1228 `%!' environment-variable reference caused an `unknown directive'
1231 Added the long-awaited listing file support: the `-l' command line
1234 Fixed a problem with OBJ format whereby, in the absence of any
1235 explicit segment definition, non-global symbols declared in the
1236 implicit default segment generated spurious EXTDEF records in the
1239 Added the NASM environment variable.
1241 From this version forward, Win32 console-mode binaries will be
1242 included in the DOS distribution in addition to the 16-bit binaries.
1243 Added Makefile.vc for this purpose.
1245 Added `return 0;' to test/objlink.c to prevent compiler warnings.
1247 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
1249 Added an alternative memory-reference syntax in which prefixing an
1250 operand with `&' is equivalent to enclosing it in square brackets,
1251 at the request of Fox Cutter.
1253 Errors in pass two now cause the program to return a non-zero error
1254 code, which they didn't before.
1256 Fixed the single-line macro cycle detection, which didn't work at
1257 all on macros with no parameters (caused an infinite loop). Also
1258 changed the behaviour of single-line macro cycle detection to work
1259 like cpp, so that macros like `extrn' as given in the documentation
1262 Fixed the implementation of WRT, which was too restrictive in that
1263 you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
1264 a relocatable reference.
1267 0.94 released April 1997
1268 ------------------------
1270 Major item: added the macro processor.
1272 Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
1273 reorganised CMPXCHG instruction into early-486 and Pentium forms.
1274 Thanks to Thobias Jones for the information.
1276 Fixed two more stupid bugs in ELF, which were causing `ld' to
1277 continue to seg-fault in a lot of non-trivial cases.
1279 Fixed a seg-fault in the label manager.
1281 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
1282 the only option for BCD loads/stores in any case.
1284 Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
1285 anyone bothers to provide it. Previously they complained unless no
1286 keyword at all was present.
1288 Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
1289 vestige of a bug that I thought had been fixed in 0.92. This was
1290 fixed, hopefully for good this time...
1292 Another minor phase error (insofar as a phase error can _ever_ be
1293 minor) fixed, this one occurring in code of the form
1294 rol ax,forward_reference
1295 forward_reference equ 1
1297 The number supplied to TIMES is now sanity-checked for positivity,
1298 and also may be greater than 64K (which previously didn't work on
1301 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
1303 Added the INCBIN pseudo-opcode.
1305 Due to the advent of the preprocessor, the [INCLUDE] and [INC]
1306 directives have become obsolete. They are still supported in this
1307 version, with a warning, but won't be in the next.
1309 Fixed a bug in OBJ format, which caused incorrect object records to
1310 be output when absolute labels were made global.
1312 Updates to RDOFF subdirectory, and changes to outrdf.c.
1315 0.93 released January 1997
1316 --------------------------
1318 This release went out in a great hurry after semi-crippling bugs
1321 Really _did_ fix the stack overflows this time. *blush*
1323 Had problems with EA instruction sizes changing between passes, when
1324 an offset contained a forward reference and so 4 bytes were
1325 allocated for the offset in pass one; by pass two the symbol had
1326 been defined and happened to be a small absolute value, so only 1
1327 byte got allocated, causing instruction size mismatch between passes
1328 and hence incorrect address calculations. Fixed.
1330 Stupid bug in the revised ELF section generation fixed (associated
1331 string-table section for .symtab was hard-coded as 7, even when this
1332 didn't fit with the real section table). Was causing `ld' to
1333 seg-fault under Linux.
1335 Included a new Borland C makefile, Makefile.bc2, donated by Fox
1336 Cutter <lmb@comtch.iea.com>.
1339 0.92 released January 1997
1340 --------------------------
1342 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
1343 fixed. This also affected the LCC driver.
1345 Fixed a bug regarding 32-bit effective addresses of the form
1346 [other_register+ESP].
1348 Documentary changes, notably documentation of the fact that Borland
1349 Win32 compilers use `obj' rather than `win32' object format.
1351 Fixed the COMENT record in OBJ files, which was formatted
1354 Fixed a bug causing segfaults in large RDF files.
1356 OBJ format now strips initial periods from segment and group
1357 definitions, in order to avoid complications with the local label
1360 Fixed a bug in disassembling far calls and jumps in NDISASM.
1362 Added support for user-defined sections in COFF and ELF files.
1364 Compiled the DOS binaries with a sensible amount of stack, to
1365 prevent stack overflows on any arithmetic expression containing
1368 Fixed a bug in handling of files that do not terminate in a newline.
1371 0.91 released November 1996
1372 ---------------------------
1375 Support for RDF added.
1376 Support for DBG debugging format added.
1377 Support for 32-bit extensions to Microsoft OBJ format added.
1378 Revised for Borland C: some variable names changed, makefile added.
1379 LCC support revised to actually work.
1380 JMP/CALL NEAR/FAR notation added.
1381 `a16', `o16', `a32' and `o32' prefixes added.
1382 Range checking on short jumps implemented.
1383 MMX instruction support added.
1384 Negative floating point constant support added.
1385 Memory handling improved to bypass 64K barrier under DOS.
1386 $ prefix to force treatment of reserved words as identifiers added.
1387 Default-size mechanism for object formats added.
1388 Compile-time configurability added.
1389 `#', `@', `~' and `?' are now valid characters in labels.
1390 `-e' and `-k' options in NDISASM added.
1393 0.90 released October 1996
1394 --------------------------
1396 First release version. First support for object file output. Other
1397 changes from previous version (0.3x) too numerous to document.