3 * Fix the handling of MMX registers with explicit "qword" tags on
4 memory (broken in 2.00 due to 64-bit changes.)
5 * Fix the PREFETCH instructions.
6 * Fix the documentation.
7 * Fix debugging info when using "-f elf" (backwards alias for "-f elf32").
11 * Added c99 data-type compliance.
12 * Added general x86-64 support.
13 * Added win64 (x86-64 COFF) output format.
14 * Added __BITS__ standard macro.
15 * Renamed the elf output format to elf32 for clarity.
16 * Added elf64 and macho (MacOS X) output formats.
17 * Added Numeric constants in DQ directive.
18 * Added oword, do and reso pseudo operands.
19 * Allow underscores in numbers.
20 * Added 8-, 16- and 128-bit floating-point formats.
21 * Added binary, octal and hexadecimal floating-point.
22 * Correct the generation of floating-point constants.
23 * Added Floating-point option control.
24 * Added Infinity and NaN floating point support.
25 * Added ELF Symbol Visibility support.
26 * Added Setting OSABI value in ELF header directive.
27 * Added Generate Makefile Dependencies option.
28 * Added Unlimited Optimization Passes option.
29 * Added %IFN and %ELIFN support.
30 * Added Logical Negation Operator.
31 * Enhanced Stack Relative Preprocessor Directives.
32 * Enhanced ELF Debug Formats.
33 * Enhanced Send Errors to a File option.
34 * Added SSSE3, SSE4.1, SSE4.2, SSE5 support.
35 * Added a large number of additional instructions.
36 * Significant performance improvements.
41 * fix outas86's .bss handling
42 * "make spotless" no longer deletes config.h.in.
43 * %(el)if(n)idn insensitivity to string quotes difference (#809300).
44 * (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol.
48 * Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
49 mkdep.pl to be able to generate completely pathless dependencies, as
50 required by OpenWatcom wmake (it supports path searches, but not
52 * Fix the STR instruction.
53 * Fix the ELF output format, which was broken under certain
54 circumstances due to the addition of stabs support.
55 * Quick-fix Borland format debug-info for -f obj
56 * Fix for %rep with no arguments (#560568)
57 * Fix concatenation of preprocessor function call (#794686)
58 * Fix long label causes coredump (#677841)
59 * Use autoheader as well as autoconf to keep configure from generating
60 ridiculously long command lines.
61 * Make sure that all of the formats which support debugging output
62 actually will suppress debugging output when -g not specified.
66 * Paths given in "-I" switch searched for "incbin"ed as
67 well as "%include"ed files.
68 * Added stabs debugging for the ELF output format, patch from
70 * Fix output/outbin.c to allow origin > 80000000h.
71 * Make -U switch work.
72 * Fix the use of relative offsets with explicit prefixes, e.g. "a32 loop foo".
73 * Remove "backslash()".
74 * Fix the SMSW and SLDT instructions.
75 * -O2 and -O3 are no longer aliases for -O10 and -O15. If you mean the
76 latter, please say so! :)
80 * Update rdoff - librarian/archiver - common rec - docs!
81 * Fix signed/unsigned problems.
82 * Fix JMP FAR label and CALL FAR label.
83 * Add new multisection support - map files - fix align bug
84 * Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
85 * "Q" or "O" suffixes indicate octal
86 * Support Prescott new instructions (PNI).
87 * Cyrix XSTORE instruction.
91 * Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.)
92 * Fix dependencies and compiler warnings.
93 * Add "const" in a number of places.
94 * Add -X option to specify error reporting format (use -Xvc to
95 integrate with Microsoft Visual Studio.)
96 * Minor changes for code legibility.
97 * Drop use of tmpnam() in rdoff (security fix.)
101 * Correct additional address-size vs. operand-size confusions.
102 * Generate dependencies for all Makefiles automatically.
103 * Add support for unimplemented (but theoretically available)
104 registers such as tr0 and cr5. Segment registers 6 and 7 are called
105 segr6 and segr7 for the operations which they can be represented.
106 * Correct some disassembler bugs related to redundant address-size prefixes.
107 Some work still remains in this area.
108 * Correctly generate an error for things like "SEG eax".
109 * Add the JMPE instruction, enabled by "CPU IA64".
110 * Correct compilation on newer gcc/glibc platforms.
111 * Issue an error on things like "jmp far eax".
117 * New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
118 round out the version-query macros. version.pl now understands
119 X.YYplWW or X.YY.ZZplWW as a version number, equivalent to
120 X.YY.ZZ.WW (or X.YY.0.WW, as appropriate).
121 * New keyword "strict" to disable the optimization of specific
123 * Fix the handing of size overrides with JMP instructions
124 (instructions such as "jmp dword foo".)
125 * Fix the handling of "ABSOLUTE label", where "label" points into a
127 * Fix OBJ output format with lots of externs.
128 * More documentation updates.
129 * Add -Ov option to get verbose information about optimizations.
130 * Undo a braindead change which broke %elif directives.
137 * Fix NASM crashing when %macro directives were left unterminated.
138 * Lots of documentation updates.
139 * Complete rewrite of the PostScript/PDF documentation generator.
140 * The MS Visual C++ Makefile was updated and corrected.
141 * Recognize .rodata as a standard section name in ELF.
142 * Fix some obsolete Perl4-isms in Perl scripts.
143 * Fix configure.in to work with autoconf 2.5x.
144 * Fix a couple of "make cleaner" misses.
145 * Make the normal "./configure && make" work with Cygwin.
151 * Correctly build in a separate object directory again.
152 * Derive all references to the version number from the version file.
153 * New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
154 * Lots of Makefile updates and bug fixes.
155 * New %ifmacro directive to test for multiline macros.
156 * Documentation updates.
157 * Fixes for 16-bit OBJ format output.
158 * Changed the NASM environment variable to NASMENV.
164 * Changed doc files a lot: completely removed old READMExx and
165 Wishlist files, incorporating all information in CHANGES and TODO.
166 * I waited a long time to rename zoutieee.c to (original) outieee.c
167 * moved all output modules to output/ subdirectory.
168 * Added 'make strip' target to strip debug info from nasm & ndisasm.
169 * Added INSTALL file with installation instructions.
170 * Added -v option description to nasm man.
171 * Added dist makefile target to produce source distributions.
172 * 16-bit support for ELF output format (GNU extension, but useful.)
178 * Fastcooked this for Debian's Woody release:
179 Frank applied the INCBIN bug patch to 0.98.25alt and called
180 it 0.98.28 to not confuse poor little apt-get.
186 * Reorganised files even better from 0.98.25alt
192 * Prettified the source tree. Moved files to more reasonable places.
193 * Added findleak.pl script to misc/ directory.
194 * Attempted to fix doc.
199 * Line continuation character '\'
200 * Docs inadvertantly reverted - "dos packaging".
206 * FIXME: Someone, document this please.
212 * Documentation - Ndisasm doc added to Nasm.doc.
218 * Attempted to remove rdoff version1
219 * Lino Mastrodomenico's patches to preproc.c (%$$ bug?).
225 * Update rdoff2 - attempt to remove v1.
231 * Optimization fixes.
237 * Optimization fixes.
243 * H. J. Lu's patch back out.
249 * Added ".rdata" to "-f win32".
255 * H. J. Lu's "bogus elf" patch. (Red Hat problem?)
261 * Fix whitespace before "[section ..." bug.
267 * Fix fixes to memory leaks.
273 * (there was no '.13)
278 * Update optimization (new function of "-O1")
279 * Changes to test/bintest.asm (?).
284 * Optimization changes.
286 * (there was no '.10)
291 * Add multiple sections support to "-f bin".
292 * Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.
293 * Add "-v" as an alias to the "-r" switch.
294 * Remove "#ifdef" from Tasm compatibility options.
295 * Remove redundant size-overrides on "mov ds, ex", etc.
296 * Fixes to SSE2, other insns.dat (?).
297 * Enable uppercase "I" and "P" switches.
298 * Case insinsitive "seg" and "wrt".
299 * Update install.sh (?).
300 * Allocate tokens in blocks.
301 * Improve "invalid effective address" messages.
306 * Add "%strlen" and "%substr" macro operators
307 * Fixed broken c16.mac.
308 * Unterminated string error reported.
309 * Fixed bugs as per 0.98bf
312 0.98.09b with John Coffman patches released 28-Oct-2001
313 -------------------------------------------------------
315 Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
317 * More closely compatible with 0.98 when -O0 is implied
318 or specified. Not strictly identical, since backward
319 branches in range of short offsets are recognized, and signed
320 byte values with no explicit size specification will be
321 assembled as a single byte.
323 * More forgiving with the PUSH instruction. 0.98 requires
324 a size to be specified always. 0.98.09b will imply the size
325 from the current BITS setting (16 or 32).
327 * Changed definition of the optimization flag:
329 -O0 strict two-pass assembly, JMP and Jcc are
330 handled more like 0.98, except that back-
331 ward JMPs are short, if possible.
333 -O1 strict two-pass assembly, but forward
334 branches are assembled with code guaranteed
335 to reach; may produce larger code than
336 -O0, but will produce successful assembly
337 more often if branch offset sizes are not
340 -O2 multi-pass optimization, minimize branch
341 offsets; also will minimize signed immed-
342 iate bytes, overriding size specification.
344 -O3 like -O2, but more passes taken, if needed
347 0.98.07 released 01/28/01
348 -------------------------
350 * Added Stepane Denis' SSE2 instructions to a *working*
351 version of the code - some earlier versions were based on
352 broken code - sorry 'bout that. version "0.98.07"
358 * Cosmetic modifications to nasm.c, nasm.h,
362 0.98.06f released 01/18/01
363 --------------------------
365 * - Add "metalbrain"s jecxz bug fix in insns.dat
366 - alter nasmdoc.src to match - version "0.98.06f"
369 0.98.06e released 01/09/01
370 --------------------------
372 * Removed the "outforms.h" file - it appears to be
373 someone's old backup of "outform.h". version "0.98.06e"
379 * fbk - finally added the fix for the "multiple %includes bug",
380 known since 7/27/99 - reported originally (?) and sent to
381 us by Austin Lunnen - he reports that John Fine had a fix
382 within the day. Here it is...
384 * Nelson Rush resigns from the group. Big thanks to Nelson for
385 his leadership and enthusiasm in getting these changes
386 incorporated into Nasm!
388 * fbk - [list +], [list -] directives - ineptly implemented, should
389 be re-written or removed, perhaps.
391 * Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
392 as well - testing might be desirable...
398 * James Seter - -postfix, -prefix command line switches.
399 * Yuri Zaporogets - rdoff utility changes.
405 * GAS-like palign (Panos Minos)
406 * FIXME: Someone, fill this in with details
410 ----------------------------------
412 * Fixed - elf and aoutb bug - shared libraries
413 - multiple "%include" bug in "-f obj"
415 - unrecognized option bug in ndisasm
417 0.98.03 with John Coffman's changes released 27-Jul-2000
418 --------------------------------------------------------
420 * Added signed byte optimizations for the 0x81/0x83 class
421 of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
422 when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also
423 optimization of signed byte form of 'PUSH imm' and 'IMUL
424 reg,imm'/'IMUL reg,reg,imm.' No size specification is needed.
426 * Added multi-pass JMP and Jcc offset optimization. Offsets
427 on forward references will preferentially use the short form,
428 without the need to code a specific size (short or near) for
429 the branch. Added instructions for 'Jcc label' to use the
430 form 'Jnotcc $+3/JMP label', in cases where a short offset
431 is out of bounds. If compiling for a 386 or higher CPU, then
432 the 386 form of Jcc will be used instead.
434 This feature is controlled by a new command-line switch: "O",
435 (upper case letter O). "-O0" reverts the assembler to no
436 extra optimization passes, "-O1" allows up to 5 extra passes,
437 and "-O2"(default), allows up to 10 extra optimization passes.
439 * Added a new directive: 'cpu XXX', where XXX is any of:
440 8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
441 Katmai. All are case insensitive. All instructions will
442 be selected only if they apply to the selected cpu or lower.
443 Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
445 * Added to 'standard.mac', the "use16" and "use32" forms of
446 the "bits 16/32" directive. This is nothing new, just conforms
447 to a lot of other assemblers. (minor)
449 * Changed label allocation from 320/32 (10000 labels @ 200K+)
450 to 32/37 (1000 labels); makes running under DOS much easier.
451 Since additional label space is allocated dynamically, this
452 should have no effect on large programs with lots of labels.
453 The 37 is a prime, believed to be better for hashing. (minor)
455 * Integrated patchfile 0.98-0.98.01. I call this version
456 0.98.03, for historical reasons: 0.98.02 was trashed.
458 --John Coffman <johninsd@san.rr.com> 27-Jul-2000
461 Kendall Bennett's SciTech MGL changes
462 -------------------------------------
463 Note that you must define "TASM_COMPAT" at compile-time
464 to get the Tasm Ideal Mode compatibility.
466 All changes can be compiled in and out using the TASM_COMPAT macros,
467 and when compiled without TASM_COMPAT defined we get the exact same
468 binary as the unmodified 0.98 sources.
470 standard.mac, macros.c:
471 . Added macros to ignore TASM directives before first include
474 . Added extern declaration for tasm_compatible_mode
477 . Added global variable tasm_compatible_mode
478 . Added command line switch for TASM compatible mode (-t)
479 . Changed version command line to reflect when compiled with TASM additions
480 . Added response file processing to allow all arguments on a single
481 line (response file is @resp rather than -@resp for NASM format).
484 . Changes islocal() macro to support TASM style @@local labels.
485 . Added islocalchar() macro to support TASM style @@local labels.
488 . Added support for TASM style memory references (ie: mov [DWORD eax],10
489 rather than the NASM style mov DWORD [eax],10).
492 . Added new directives, %arg, %local, %stacksize to directives table
493 . Added support for TASM style directives without a leading % symbol.
495 Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
497 * A new keyword %xdefine and its case-insensitive counterpart %ixdefine.
498 They work almost the same way as %define and %idefine but expand
499 the definition immediately, not on the invocation. Something like a cross
500 between %define and %assign. The "x" suffix stands for "eXpand", so
501 "xdefine" can be deciphered as "expand-and-define". Thus you can do
507 %xdefine %1 dword [esp+ofs]
511 * Changed the place where the expansion of %$name macros are expanded.
512 Now they are converted into ..@ctxnum.name form when detokenizing, so
513 there are no quirks as before when using %$name arguments to macros,
514 in macros etc. For example:
523 Now last line will be expanded into "hello" as expected. This also allows
524 for lots of goodies, a good example are extended "proc" macros included
527 * Added a check for "cstk" in smacro_defined() before calling get_ctx() -
528 this allows for things like:
533 to work without warnings even in no context.
535 * Added a check for "cstk" in %if*ctx and %elif*ctx directives -
536 this allows to use %ifctx without excessive warnings. If there is
537 no active context, %ifctx goes through "false" branch.
539 * Removed "user error: " prefix with %error directive: it just clobbers the
540 output and has absolutely no functionality. Besides, this allows to write
541 macros that does not differ from built-in functions in any way.
543 * Added expansion of string that is output by %error directive. Now you
546 %define hello(x) Hello, x!
549 %error "hello(%$name)"
551 Same happened with %include directive.
553 * Now all directives that expect an identifier will try to expand and
554 concatenate everything without whitespaces in between before usage.
555 For example, with "unfixed" nasm the commands
558 %define __%$abc goodbye
561 would produce "incorrect" output: last line will expand to
565 Not quite what you expected, eh? :-) The answer is that preprocessor
566 treats the %define construct as if it would be
568 %define __ %$abc goodbye
570 (note the white space between __ and %$abc). After my "fix" it
571 will "correctly" expand into
575 as expected. Note that I use quotes around words "correct", "incorrect"
576 etc because this is rather a feature not a bug; however current behaviour
577 is more logical (and allows more advanced macro usage :-).
579 Same change was applied to:
580 %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine,
581 %assign,%iassign,%undef
583 * A new directive [WARNING {+|-}warning-id] have been added. It works only
584 if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
586 * A new warning type: macro-selfref. By default this warning is disabled;
587 when enabled NASM warns when a macro self-references itself; for example
588 the following source:
590 [WARNING macro-selfref]
601 will produce a warning, but if we remove the first line we won't see it
602 anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
603 eats such constructs without warnings at all).
605 * Added a "error" routine to preprocessor which always will set ERR_PASS1
606 bit in severity_code. This removes annoying repeated errors on first
607 and second passes from preprocessor.
609 * Added the %+ operator in single-line macros for concatenating two
610 identifiers. Usage example:
612 %define _myfunc _otherfunc
613 %define cextern(x) _ %+ x
616 After first expansion, third line will become "_myfunc". After this
617 expansion is performed again so it becomes "_otherunc".
619 * Now if preprocessor is in a non-emmitting state, no warning or error
620 will be emmitted. Example:
625 put anything you want between these two brackets,
626 even macro-parameter references %1 or local labels %$zz
627 or macro-local labels %%zz - no warning will be emmitted.
630 * Context-local variables on expansion as a last resort are looked up
631 in outer contexts. For example, the following piece:
641 will expand correctly the fourth line to [esp]; if we'll define another
642 %$a inside the "inner" context, it will take precedence over outer
643 definition. However, this modification has been applied only to
644 expand_smacro and not to smacro_define: as a consequence expansion
645 looks in outer contexts, but %ifdef won't look in outer contexts.
647 This behaviour is needed because we don't want nested contexts to
648 act on already defined local macros. Example:
650 %define %$arg1 [esp+4]
656 In this example the "if" mmacro enters into the "if" context, so %$arg1
657 is not valid anymore inside "if". Of course it could be worked around
658 by using explicitely %$$arg1 but this is ugly IMHO.
660 * Fixed memory leak in %undef. The origline wasn't freed before
663 * Fixed trap in preprocessor when line expanded to empty set of tokens.
664 This happens, for example, in the following case:
673 All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
675 * The documentation comment delimiter is \# not #.
676 * Allow EQU definitions to refer to external labels; reported by
678 * Re-enable support for RDOFF v1; reported by Pedro Gimeno.
679 * Updated License file per OK from Simon and Julian.
685 * Update documentation (although the instruction set reference will
686 have to wait; I don't want to hold up the 0.98 release for it.)
687 * Verified that the NASM implementation of the PEXTRW and PMOVMSKB
688 instructions is correct. The encoding differs from what the Intel
689 manuals document, but the Pentium III behaviour matches NASM, not
691 * Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
693 * Resurrect the -s option, which was removed when changing the
694 diagnostic output to stdout.
700 * Fix for "DB" when NASM is running on a bigendian machine.
701 * Invoke insns.pl once for each output script, making Makefile.in
703 * Improve the Unix configure-based makefiles to make package
705 * Included an RPM .spec file for building RPM (RedHat Package Manager)
706 packages on Linux or Unix systems.
707 * Fix Makefile dependency problems.
708 * Change src/rdsrc.pl to include sectioning information in info
709 output; required for install-info to work.
710 * Updated the RDOFF distribution to version 2 from Jules; minor
711 massaging to make it compile in my environment.
712 * Split doc files that can be built by anyone with a Perl interpreter off
713 into a separate archive.
714 * "Dress rehearsal" release!
720 * Fixed opcodes with a third byte-sized immediate argument to not
721 complain if given "byte" on the immediate.
722 * Allow %undef to remove single-line macros with arguments. This
723 matches the behaviour of #undef in the C preprocessor.
724 * Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
725 compatibility with most C compilers and preprocessors. This allows
726 Makefile options to be shared between cc and nasm, for example.
728 * Went through the list of Katmai instructions and hopefully fixed the
729 (rather few) mistakes in it.
730 * (Hopefully) fixed a number of disassembler bugs related to ambiguous
731 instructions (disambiguated by -p) and SSE instructions with REP.
732 * Fix for bug reported by Mark Junger: "call dword 0x12345678" should
733 work and may add an OSP (affected CALL, JMP, Jcc).
734 * Fix for environments when "stderr" isn't a compile-time constant.
740 * Took officially over coordination of the 0.98 release; so drop
741 the p3.x notation. Skipped p4 and p5 to avoid confusion with John
742 Fine's J4 and J5 releases.
743 * Update the documentation; however, it still doesn't include
744 documentation for the various new instructions. I somehow wonder if
745 it makes sense to have an instruction set reference in the assembler
746 manual when Intel et al have PDF versions of their manuals online.
747 * Recognize "idt" or "centaur" for the -p option to ndisasm.
748 * Changed error messages back to stderr where they belong, but add an
749 -E option to redirect them elsewhere (the DOS shell cannot redirect
751 * -M option to generate Makefile dependencies (based on code from Alex
753 * %undef preprocessor directive, and -u option, that undefines a
755 * OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
757 * Various minor bugfixes (reported by):
758 - Dangling %s in preproc.c (Martin Junker)
759 * THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am
760 on a trip and didn't bring the Katmai instruction reference, so I
761 can't work on them right now.
762 * Updated the License file per agreement with Simon and Jules to
763 include a GPL distribution clause.
769 * (Hopefully) fixed the canned Makefiles to include the outrdf2 and
771 * Renamed changes.asm to changed.asm.
777 * Fixed a bunch of instructions that were added in 0.98p3.5 which had
778 memory operands, and the address-size prefix was missing from the
785 * Merged in changes from John S. Fine's 0.98-J5 release. John's based
786 0.98-J5 on my 0.98p3.3 release; this merges the changes.
787 * Expanded the instructions flag field to a long so we can fit more
788 flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
790 * Fix the "PRIV" flag on a bunch of instructions, and create new
791 "PROT" flag for protected-mode-only instructions (orthogonal to if
792 the instruction is privileged!) and new "SMM" flag for SMM-only
794 * Added AMD-only SYSCALL and SYSRET instructions.
795 * Make SSE actually work, and add new Katmai MMX instructions.
796 * Added a -p (preferred vendor) option to ndisasm so that it can
797 distinguish e.g. Cyrix opcodes also used in SSE. For example:
799 ndisasm -p cyrix aliased.bin
800 00000000 670F514310 paddsiw mm0,[ebx+0x10]
801 00000005 670F514320 paddsiw mm0,[ebx+0x20]
802 ndisasm -p intel aliased.bin
803 00000000 670F514310 sqrtps xmm0,[ebx+0x10]
804 00000005 670F514320 sqrtps xmm0,[ebx+0x20]
805 * Added a bunch of Cyrix-specific instructions.
811 * Made at least an attempt to modify all the additional Makefiles (in
812 the Mkfiles directory). I can't test it, but this was the best I
814 * DOS DJGPP+"Opus Make" Makefile from John S. Fine.
815 * changes.asm changes from John S. Fine.
821 * Patch from Conan Brink to allow nesting of %rep directives.
822 * If we're going to allow INT01 as an alias for INT1/ICEBP (one of
823 Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
825 * Updated changes.asm to include the latest changes.
826 * Tried to clean up the <CR>s that had snuck in from a DOS/Windows
827 environment into my Unix environment, and try to make sure than
828 DOS/Windows users get them back.
829 * We would silently generate broken tools if insns.dat wasn't sorted
830 properly. Change insns.pl so that the order doesn't matter.
831 * Fix bug in insns.pl (introduced by me) which would cause conditional
832 instructions to have an extra "cc" in disassembly, e.g. "jnz"
833 disassembled as "jccnz".
839 * Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
840 http://www.csoft.net/cz/johnfine/
841 * Changed previous "spotless" Makefile target (appropriate for distribution)
842 to "distclean", and added "cleaner" target which is same as "clean"
843 except deletes files generated by Perl scripts; "spotless" is union.
844 * Removed BASIC programs from distribution. Get a Perl interpreter
846 * Calling this "pre-release 3.2" rather than "p3-hpa2" because of
847 John's contributions.
848 * Actually link in the IEEE output format (zoutieee.c); fix a bunch of
849 compiler warnings in that file. Note I don't know what IEEE output
850 is supposed to look like, so these changes were made "blind".
856 * Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
857 buildable version for Unix systems (Makefile.in updates, etc.)
858 * Changed insns.pl to create the instruction tables in nasm.h and
859 names.c, so that a new instruction can be added by adding it *only*
861 * Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
862 FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
863 guarantee will never be used; one of them is documented as UD2 in
864 Intel documentation, the other one just as "Undefined Opcode" --
865 calling it UD1 seemed to make sense.)
866 * MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
867 characters long. Now MAX_SYMBOL is derived from insns.dat.
868 * A note on the BASIC programs included: forget them. insns.bas is
869 already out of date. Get yourself a Perl interpreter for your
870 platform of choice at:
872 http://www.cpan.org/ports/index.html
878 added response file support, improved command line handling, new layout
881 fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
882 related bugs, updated Wishlist; 0.98 Prerelease 3.
888 fixed bug in outcoff.c to do with truncating section names longer
889 than 8 characters, referencing beyond end of string; 0.98 pre-release 2
892 0.98 pre-released May 1999
893 --------------------------
895 Fixed a bug whereby STRUC didn't work at all in RDF.
897 Fixed a problem with group specification in PUBDEFs in OBJ.
899 Improved ease of adding new output formats. Contribution due to
902 Fixed a bug in relocations in the `bin' format: was showing up when
903 a relocatable reference crossed an 8192-byte boundary in any output
906 Fixed a bug in local labels: local-label lookups were inconsistent
907 between passes one and two if an EQU occurred between the definition
908 of a global label and the subsequent use of a local label local to
911 Fixed a seg-fault in the preprocessor (again) which happened when
912 you use a blank line as the first line of a multi-line macro
913 definition and then defined a label on the same line as a call to
916 Fixed a stale-pointer bug in the handling of the NASM environment
917 variable. Thanks to Thomas McWilliams.
919 ELF had a hard limit on the number of sections which caused
920 segfaults when transgressed. Fixed.
922 Added ability for ndisasm to read from stdin by using `-' as the
925 ndisasm wasn't outputting the TO keyword. Fixed.
927 Fixed error cascade on bogus expression in %if - an error in
928 evaluation was causing the entire %if to be discarded, thus creating
929 trouble later when the %else or %endif was encountered.
931 Forward reference tracking was instruction-granular not operand-
932 granular, which was causing 286-specific code to be generated
933 needlessly on code of the form `shr word [forwardref],1'. Thanks to
934 Jim Hague for sending a patch.
936 All messages now appear on stdout, as sending them to stderr serves
937 no useful purpose other than to make redirection difficult.
939 Fixed the problem with EQUs pointing to an external symbol - this
940 now generates an error message.
942 Allowed multiple size prefixes to an operand, of which only the first
943 is taken into account.
945 Incorporated John Fine's changes, including fixes of a large number
946 of preprocessor bugs, some small problems in OBJ, and a reworking of
947 label handling to define labels before their line is assembled, rather
950 Reformatted a lot of the source code to be more readable. Included
951 'coding.txt' as a guideline for how to format code for contributors.
953 Stopped nested %reps causing a panic - they now cause a slightly more
954 friendly error message instead.
956 Fixed floating point constant problems (patch by Pedro Gimeno)
958 Fixed the return value of insn_size() not being checked for -1, indicating
961 Incorporated 3D now instructions.
963 Fixed the 'mov eax, eax + ebx' bug.
965 Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
967 Incorporated John Fine's command line parsing changes
969 Incorporated David Lindauer's OMF debug support
971 Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
972 specification warning when sizes agree).
974 Released NASM 0.98 Pre-release 1
977 0.97 released December 1997
978 ---------------------------
980 This was entirely a bug-fix release to 0.96, which seems to have got
983 Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
984 fail. Caused by an error in the `MOV EAX,<segment>' support.
986 ndisasm hung at EOF when compiled with lcc on Linux because lcc on
987 Linux somehow breaks feof(). ndisasm now does not rely on feof().
989 A heading in the documentation was missing due to a markup error in
992 Fixed failure to update all pointers on realloc() within extended-
993 operand code in parser.c. Was causing wrong behaviour and seg faults
994 on lines such as `dd 0.0,0.0,0.0,0.0,...'
996 Fixed a subtle preprocessor bug whereby invoking one multi-line
997 macro on the first line of the expansion of another, when the second
998 had been invoked with a label defined before it, didn't expand the
1001 Added internal.doc back in to the distribution archives - it was
1002 missing in 0.96 *blush*
1004 Fixed bug causing 0.96 to be unable to assemble its own test files,
1005 specifically objtest.asm. *blush again*
1007 Fixed seg-faults and bogus error messages caused by mismatching
1008 %rep and %endrep within multi-line macro definitions.
1010 Fixed a problem with buffer overrun in OBJ, which was causing
1011 corruption at ends of long PUBDEF records.
1013 Separated DOS archives into main-program and documentation to reduce
1017 0.96 released November 1997
1018 ---------------------------
1020 Fixed a bug whereby, if `nasm sourcefile' would cause a filename
1021 collision warning and put output into `nasm.out', then `nasm
1022 sourcefile -o outputfile' still gave the warning even though the
1025 Fixed name pollution under Digital UNIX: one of its header files
1026 defined R_SP, which broke the enum in nasm.h.
1028 Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
1029 two-operand forms; NDISASM didn't recognise the longer register
1030 forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
1031 flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
1032 size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
1033 undocumented because the Intel Architecture reference documents
1036 Fixed a problem with the local-label mechanism, whereby strange
1037 types of symbol (EQUs, auto-defined OBJ segment base symbols)
1038 interfered with the `previous global label' value and screwed up
1041 Fixed a bug whereby the stub preprocessor didn't communicate with
1042 the listing file generator, so that the -a and -l options in
1043 conjunction would produce a useless listing file.
1045 Merged `os2' object file format back into `obj', after discovering
1046 that `obj' _also_ shouldn't have a link pass separator in a module
1047 containing a non-trivial MODEND. Flat segments are now declared
1048 using the FLAT attribute. `os2' is no longer a valid object format
1051 Removed the fixed-size temporary storage in the evaluator. Very very
1052 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
1053 so) should now no longer crash NASM.
1055 Fixed a bug involving segfaults on disassembly of MMX instructions,
1056 by changing the meaning of one of the operand-type flags in nasm.h.
1057 This may cause other apparently unrelated MMX problems; it needs to
1058 be tested thoroughly.
1060 Fixed some buffer overrun problems with large OBJ output files.
1061 Thanks to DJ Delorie for the bug report and fix.
1063 Made preprocess-only mode actually listen to the %line markers as it
1064 prints them, so that it can report errors more sanely.
1066 Re-designed the evaluator to keep more sensible track of expressions
1067 involving forward references: can now cope with previously-nightmare
1073 Added the ALIGN and ALIGNB standard macros.
1075 Added PIC support in ELF: use of WRT to obtain the four extra
1076 relocation types needed.
1078 Added the ability for output file formats to define their own
1079 extensions to the GLOBAL, COMMON and EXTERN directives.
1081 Implemented common-variable alignment, and global-symbol type and
1082 size declarations, in ELF.
1084 Implemented NEAR and FAR keywords for common variables, plus
1085 far-common element size specification, in OBJ.
1087 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
1088 default WRT specification (either a segment or a group).
1090 Transformed the Unix NASM archive into an auto-configuring package.
1092 Added a sanity-check for people applying SEG to things which are
1093 already segment bases: this previously went unnoticed by the SEG
1094 processing and caused OBJ-driver panics later.
1096 Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
1097 type references: OBJ doesn't directly support dword-size segment
1098 base fixups, but as long as the low two bytes of the constant term
1099 are zero, a word-size fixup can be generated instead and it will
1102 Added the ability to specify sections' alignment requirements in
1103 Win32 object files and pure binary files.
1105 Added preprocess-time expression evaluation: the %assign (and
1106 %iassign) directive and the bare %if (and %elif) conditional. Added
1107 relational operators to the evaluator, for use only in %if
1108 constructs: the standard relationals = < > <= >= <> (and C-like
1109 synonyms == and !=) plus low-precedence logical operators &&, ^^ and
1112 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
1114 Added the __FILE__ and __LINE__ standard macros.
1116 Added a sanity check for number constants being greater than
1117 0xFFFFFFFF. The warning can be disabled.
1119 Added the %0 token whereby a variadic multi-line macro can tell how
1120 many parameters it's been given in a specific invocation.
1122 Added %rotate, allowing multi-line macro parameters to be cycled.
1124 Added the `*' option for the maximum parameter count on multi-line
1125 macros, allowing them to take arbitrarily many parameters.
1127 Added the ability for the user-level forms of EXTERN, GLOBAL and
1128 COMMON to take more than one argument.
1130 Added the IMPORT and EXPORT directives in OBJ format, to deal with
1133 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
1134 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
1136 Added the ability to distinguish SHL AX,1 (the 8086 version) from
1137 SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
1140 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
1141 with PIC shared library features.
1143 Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
1144 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
1145 otherwise accepted standard. The previous behaviour, though it was a
1146 deliberate feature, was a deliberate feature based on a
1147 misunderstanding. Apologies for the inconvenience.
1149 Improved the flexibility of ABSOLUTE: you can now give it an
1150 expression rather than being restricted to a constant, and it can
1151 take relocatable arguments as well.
1153 Added the ability for a variable to be declared as EXTERN multiple
1154 times, and the subsequent definitions are just ignored.
1156 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
1157 alone on a line (without a following instruction).
1159 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
1160 and COMMON are valid identifiers.
1162 Added misc/exebin.mac to allow direct generation of .EXE files by
1163 hacking up an EXE header using DB and DW; also added test/binexe.asm
1164 to demonstrate the use of this. Thanks to Yann Guidon for
1165 contributing the EXE header code.
1167 ndisasm forgot to check whether the input file had been successfully
1168 opened. Now it does. Doh!
1170 Added the Cyrix extensions to the MMX instruction set.
1172 Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
1173 assembled differently. This is important since [ESI+EBP] and
1174 [EBP+ESI] have different default base segment registers.
1176 Added support for the PharLap OMF extension for 4096-byte segment
1180 0.95 released July 1997
1181 -----------------------
1183 Fixed yet another ELF bug. This one manifested if the user relied on
1184 the default segment, and attempted to define global symbols without
1185 first explicitly declaring the target segment.
1187 Added makefiles (for NASM and the RDF tools) to build Win32 console
1188 apps under Symantec C++. Donated by Mark Junker.
1190 Added `macros.bas' and `insns.bas', QBasic versions of the Perl
1191 scripts that convert `standard.mac' to `macros.c' and convert
1192 `insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
1195 Changed the diassembled forms of the conditional instructions so
1196 that JB is now emitted as JC, and other similar changes. Suggested
1197 list by Ulrich Doewich.
1199 Added `@' to the list of valid characters to begin an identifier
1202 Documentary changes, notably the addition of the `Common Problems'
1203 section in nasm.doc.
1205 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
1207 Fixed a bug in perm_copy() in labels.c which was causing exceptions
1208 in cleanup_labels() on some systems.
1210 Positivity sanity check in TIMES argument changed from a warning to
1211 an error following a further complaint.
1213 Changed the acceptable limits on byte and word operands to allow
1214 things like `~10111001b' to work.
1216 Fixed a major problem in the preprocessor which caused seg-faults if
1217 macro definitions contained blank lines or comment-only lines.
1219 Fixed inadequate error checking on the commas separating the
1220 arguments to `db', `dw' etc.
1222 Fixed a crippling bug in the handling of macros with operand counts
1223 defined with a `+' modifier.
1225 Fixed a bug whereby object file formats which stored the input file
1226 name in the output file (such as OBJ and COFF) weren't doing so
1227 correctly when the output file name was specified on the command
1230 Removed [INC] and [INCLUDE] support for good, since they were
1233 Fixed a bug in OBJ which caused all fixups to be output in 16-bit
1234 (old-format) FIXUPP records, rather than putting the 32-bit ones in
1235 FIXUPP32 (new-format) records.
1237 Added, tentatively, OS/2 object file support (as a minor variant on
1240 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
1242 Removed a spurious second fclose() on the output file.
1244 Added the `-s' command line option to redirect all messages which
1245 would go to stderr (errors, help text) to stdout instead.
1247 Added the `-w' command line option to selectively suppress some
1248 classes of assembly warning messages.
1250 Added the `-p' pre-include and `-d' pre-define command-line options.
1252 Added an include file search path: the `-i' command line option.
1254 Fixed a silly little preprocessor bug whereby starting a line with a
1255 `%!' environment-variable reference caused an `unknown directive'
1258 Added the long-awaited listing file support: the `-l' command line
1261 Fixed a problem with OBJ format whereby, in the absence of any
1262 explicit segment definition, non-global symbols declared in the
1263 implicit default segment generated spurious EXTDEF records in the
1266 Added the NASM environment variable.
1268 From this version forward, Win32 console-mode binaries will be
1269 included in the DOS distribution in addition to the 16-bit binaries.
1270 Added Makefile.vc for this purpose.
1272 Added `return 0;' to test/objlink.c to prevent compiler warnings.
1274 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
1276 Added an alternative memory-reference syntax in which prefixing an
1277 operand with `&' is equivalent to enclosing it in square brackets,
1278 at the request of Fox Cutter.
1280 Errors in pass two now cause the program to return a non-zero error
1281 code, which they didn't before.
1283 Fixed the single-line macro cycle detection, which didn't work at
1284 all on macros with no parameters (caused an infinite loop). Also
1285 changed the behaviour of single-line macro cycle detection to work
1286 like cpp, so that macros like `extrn' as given in the documentation
1289 Fixed the implementation of WRT, which was too restrictive in that
1290 you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
1291 a relocatable reference.
1294 0.94 released April 1997
1295 ------------------------
1297 Major item: added the macro processor.
1299 Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
1300 reorganised CMPXCHG instruction into early-486 and Pentium forms.
1301 Thanks to Thobias Jones for the information.
1303 Fixed two more stupid bugs in ELF, which were causing `ld' to
1304 continue to seg-fault in a lot of non-trivial cases.
1306 Fixed a seg-fault in the label manager.
1308 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
1309 the only option for BCD loads/stores in any case.
1311 Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
1312 anyone bothers to provide it. Previously they complained unless no
1313 keyword at all was present.
1315 Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
1316 vestige of a bug that I thought had been fixed in 0.92. This was
1317 fixed, hopefully for good this time...
1319 Another minor phase error (insofar as a phase error can _ever_ be
1320 minor) fixed, this one occurring in code of the form
1321 rol ax,forward_reference
1322 forward_reference equ 1
1324 The number supplied to TIMES is now sanity-checked for positivity,
1325 and also may be greater than 64K (which previously didn't work on
1328 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
1330 Added the INCBIN pseudo-opcode.
1332 Due to the advent of the preprocessor, the [INCLUDE] and [INC]
1333 directives have become obsolete. They are still supported in this
1334 version, with a warning, but won't be in the next.
1336 Fixed a bug in OBJ format, which caused incorrect object records to
1337 be output when absolute labels were made global.
1339 Updates to RDOFF subdirectory, and changes to outrdf.c.
1342 0.93 released January 1997
1343 --------------------------
1345 This release went out in a great hurry after semi-crippling bugs
1348 Really _did_ fix the stack overflows this time. *blush*
1350 Had problems with EA instruction sizes changing between passes, when
1351 an offset contained a forward reference and so 4 bytes were
1352 allocated for the offset in pass one; by pass two the symbol had
1353 been defined and happened to be a small absolute value, so only 1
1354 byte got allocated, causing instruction size mismatch between passes
1355 and hence incorrect address calculations. Fixed.
1357 Stupid bug in the revised ELF section generation fixed (associated
1358 string-table section for .symtab was hard-coded as 7, even when this
1359 didn't fit with the real section table). Was causing `ld' to
1360 seg-fault under Linux.
1362 Included a new Borland C makefile, Makefile.bc2, donated by Fox
1363 Cutter <lmb@comtch.iea.com>.
1366 0.92 released January 1997
1367 --------------------------
1369 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
1370 fixed. This also affected the LCC driver.
1372 Fixed a bug regarding 32-bit effective addresses of the form
1373 [other_register+ESP].
1375 Documentary changes, notably documentation of the fact that Borland
1376 Win32 compilers use `obj' rather than `win32' object format.
1378 Fixed the COMENT record in OBJ files, which was formatted
1381 Fixed a bug causing segfaults in large RDF files.
1383 OBJ format now strips initial periods from segment and group
1384 definitions, in order to avoid complications with the local label
1387 Fixed a bug in disassembling far calls and jumps in NDISASM.
1389 Added support for user-defined sections in COFF and ELF files.
1391 Compiled the DOS binaries with a sensible amount of stack, to
1392 prevent stack overflows on any arithmetic expression containing
1395 Fixed a bug in handling of files that do not terminate in a newline.
1398 0.91 released November 1996
1399 ---------------------------
1402 Support for RDF added.
1403 Support for DBG debugging format added.
1404 Support for 32-bit extensions to Microsoft OBJ format added.
1405 Revised for Borland C: some variable names changed, makefile added.
1406 LCC support revised to actually work.
1407 JMP/CALL NEAR/FAR notation added.
1408 `a16', `o16', `a32' and `o32' prefixes added.
1409 Range checking on short jumps implemented.
1410 MMX instruction support added.
1411 Negative floating point constant support added.
1412 Memory handling improved to bypass 64K barrier under DOS.
1413 $ prefix to force treatment of reserved words as identifiers added.
1414 Default-size mechanism for object formats added.
1415 Compile-time configurability added.
1416 `#', `@', `~' and `?' are now valid characters in labels.
1417 `-e' and `-k' options in NDISASM added.
1420 0.90 released October 1996
1421 --------------------------
1423 First release version. First support for object file output. Other
1424 changes from previous version (0.3x) too numerous to document.