summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 21:09:12 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 21:09:12 +0000
commit8ac364139a0af08f834c11bd2b8bd6dfc6707dfb (patch)
tree46016ba4569be263d5bf772e359e3207255bf12a
parent005b39c856917f060973f8d07c98d111b67d0a7f (diff)
downloadnasm-8ac364139a0af08f834c11bd2b8bd6dfc6707dfb.tar.gz
NASM 0.98.30nasm-0.98.30
-rw-r--r--CHANGES1237
-rw-r--r--COPYING664
-rw-r--r--ChangeLog23
-rw-r--r--Changes542
-rw-r--r--INSTALL59
-rw-r--r--License119
-rw-r--r--MODIFIED224
-rw-r--r--Makefile.in35
-rw-r--r--Mkfiles/Makefile.b3226
-rw-r--r--Mkfiles/Makefile.bc220
-rw-r--r--Mkfiles/Makefile.bor24
-rw-r--r--Mkfiles/Makefile.dj24
-rw-r--r--Mkfiles/Makefile.djo66
-rw-r--r--Mkfiles/Makefile.dl6
-rw-r--r--Mkfiles/Makefile.dos24
-rw-r--r--Mkfiles/Makefile.emx22
-rw-r--r--Mkfiles/Makefile.lcc44
-rw-r--r--Mkfiles/Makefile.os214
-rw-r--r--Mkfiles/Makefile.sc24
-rw-r--r--Mkfiles/Makefile.scw24
-rw-r--r--Mkfiles/Makefile.unx28
-rw-r--r--Mkfiles/Makefile.vc26
-rw-r--r--Mkfiles/Makefile.wc46
-rw-r--r--Mkfiles/Makefile.wcw46
-rw-r--r--README10
-rw-r--r--Readme49
-rw-r--r--TODO347
-rw-r--r--Wishlist276
-rw-r--r--doc/Changes542
-rw-r--r--doc/License119
-rw-r--r--doc/Readme49
-rw-r--r--doc/Wishlist276
-rw-r--r--insns.dat6
-rw-r--r--insns.pl2
-rwxr-xr-xinstall-sh2
-rw-r--r--lcc/Readme52
-rw-r--r--macros.c73
-rw-r--r--macros.pl2
-rwxr-xr-xmakedist.sh2
-rw-r--r--misc/findleak.pl3
-rw-r--r--misc/nasmstab2
-rw-r--r--misc/pmw.bat2
-rw-r--r--misc/simon.jpgbin0 -> 10389 bytes
-rwxr-xr-xnasm-dir5
-rwxr-xr-xnasm-version5
-rw-r--r--nasm.16
-rw-r--r--nasm.c8
-rw-r--r--nasm.h5
-rw-r--r--outforms.h223
-rw-r--r--output/outaout.c (renamed from outaout.c)0
-rw-r--r--output/outas86.c (renamed from outas86.c)0
-rw-r--r--output/outbin.c (renamed from outbin.c)0
-rw-r--r--output/outcoff.c (renamed from outcoff.c)0
-rw-r--r--output/outdbg.c (renamed from outdbg.c)0
-rw-r--r--output/outelf.c (renamed from outelf.c)68
-rw-r--r--output/outieee.c (renamed from zoutieee.c)0
-rw-r--r--output/outobj.c (renamed from outobj.c)0
-rw-r--r--output/outrdf.c (renamed from outrdf.c)0
-rw-r--r--output/outrdf2.c (renamed from outrdf2.c)0
-rw-r--r--parser.c7
-rw-r--r--rdoff/Makefile.dj75
-rw-r--r--rdoff/Makefile.emx76
-rw-r--r--rdoff/Makefile.sc56
-rw-r--r--rdoff/Makefile.unx75
-rw-r--r--rdoff/test/makelib.sh2
65 files changed, 2400 insertions, 3392 deletions
diff --git a/CHANGES b/CHANGES
new file mode 100644
index 00000000..a10592c9
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,1237 @@
+0.98.30
+-------
+
+* Changed doc files a lot: completely removed old READMExx and
+Wishlist files, incorporating all information in CHANGES and TODO.
+* I waited a long time to rename zoutieee.c to (original) outieee.c
+* moved all output modules to output/ subdirectory.
+* Added 'make strip' target to strip debug info from nasm & ndisasm.
+* Added INSTALL file with installation instructions.
+* Added -v option description to nasm man.
+* Added dist makefile target to produce source distributions.
+
+
+0.98.28
+-------
+
+* Fastcooked this for Debian's Woody release:
+Frank applied the INCBIN bug patch to 0.98.25alt and called
+it 0.98.28 to not confuse poor little apt-get.
+
+
+0.98.26
+-------
+
+* Reorganised files even better from 0.98.25alt
+
+
+0.98.25alt
+----------
+
+* Prettified the source tree. Moved files to more
+reasonable places.
+* Added findleak.pl script to misc/ directory.
+* FIXME: Frank, document this please.
+
+
+0.98.25
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.24p1
+---------
+
+* FIXME: Frank, document this please.
+
+
+0.98.24
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.23
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.22
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.21
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.20
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.19
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.18
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.17
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.16
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.14
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.12
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.09
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.08
+-------
+
+* FIXME: Frank, document this please.
+
+
+0.98.09b with John Coffman patches released 28-Oct-2001
+-------------------------------------------------------
+
+Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
+
+* More closely compatible with 0.98 when -O0 is implied
+or specified. Not strictly identical, since backward
+branches in range of short offsets are recognized, and signed
+byte values with no explicit size specification will be
+assembled as a single byte.
+
+* More forgiving with the PUSH instruction. 0.98 requires
+a size to be specified always. 0.98.09b will imply the size
+from the current BITS setting (16 or 32).
+
+* Changed definition of the optimization flag:
+
+ -O0 strict two-pass assembly, JMP and Jcc are
+ handled more like 0.98, except that back-
+ ward JMPs are short, if possible.
+
+ -O1 strict two-pass assembly, but forward
+ branches are assembled with code guaranteed
+ to reach; may produce larger code than
+ -O0, but will produce successful assembly
+ more often if branch offset sizes are not
+ specified.
+
+ -O2 multi-pass optimization, minimize branch
+ offsets; also will minimize signed immed-
+ iate bytes, overriding size specification.
+
+ -O3 like -O2, but more passes taken, if needed
+
+
+0.98.07 released 01/28/01
+-------------------------
+
+* fbk - added Stepane Denis' SSE2 instructions to a *working*
+ version of the code - some earlier versions were based on
+ broken code - sorry 'bout that. version "0.98.07"
+
+
+01/28/01
+--------
+
+* fbk - cosmetic modifications to nasm.c, nasm.h,
+ AUTHORS, MODIFIED
+
+
+0.98.06f released 01/18/01
+--------------------------
+
+* fbk - "metalbrain"s jecxz bug fix in insns.dat
+ - alter nasmdoc.src to match - version "0.98.06f"
+
+
+0.98.06e released 01/09/01
+--------------------------
+
+* fbk - removed the "outforms.h" file - it appears to be
+ someone's old backup of "outform.h". version "0.98.06e"
+
+
+01/09/01
+--------
+
+* fbk - finally added the fix for the "multiple %includes bug",
+ known since 7/27/99 - reported originally (?) and sent to
+ us by Austin Lunnen - he reports that John Fine had a fix
+ within the day. Here it is...
+
+* Nelson Rush resigns from the group. Big thanks to Nelson for
+ his leadership and enthusiasm in getting these changes
+ incorporated into Nasm!
+
+* fbk - [list +], [list -] directives - ineptly implemented, should
+ be re-written or removed, perhaps.
+
+* Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
+ as well - testing might be desirable...
+
+
+08/07/00
+--------
+
+* James Seter - -postfix, -prefix command line switches.
+* Yuri Zaporogets - rdoff utility changes.
+
+
+0.98p1
+------
+
+* GAS-like palign (Panos Minos)
+* FIXME: Frank, fill this in with details
+
+
+0.98bf (bug-fixed, aka brain-fuck)
+----------------------------------
+
+* FIXME: Frank, fill this in
+
+
+0.98.03 with John Coffman's changes released 27-Jul-2000
+--------------------------------------------------------
+
+* Added signed byte optimizations for the 0x81/0x83 class
+of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
+when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also
+optimization of signed byte form of 'PUSH imm' and 'IMUL
+reg,imm'/'IMUL reg,reg,imm.' No size specification is needed.
+
+* Added multi-pass JMP and Jcc offset optimization. Offsets
+on forward references will preferentially use the short form,
+without the need to code a specific size (short or near) for
+the branch. Added instructions for 'Jcc label' to use the
+form 'Jnotcc $+3/JMP label', in cases where a short offset
+is out of bounds. If compiling for a 386 or higher CPU, then
+the 386 form of Jcc will be used instead.
+
+This feature is controlled by a new command-line switch: "O",
+(upper case letter O). "-O0" reverts the assembler to no
+extra optimization passes, "-O1" allows up to 5 extra passes,
+and "-O2"(default), allows up to 10 extra optimization passes.
+
+* Added a new directive: 'cpu XXX', where XXX is any of:
+8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
+Katmai. All are case insensitive. All instructions will
+be selected only if they apply to the selected cpu or lower.
+Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
+
+* Added to 'standard.mac', the "use16" and "use32" forms of
+the "bits 16/32" directive. This is nothing new, just conforms
+to a lot of other assemblers. (minor)
+
+* Changed label allocation from 320/32 (10000 labels @ 200K+)
+to 32/37 (1000 labels); makes running under DOS much easier.
+Since additional label space is allocated dynamically, this
+should have no effect on large programs with lots of labels.
+The 37 is a prime, believed to be better for hashing. (minor)
+
+* Integrated patchfile 0.98-0.98.01. I call this version
+0.98.03, for historical reasons: 0.98.02 was trashed.
+
+--John Coffman <johninsd@san.rr.com> 27-Jul-2000
+
+
+Kendall Bennett's SciTech MGL changes
+-------------------------------------
+Note that you must define "TASM_COMPAT" at compile-time
+to get the Tasm Ideal Mode compatibility.
+
+All changes can be compiled in and out using the TASM_COMPAT macros,
+and when compiled without TASM_COMPAT defined we get the exact same
+binary as the unmodified 0.98 sources.
+
+standard.mac, macros.c:
+ . Added macros to ignore TASM directives before first include
+
+nasm.h:
+ . Added extern declaration for tasm_compatible_mode
+
+nasm.c:
+ . Added global variable tasm_compatible_mode
+ . Added command line switch for TASM compatible mode (-t)
+ . Changed version command line to reflect when compiled with TASM additions
+ . Added response file processing to allow all arguments on a single
+ line (response file is @resp rather than -@resp for NASM format).
+
+labels.c:
+ . Changes islocal() macro to support TASM style @@local labels.
+ . Added islocalchar() macro to support TASM style @@local labels.
+
+parser.c:
+ . Added support for TASM style memory references (ie: mov [DWORD eax],10
+ rather than the NASM style mov DWORD [eax],10).
+
+preproc.c:
+ . Added new directives, %arg, %local, %stacksize to directives table
+ . Added support for TASM style directives without a leading % symbol.
+
+Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
+
+* A new keyword %xdefine and its case-insensitive counterpart %ixdefine.
+ They work almost the same way as %define and %idefine but expand
+ the definition immediately, not on the invocation. Something like a cross
+ between %define and %assign. The "x" suffix stands for "eXpand", so
+ "xdefine" can be deciphered as "expand-and-define". Thus you can do
+ things like this:
+
+ %assign ofs 0
+
+ %macro arg 1
+ %xdefine %1 dword [esp+ofs]
+ %assign ofs ofs+4
+ %endmacro
+
+* Changed the place where the expansion of %$name macros are expanded.
+ Now they are converted into ..@ctxnum.name form when detokenizing, so
+ there are no quirks as before when using %$name arguments to macros,
+ in macros etc. For example:
+
+ %macro abc 1
+ %define %1 hello
+ %endm
+
+ abc %$here
+ %$here
+
+ Now last line will be expanded into "hello" as expected. This also allows
+ for lots of goodies, a good example are extended "proc" macros included
+ in this archive.
+
+* Added a check for "cstk" in smacro_defined() before calling get_ctx() -
+ this allows for things like:
+
+ %ifdef %$abc
+ %endif
+
+ to work without warnings even in no context.
+
+* Added a check for "cstk" in %if*ctx and %elif*ctx directives -
+ this allows to use %ifctx without excessive warnings. If there is
+ no active context, %ifctx goes through "false" branch.
+
+* Removed "user error: " prefix with %error directive: it just clobbers the
+ output and has absolutely no functionality. Besides, this allows to write
+ macros that does not differ from built-in functions in any way.
+
+* Added expansion of string that is output by %error directive. Now you
+ can do things like:
+
+ %define hello(x) Hello, x!
+
+ %define %$name andy
+ %error "hello(%$name)"
+
+ Same happened with %include directive.
+
+* Now all directives that expect an identifier will try to expand and
+ concatenate everything without whitespaces in between before usage.
+ For example, with "unfixed" nasm the commands
+
+ %define %$abc hello
+ %define __%$abc goodbye
+ __%$abc
+
+ would produce "incorrect" output: last line will expand to
+
+ hello goodbyehello
+
+ Not quite what you expected, eh? :-) The answer is that preprocessor
+ treats the %define construct as if it would be
+
+ %define __ %$abc goodbye
+
+ (note the white space between __ and %$abc). After my "fix" it
+ will "correctly" expand into
+
+ goodbye
+
+ as expected. Note that I use quotes around words "correct", "incorrect"
+ etc because this is rather a feature not a bug; however current behaviour
+ is more logical (and allows more advanced macro usage :-).
+
+ Same change was applied to:
+ %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine,
+ %assign,%iassign,%undef
+
+* A new directive [WARNING {+|-}warning-id] have been added. It works only
+ if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
+
+* A new warning type: macro-selfref. By default this warning is disabled;
+ when enabled NASM warns when a macro self-references itself; for example
+ the following source:
+
+ [WARNING macro-selfref]
+
+ %macro push 1-*
+ %rep %0
+ push %1
+ %rotate 1
+ %endrep
+ %endmacro
+
+ push eax,ebx,ecx
+
+ will produce a warning, but if we remove the first line we won't see it
+ anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
+ eats such constructs without warnings at all).
+
+* Added a "error" routine to preprocessor which always will set ERR_PASS1
+ bit in severity_code. This removes annoying repeated errors on first
+ and second passes from preprocessor.
+
+* Added the %+ operator in single-line macros for concatenating two
+ identifiers. Usage example:
+
+ %define _myfunc _otherfunc
+ %define cextern(x) _ %+ x
+ cextern (myfunc)
+
+ After first expansion, third line will become "_myfunc". After this
+ expansion is performed again so it becomes "_otherunc".
+
+* Now if preprocessor is in a non-emmitting state, no warning or error
+ will be emmitted. Example:
+
+ %if 1
+ mov eax,ebx
+ %else
+ put anything you want between these two brackets,
+ even macro-parameter references %1 or local labels %$zz
+ or macro-local labels %%zz - no warning will be emmitted.
+ %endif
+
+* Context-local variables on expansion as a last resort are looked up
+ in outer contexts. For example, the following piece:
+
+ %push outer
+ %define %$a [esp]
+
+ %push inner
+ %$a
+ %pop
+ %pop
+
+ will expand correctly the fourth line to [esp]; if we'll define another
+ %$a inside the "inner" context, it will take precedence over outer
+ definition. However, this modification has been applied only to
+ expand_smacro and not to smacro_define: as a consequence expansion
+ looks in outer contexts, but %ifdef won't look in outer contexts.
+
+ This behaviour is needed because we don't want nested contexts to
+ act on already defined local macros. Example:
+
+ %define %$arg1 [esp+4]
+ test eax,eax
+ if nz
+ mov eax,%$arg1
+ endif
+
+ In this example the "if" mmacro enters into the "if" context, so %$arg1
+ is not valid anymore inside "if". Of course it could be worked around
+ by using explicitely %$$arg1 but this is ugly IMHO.
+
+* Fixed memory leak in %undef. The origline wasn't freed before
+ exiting on success.
+
+* Fixed trap in preprocessor when line expanded to empty set of tokens.
+ This happens, for example, in the following case:
+
+ #define SOMETHING
+ SOMETHING
+
+
+0.98
+----
+
+All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
+
+* The documentation comment delimiter is \# not #.
+* Allow EQU definitions to refer to external labels; reported by
+ Pedro Gimeno.
+* Re-enable support for RDOFF v1; reported by Pedro Gimeno.
+* Updated License file per OK from Simon and Julian.
+
+
+0.98p9
+------
+
+* Update documentation (although the instruction set reference will
+ have to wait; I don't want to hold up the 0.98 release for it.)
+* Verified that the NASM implementation of the PEXTRW and PMOVMSKB
+ instructions is correct. The encoding differs from what the Intel
+ manuals document, but the Pentium III behaviour matches NASM, not
+ the Intel manuals.
+* Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
+ Stefan Hoffmeister.
+* Resurrect the -s option, which was removed when changing the
+ diagnostic output to stdout.
+
+
+0.98p8
+------
+
+* Fix for "DB" when NASM is running on a bigendian machine.
+* Invoke insns.pl once for each output script, making Makefile.in
+ legal for "make -j".
+* Improve the Unix configure-based makefiles to make package
+ creation easier.
+* Included an RPM .spec file for building RPM (RedHat Package Manager)
+ packages on Linux or Unix systems.
+* Fix Makefile dependency problems.
+* Change src/rdsrc.pl to include sectioning information in info
+ output; required for install-info to work.
+* Updated the RDOFF distribution to version 2 from Jules; minor
+ massaging to make it compile in my environment.
+* Split doc files that can be built by anyone with a Perl interpreter off
+ into a separate archive.
+* "Dress rehearsal" release!
+
+
+0.98p7
+------
+
+* Fixed opcodes with a third byte-sized immediate argument to not
+ complain if given "byte" on the immediate.
+* Allow %undef to remove single-line macros with arguments. This
+ matches the behaviour of #undef in the C preprocessor.
+* Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
+ compatibility with most C compilers and preprocessors. This allows
+ Makefile options to be shared between cc and nasm, for example.
+* Minor cleanups.
+* Went through the list of Katmai instructions and hopefully fixed the
+ (rather few) mistakes in it.
+* (Hopefully) fixed a number of disassembler bugs related to ambiguous
+ instructions (disambiguated by -p) and SSE instructions with REP.
+* Fix for bug reported by Mark Junger: "call dword 0x12345678" should
+ work and may add an OSP (affected CALL, JMP, Jcc).
+* Fix for environments when "stderr" isn't a compile-time constant.
+
+
+0.98p6
+------
+
+* Took officially over coordination of the 0.98 release; so drop
+ the p3.x notation. Skipped p4 and p5 to avoid confusion with John
+ Fine's J4 and J5 releases.
+* Update the documentation; however, it still doesn't include
+ documentation for the various new instructions. I somehow wonder if
+ it makes sense to have an instruction set reference in the assembler
+ manual when Intel et al have PDF versions of their manuals online.
+* Recognize "idt" or "centaur" for the -p option to ndisasm.
+* Changed error messages back to stderr where they belong, but add an
+ -E option to redirect them elsewhere (the DOS shell cannot redirect
+ stderr.)
+* -M option to generate Makefile dependencies (based on code from Alex
+ Verstak.)
+* %undef preprocessor directive, and -u option, that undefines a
+ single-line macro.
+* OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
+ Chuck Crayne.
+* Various minor bugfixes (reported by):
+ - Dangling %s in preproc.c (Martin Junker)
+* THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am
+ on a trip and didn't bring the Katmai instruction reference, so I
+ can't work on them right now.
+* Updated the License file per agreement with Simon and Jules to
+ include a GPL distribution clause.
+
+
+0.98p3.7
+--------
+
+* (Hopefully) fixed the canned Makefiles to include the outrdf2 and
+ zoutieee modules.
+* Renamed changes.asm to changed.asm.
+
+
+0.98p3.6
+--------
+
+* Fixed a bunch of instructions that were added in 0.98p3.5 which had
+ memory operands, and the address-size prefix was missing from the
+ instruction pattern.
+
+
+0.98p3.5
+--------
+
+* Merged in changes from John S. Fine's 0.98-J5 release. John's based
+ 0.98-J5 on my 0.98p3.3 release; this merges the changes.
+* Expanded the instructions flag field to a long so we can fit more
+ flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
+ such.
+* Fix the "PRIV" flag on a bunch of instructions, and create new
+ "PROT" flag for protected-mode-only instructions (orthogonal to if
+ the instruction is privileged!) and new "SMM" flag for SMM-only
+ instructions.
+* Added AMD-only SYSCALL and SYSRET instructions.
+* Make SSE actually work, and add new Katmai MMX instructions.
+* Added a -p (preferred vendor) option to ndisasm so that it can
+ distinguish e.g. Cyrix opcodes also used in SSE. For example:
+
+ ndisasm -p cyrix aliased.bin
+ 00000000 670F514310 paddsiw mm0,[ebx+0x10]
+ 00000005 670F514320 paddsiw mm0,[ebx+0x20]
+ ndisasm -p intel aliased.bin
+ 00000000 670F514310 sqrtps xmm0,[ebx+0x10]
+ 00000005 670F514320 sqrtps xmm0,[ebx+0x20]
+* Added a bunch of Cyrix-specific instructions.
+
+
+0.98p3.4
+--------
+
+* Made at least an attempt to modify all the additional Makefiles (in
+ the Mkfiles directory). I can't test it, but this was the best I
+ could do.
+* DOS DJGPP+"Opus Make" Makefile from John S. Fine.
+* changes.asm changes from John S. Fine.
+
+
+0.98p3.3
+--------
+
+* Patch from Conan Brink to allow nesting of %rep directives.
+* If we're going to allow INT01 as an alias for INT1/ICEBP (one of
+ Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
+ as well.
+* Updated changes.asm to include the latest changes.
+* Tried to clean up the <CR>s that had snuck in from a DOS/Windows
+ environment into my Unix environment, and try to make sure than
+ DOS/Windows users get them back.
+* We would silently generate broken tools if insns.dat wasn't sorted
+ properly. Change insns.pl so that the order doesn't matter.
+* Fix bug in insns.pl (introduced by me) which would cause conditional
+ instructions to have an extra "cc" in disassembly, e.g. "jnz"
+ disassembled as "jccnz".
+
+
+0.98p3.2
+--------
+
+* Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
+ http://www.csoft.net/cz/johnfine/
+* Changed previous "spotless" Makefile target (appropriate for distribution)
+ to "distclean", and added "cleaner" target which is same as "clean"
+ except deletes files generated by Perl scripts; "spotless" is union.
+* Removed BASIC programs from distribution. Get a Perl interpreter
+ instead (see below.)
+* Calling this "pre-release 3.2" rather than "p3-hpa2" because of
+ John's contributions.
+* Actually link in the IEEE output format (zoutieee.c); fix a bunch of
+ compiler warnings in that file. Note I don't know what IEEE output
+ is supposed to look like, so these changes were made "blind".
+
+
+0.98p3-hpa
+----------
+
+* Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
+ buildable version for Unix systems (Makefile.in updates, etc.)
+* Changed insns.pl to create the instruction tables in nasm.h and
+ names.c, so that a new instruction can be added by adding it *only*
+ to insns.dat.
+* Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
+ FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
+ guarantee will never be used; one of them is documented as UD2 in
+ Intel documentation, the other one just as "Undefined Opcode" --
+ calling it UD1 seemed to make sense.)
+* MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
+ characters long. Now MAX_SYMBOL is derived from insns.dat.
+* A note on the BASIC programs included: forget them. insns.bas is
+ already out of date. Get yourself a Perl interpreter for your
+ platform of choice at:
+
+ http://www.cpan.org/ports/index.html
+
+
+0.98 pre-release 3
+-------------------
+
+added response file support, improved command line handling, new layout
+help screen
+
+fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
+related bugs, updated Wishlist; 0.98 Prerelease 3.
+
+
+0.98 pre-release 2
+-------------------
+
+fixed bug in outcoff.c to do with truncating section names longer
+than 8 characters, referencing beyond end of string; 0.98 pre-release 2
+
+
+0.98 pre-released May 1999
+--------------------------
+
+Fixed a bug whereby STRUC didn't work at all in RDF.
+
+Fixed a problem with group specification in PUBDEFs in OBJ.
+
+Improved ease of adding new output formats. Contribution due to
+Fox Cutter.
+
+Fixed a bug in relocations in the `bin' format: was showing up when
+a relocatable reference crossed an 8192-byte boundary in any output
+section.
+
+Fixed a bug in local labels: local-label lookups were inconsistent
+between passes one and two if an EQU occurred between the definition
+of a global label and the subsequent use of a local label local to
+that global.
+
+Fixed a seg-fault in the preprocessor (again) which happened when
+you use a blank line as the first line of a multi-line macro
+definition and then defined a label on the same line as a call to
+that macro.
+
+Fixed a stale-pointer bug in the handling of the NASM environment
+variable. Thanks to Thomas McWilliams.
+
+ELF had a hard limit on the number of sections which caused
+segfaults when transgressed. Fixed.
+
+Added ability for ndisasm to read from stdin by using `-' as the
+filename.
+
+ndisasm wasn't outputting the TO keyword. Fixed.
+
+Fixed error cascade on bogus expression in %if - an error in
+evaluation was causing the entire %if to be discarded, thus creating
+trouble later when the %else or %endif was encountered.
+
+Forward reference tracking was instruction-granular not operand-
+granular, which was causing 286-specific code to be generated
+needlessly on code of the form `shr word [forwardref],1'. Thanks to
+Jim Hague for sending a patch.
+
+All messages now appear on stdout, as sending them to stderr serves
+no useful purpose other than to make redirection difficult.
+
+Fixed the problem with EQUs pointing to an external symbol - this
+now generates an error message.
+
+Allowed multiple size prefixes to an operand, of which only the first
+is taken into account.
+
+Incorporated John Fine's changes, including fixes of a large number
+of preprocessor bugs, some small problems in OBJ, and a reworking of
+label handling to define labels before their line is assembled, rather
+than after.
+
+Reformatted a lot of the source code to be more readable. Included
+'coding.txt' as a guideline for how to format code for contributors.
+
+Stopped nested %reps causing a panic - they now cause a slightly more
+friendly error message instead.
+
+Fixed floating point constant problems (patch by Pedro Gimeno)
+
+Fixed the return value of insn_size() not being checked for -1, indicating
+an error.
+
+Incorporated 3D now instructions.
+
+Fixed the 'mov eax, eax + ebx' bug.
+
+Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
+
+Incorporated John Fine's command line parsing changes
+
+Incorporated David Lindauer's OMF debug support
+
+Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
+specification warning when sizes agree).
+
+Released NASM 0.98 Pre-release 1
+
+
+0.97 released December 1997
+---------------------------
+
+This was entirely a bug-fix release to 0.96, which seems to have got
+cursed. Silly me.
+
+Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
+fail. Caused by an error in the `MOV EAX,<segment>' support.
+
+ndisasm hung at EOF when compiled with lcc on Linux because lcc on
+Linux somehow breaks feof(). ndisasm now does not rely on feof().
+
+A heading in the documentation was missing due to a markup error in
+the indexing. Fixed.
+
+Fixed failure to update all pointers on realloc() within extended-
+operand code in parser.c. Was causing wrong behaviour and seg faults
+on lines such as `dd 0.0,0.0,0.0,0.0,...'
+
+Fixed a subtle preprocessor bug whereby invoking one multi-line
+macro on the first line of the expansion of another, when the second
+had been invoked with a label defined before it, didn't expand the
+inner macro.
+
+Added internal.doc back in to the distribution archives - it was
+missing in 0.96 *blush*
+
+Fixed bug causing 0.96 to be unable to assemble its own test files,
+specifically objtest.asm. *blush again*
+
+Fixed seg-faults and bogus error messages caused by mismatching
+%rep and %endrep within multi-line macro definitions.
+
+Fixed a problem with buffer overrun in OBJ, which was causing
+corruption at ends of long PUBDEF records.
+
+Separated DOS archives into main-program and documentation to reduce
+download size.
+
+
+0.96 released November 1997
+---------------------------
+
+Fixed a bug whereby, if `nasm sourcefile' would cause a filename
+collision warning and put output into `nasm.out', then `nasm
+sourcefile -o outputfile' still gave the warning even though the
+`-o' was honoured.
+
+Fixed name pollution under Digital UNIX: one of its header files
+defined R_SP, which broke the enum in nasm.h.
+
+Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
+two-operand forms; NDISASM didn't recognise the longer register
+forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
+flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
+size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
+undocumented because the Intel Architecture reference documents
+them.
+
+Fixed a problem with the local-label mechanism, whereby strange
+types of symbol (EQUs, auto-defined OBJ segment base symbols)
+interfered with the `previous global label' value and screwed up
+local labels.
+
+Fixed a bug whereby the stub preprocessor didn't communicate with
+the listing file generator, so that the -a and -l options in
+conjunction would produce a useless listing file.
+
+Merged `os2' object file format back into `obj', after discovering
+that `obj' _also_ shouldn't have a link pass separator in a module
+containing a non-trivial MODEND. Flat segments are now declared
+using the FLAT attribute. `os2' is no longer a valid object format
+name: use `obj'.
+
+Removed the fixed-size temporary storage in the evaluator. Very very
+long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
+so) should now no longer crash NASM.
+
+Fixed a bug involving segfaults on disassembly of MMX instructions,
+by changing the meaning of one of the operand-type flags in nasm.h.
+This may cause other apparently unrelated MMX problems; it needs to
+be tested thoroughly.
+
+Fixed some buffer overrun problems with large OBJ output files.
+Thanks to DJ Delorie for the bug report and fix.
+
+Made preprocess-only mode actually listen to the %line markers as it
+prints them, so that it can report errors more sanely.
+
+Re-designed the evaluator to keep more sensible track of expressions
+involving forward references: can now cope with previously-nightmare
+situations such as
+ mov ax,foo | bar
+ foo equ 1
+ bar equ 2
+
+Added the ALIGN and ALIGNB standard macros.
+
+Added PIC support in ELF: use of WRT to obtain the four extra
+relocation types needed.
+
+Added the ability for output file formats to define their own
+extensions to the GLOBAL, COMMON and EXTERN directives.
+
+Implemented common-variable alignment, and global-symbol type and
+size declarations, in ELF.
+
+Implemented NEAR and FAR keywords for common variables, plus
+far-common element size specification, in OBJ.
+
+Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
+default WRT specification (either a segment or a group).
+
+Transformed the Unix NASM archive into an auto-configuring package.
+
+Added a sanity-check for people applying SEG to things which are
+already segment bases: this previously went unnoticed by the SEG
+processing and caused OBJ-driver panics later.
+
+Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
+type references: OBJ doesn't directly support dword-size segment
+base fixups, but as long as the low two bytes of the constant term
+are zero, a word-size fixup can be generated instead and it will
+work.
+
+Added the ability to specify sections' alignment requirements in
+Win32 object files and pure binary files.
+
+Added preprocess-time expression evaluation: the %assign (and
+%iassign) directive and the bare %if (and %elif) conditional. Added
+relational operators to the evaluator, for use only in %if
+constructs: the standard relationals = < > <= >= <> (and C-like
+synonyms == and !=) plus low-precedence logical operators &&, ^^ and
+||.
+
+Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
+
+Added the __FILE__ and __LINE__ standard macros.
+
+Added a sanity check for number constants being greater than
+0xFFFFFFFF. The warning can be disabled.
+
+Added the %0 token whereby a variadic multi-line macro can tell how
+many parameters it's been given in a specific invocation.
+
+Added %rotate, allowing multi-line macro parameters to be cycled.
+
+Added the `*' option for the maximum parameter count on multi-line
+macros, allowing them to take arbitrarily many parameters.
+
+Added the ability for the user-level forms of EXTERN, GLOBAL and
+COMMON to take more than one argument.
+
+Added the IMPORT and EXPORT directives in OBJ format, to deal with
+Windows DLLs.
+
+Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
+textual identity), and %ifid / %ifnum / %ifstr (token type testing).
+
+Added the ability to distinguish SHL AX,1 (the 8086 version) from
+SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
+be 1).
+
+Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
+with PIC shared library features.
+
+Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
+FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
+otherwise accepted standard. The previous behaviour, though it was a
+deliberate feature, was a deliberate feature based on a
+misunderstanding. Apologies for the inconvenience.
+
+Improved the flexibility of ABSOLUTE: you can now give it an
+expression rather than being restricted to a constant, and it can
+take relocatable arguments as well.
+
+Added the ability for a variable to be declared as EXTERN multiple
+times, and the subsequent definitions are just ignored.
+
+We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
+alone on a line (without a following instruction).
+
+Improved sanity checks on whether the arguments to EXTERN, GLOBAL
+and COMMON are valid identifiers.
+
+Added misc/exebin.mac to allow direct generation of .EXE files by
+hacking up an EXE header using DB and DW; also added test/binexe.asm
+to demonstrate the use of this. Thanks to Yann Guidon for
+contributing the EXE header code.
+
+ndisasm forgot to check whether the input file had been successfully
+opened. Now it does. Doh!
+
+Added the Cyrix extensions to the MMX instruction set.
+
+Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
+assembled differently. This is important since [ESI+EBP] and
+[EBP+ESI] have different default base segment registers.
+
+Added support for the PharLap OMF extension for 4096-byte segment
+alignment.
+
+
+0.95 released July 1997
+-----------------------
+
+Fixed yet another ELF bug. This one manifested if the user relied on
+the default segment, and attempted to define global symbols without
+first explicitly declaring the target segment.
+
+Added makefiles (for NASM and the RDF tools) to build Win32 console
+apps under Symantec C++. Donated by Mark Junker.
+
+Added `macros.bas' and `insns.bas', QBasic versions of the Perl
+scripts that convert `standard.mac' to `macros.c' and convert
+`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
+Junker.
+
+Changed the diassembled forms of the conditional instructions so
+that JB is now emitted as JC, and other similar changes. Suggested
+list by Ulrich Doewich.
+
+Added `@' to the list of valid characters to begin an identifier
+with.
+
+Documentary changes, notably the addition of the `Common Problems'
+section in nasm.doc.
+
+Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
+
+Fixed a bug in perm_copy() in labels.c which was causing exceptions
+in cleanup_labels() on some systems.
+
+Positivity sanity check in TIMES argument changed from a warning to
+an error following a further complaint.
+
+Changed the acceptable limits on byte and word operands to allow
+things like `~10111001b' to work.
+
+Fixed a major problem in the preprocessor which caused seg-faults if
+macro definitions contained blank lines or comment-only lines.
+
+Fixed inadequate error checking on the commas separating the
+arguments to `db', `dw' etc.
+
+Fixed a crippling bug in the handling of macros with operand counts
+defined with a `+' modifier.
+
+Fixed a bug whereby object file formats which stored the input file
+name in the output file (such as OBJ and COFF) weren't doing so
+correctly when the output file name was specified on the command
+line.
+
+Removed [INC] and [INCLUDE] support for good, since they were
+obsolete anyway.
+
+Fixed a bug in OBJ which caused all fixups to be output in 16-bit
+(old-format) FIXUPP records, rather than putting the 32-bit ones in
+FIXUPP32 (new-format) records.
+
+Added, tentatively, OS/2 object file support (as a minor variant on
+OBJ).
+
+Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
+
+Removed a spurious second fclose() on the output file.
+
+Added the `-s' command line option to redirect all messages which
+would go to stderr (errors, help text) to stdout instead.
+
+Added the `-w' command line option to selectively suppress some
+classes of assembly warning messages.
+
+Added the `-p' pre-include and `-d' pre-define command-line options.
+
+Added an include file search path: the `-i' command line option.
+
+Fixed a silly little preprocessor bug whereby starting a line with a
+`%!' environment-variable reference caused an `unknown directive'
+error.
+
+Added the long-awaited listing file support: the `-l' command line
+option.
+
+Fixed a problem with OBJ format whereby, in the absence of any
+explicit segment definition, non-global symbols declared in the
+implicit default segment generated spurious EXTDEF records in the
+output.
+
+Added the NASM environment variable.
+
+From this version forward, Win32 console-mode binaries will be
+included in the DOS distribution in addition to the 16-bit binaries.
+Added Makefile.vc for this purpose.
+
+Added `return 0;' to test/objlink.c to prevent compiler warnings.
+
+Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
+
+Added an alternative memory-reference syntax in which prefixing an
+operand with `&' is equivalent to enclosing it in square brackets,
+at the request of Fox Cutter.
+
+Errors in pass two now cause the program to return a non-zero error
+code, which they didn't before.
+
+Fixed the single-line macro cycle detection, which didn't work at
+all on macros with no parameters (caused an infinite loop). Also
+changed the behaviour of single-line macro cycle detection to work
+like cpp, so that macros like `extrn' as given in the documentation
+can be implemented.
+
+Fixed the implementation of WRT, which was too restrictive in that
+you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
+a relocatable reference.
+
+
+0.94 released April 1997
+------------------------
+
+Major item: added the macro processor.
+
+Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
+reorganised CMPXCHG instruction into early-486 and Pentium forms.
+Thanks to Thobias Jones for the information.
+
+Fixed two more stupid bugs in ELF, which were causing `ld' to
+continue to seg-fault in a lot of non-trivial cases.
+
+Fixed a seg-fault in the label manager.
+
+Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
+the only option for BCD loads/stores in any case.
+
+Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
+anyone bothers to provide it. Previously they complained unless no
+keyword at all was present.
+
+Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
+vestige of a bug that I thought had been fixed in 0.92. This was
+fixed, hopefully for good this time...
+
+Another minor phase error (insofar as a phase error can _ever_ be
+minor) fixed, this one occurring in code of the form
+ rol ax,forward_reference
+ forward_reference equ 1
+
+The number supplied to TIMES is now sanity-checked for positivity,
+and also may be greater than 64K (which previously didn't work on
+16-bit systems).
+
+Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
+
+Added the INCBIN pseudo-opcode.
+
+Due to the advent of the preprocessor, the [INCLUDE] and [INC]
+directives have become obsolete. They are still supported in this
+version, with a warning, but won't be in the next.
+
+Fixed a bug in OBJ format, which caused incorrect object records to
+be output when absolute labels were made global.
+
+Updates to RDOFF subdirectory, and changes to outrdf.c.
+
+
+0.93 released January 1997
+--------------------------
+
+This release went out in a great hurry after semi-crippling bugs
+were found in 0.92.
+
+Really _did_ fix the stack overflows this time. *blush*
+
+Had problems with EA instruction sizes changing between passes, when
+an offset contained a forward reference and so 4 bytes were
+allocated for the offset in pass one; by pass two the symbol had
+been defined and happened to be a small absolute value, so only 1
+byte got allocated, causing instruction size mismatch between passes
+and hence incorrect address calculations. Fixed.
+
+Stupid bug in the revised ELF section generation fixed (associated
+string-table section for .symtab was hard-coded as 7, even when this
+didn't fit with the real section table). Was causing `ld' to
+seg-fault under Linux.
+
+Included a new Borland C makefile, Makefile.bc2, donated by Fox
+Cutter <lmb@comtch.iea.com>.
+
+
+0.92 released January 1997
+--------------------------
+
+The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
+fixed. This also affected the LCC driver.
+
+Fixed a bug regarding 32-bit effective addresses of the form
+[other_register+ESP].
+
+Documentary changes, notably documentation of the fact that Borland
+Win32 compilers use `obj' rather than `win32' object format.
+
+Fixed the COMENT record in OBJ files, which was formatted
+incorrectly.
+
+Fixed a bug causing segfaults in large RDF files.
+
+OBJ format now strips initial periods from segment and group
+definitions, in order to avoid complications with the local label
+syntax.
+
+Fixed a bug in disassembling far calls and jumps in NDISASM.
+
+Added support for user-defined sections in COFF and ELF files.
+
+Compiled the DOS binaries with a sensible amount of stack, to
+prevent stack overflows on any arithmetic expression containing
+parentheses.
+
+Fixed a bug in handling of files that do not terminate in a newline.
+
+
+0.91 released November 1996
+---------------------------
+
+Loads of bug fixes.
+Support for RDF added.
+Support for DBG debugging format added.
+Support for 32-bit extensions to Microsoft OBJ format added.
+Revised for Borland C: some variable names changed, makefile added.
+LCC support revised to actually work.
+JMP/CALL NEAR/FAR notation added.
+`a16', `o16', `a32' and `o32' prefixes added.
+Range checking on short jumps implemented.
+MMX instruction support added.
+Negative floating point constant support added.
+Memory handling improved to bypass 64K barrier under DOS.
+$ prefix to force treatment of reserved words as identifiers added.
+Default-size mechanism for object formats added.
+Compile-time configurability added.
+`#', `@', `~' and `?' are now valid characters in labels.
+`-e' and `-k' options in NDISASM added.
+
+
+0.90 released October 1996
+--------------------------
+
+First release version. First support for object file output. Other
+changes from previous version (0.3x) too numerous to document.
diff --git a/COPYING b/COPYING
index 60549be5..82de29fb 100644
--- a/COPYING
+++ b/COPYING
@@ -1,221 +1,400 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
- a) You must cause the modified files to carry prominent notices
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
+identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
+on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
+entire whole, and thus to each and every part regardless of who wrote
+it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
-collective works based on the Program.
+collective works based on the Library.
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
+distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
+the Library or works based on it.
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+You are not responsible for enforcing compliance by third parties with
this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
+refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
+apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
+integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
@@ -225,116 +404,59 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
+
+ 12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
diff --git a/ChangeLog b/ChangeLog
index 13f7c282..649574db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,21 @@
-2002-04-11 Stanislav Karchebny <berk@madfire.net>
+2002-04-29 Stanislav Karchebny <madfire@users.sourceforge.net>
+
+ * (Makefile.in): added 'strip' target to strip debug info.
+ * (INSTALL): added INSTALL file.
+ * (nasm.1): added -v option description.
+
+
+2002-04-29 Frank Kotler <fbkotler@users.sourceforge.net>
+
+ * (parser.c): fixed INCBIN bug reported by Rebel.
+
+
+2002-04-11 Stanislav Karchebny <madfire@users.sourceforge.net>
+
+ * Started ChangeLog for recording per-file changes in the project.
+ We could get away without ChangeLog at all (use CVS logs), but we
+ lose CVS so often its better to have log glued to the sources =)
+ You should record changes in CHANGES also, not for every change
+ but rather when making a release.
- * Started ChangeLog instead of Changes. ChangeLog is better because all recent changes
- are on top of the file, easy for inspection.
- Old entries from doc/Changes will eventually be added here.
diff --git a/Changes b/Changes
deleted file mode 100644
index f383182e..00000000
--- a/Changes
+++ /dev/null
@@ -1,542 +0,0 @@
-Change log for NASM
-===================
-
-This is the Changelog for the official releases; this is a modified
-version. For the changes from the official release, see the MODIFIED file.
-
-0.90 released October 1996
---------------------------
-
-First release version. First support for object file output. Other
-changes from previous version (0.3x) too numerous to document.
-
-0.91 released November 1996
----------------------------
-
-Loads of bug fixes.
-Support for RDF added.
-Support for DBG debugging format added.
-Support for 32-bit extensions to Microsoft OBJ format added.
-Revised for Borland C: some variable names changed, makefile added.
-LCC support revised to actually work.
-JMP/CALL NEAR/FAR notation added.
-`a16', `o16', `a32' and `o32' prefixes added.
-Range checking on short jumps implemented.
-MMX instruction support added.
-Negative floating point constant support added.
-Memory handling improved to bypass 64K barrier under DOS.
-$ prefix to force treatment of reserved words as identifiers added.
-Default-size mechanism for object formats added.
-Compile-time configurability added.
-`#', `@', `~' and `?' are now valid characters in labels.
-`-e' and `-k' options in NDISASM added.
-
-0.92 released January 1997
---------------------------
-
-The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
-fixed. This also affected the LCC driver.
-
-Fixed a bug regarding 32-bit effective addresses of the form
-[other_register+ESP].
-
-Documentary changes, notably documentation of the fact that Borland
-Win32 compilers use `obj' rather than `win32' object format.
-
-Fixed the COMENT record in OBJ files, which was formatted
-incorrectly.
-
-Fixed a bug causing segfaults in large RDF files.
-
-OBJ format now strips initial periods from segment and group
-definitions, in order to avoid complications with the local label
-syntax.
-
-Fixed a bug in disassembling far calls and jumps in NDISASM.
-
-Added support for user-defined sections in COFF and ELF files.
-
-Compiled the DOS binaries with a sensible amount of stack, to
-prevent stack overflows on any arithmetic expression containing
-parentheses.
-
-Fixed a bug in handling of files that do not terminate in a newline.
-
-0.93 released January 1997
---------------------------
-
-This release went out in a great hurry after semi-crippling bugs
-were found in 0.92.
-
-Really _did_ fix the stack overflows this time. *blush*
-
-Had problems with EA instruction sizes changing between passes, when
-an offset contained a forward reference and so 4 bytes were
-allocated for the offset in pass one; by pass two the symbol had
-been defined and happened to be a small absolute value, so only 1
-byte got allocated, causing instruction size mismatch between passes
-and hence incorrect address calculations. Fixed.
-
-Stupid bug in the revised ELF section generation fixed (associated
-string-table section for .symtab was hard-coded as 7, even when this
-didn't fit with the real section table). Was causing `ld' to
-seg-fault under Linux.
-
-Included a new Borland C makefile, Makefile.bc2, donated by Fox
-Cutter <lmb@comtch.iea.com>.
-
-0.94 released April 1997
-------------------------
-
-Major item: added the macro processor.
-
-Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
-reorganised CMPXCHG instruction into early-486 and Pentium forms.
-Thanks to Thobias Jones for the information.
-
-Fixed two more stupid bugs in ELF, which were causing `ld' to
-continue to seg-fault in a lot of non-trivial cases.
-
-Fixed a seg-fault in the label manager.
-
-Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
-the only option for BCD loads/stores in any case.
-
-Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
-anyone bothers to provide it. Previously they complained unless no
-keyword at all was present.
-
-Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
-vestige of a bug that I thought had been fixed in 0.92. This was
-fixed, hopefully for good this time...
-
-Another minor phase error (insofar as a phase error can _ever_ be
-minor) fixed, this one occurring in code of the form
- rol ax,forward_reference
- forward_reference equ 1
-
-The number supplied to TIMES is now sanity-checked for positivity,
-and also may be greater than 64K (which previously didn't work on
-16-bit systems).
-
-Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
-
-Added the INCBIN pseudo-opcode.
-
-Due to the advent of the preprocessor, the [INCLUDE] and [INC]
-directives have become obsolete. They are still supported in this
-version, with a warning, but won't be in the next.
-
-Fixed a bug in OBJ format, which caused incorrect object records to
-be output when absolute labels were made global.
-
-Updates to RDOFF subdirectory, and changes to outrdf.c.
-
-0.95 released July 1997
------------------------
-
-Fixed yet another ELF bug. This one manifested if the user relied on
-the default segment, and attempted to define global symbols without
-first explicitly declaring the target segment.
-
-Added makefiles (for NASM and the RDF tools) to build Win32 console
-apps under Symantec C++. Donated by Mark Junker.
-
-Added `macros.bas' and `insns.bas', QBasic versions of the Perl
-scripts that convert `standard.mac' to `macros.c' and convert
-`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
-Junker.
-
-Changed the diassembled forms of the conditional instructions so
-that JB is now emitted as JC, and other similar changes. Suggested
-list by Ulrich Doewich.
-
-Added `@' to the list of valid characters to begin an identifier
-with.
-
-Documentary changes, notably the addition of the `Common Problems'
-section in nasm.doc.
-
-Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
-
-Fixed a bug in perm_copy() in labels.c which was causing exceptions
-in cleanup_labels() on some systems.
-
-Positivity sanity check in TIMES argument changed from a warning to
-an error following a further complaint.
-
-Changed the acceptable limits on byte and word operands to allow
-things like `~10111001b' to work.
-
-Fixed a major problem in the preprocessor which caused seg-faults if
-macro definitions contained blank lines or comment-only lines.
-
-Fixed inadequate error checking on the commas separating the
-arguments to `db', `dw' etc.
-
-Fixed a crippling bug in the handling of macros with operand counts
-defined with a `+' modifier.
-
-Fixed a bug whereby object file formats which stored the input file
-name in the output file (such as OBJ and COFF) weren't doing so
-correctly when the output file name was specified on the command
-line.
-
-Removed [INC] and [INCLUDE] support for good, since they were
-obsolete anyway.
-
-Fixed a bug in OBJ which caused all fixups to be output in 16-bit
-(old-format) FIXUPP records, rather than putting the 32-bit ones in
-FIXUPP32 (new-format) records.
-
-Added, tentatively, OS/2 object file support (as a minor variant on
-OBJ).
-
-Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
-
-Removed a spurious second fclose() on the output file.
-
-Added the `-s' command line option to redirect all messages which
-would go to stderr (errors, help text) to stdout instead.
-
-Added the `-w' command line option to selectively suppress some
-classes of assembly warning messages.
-
-Added the `-p' pre-include and `-d' pre-define command-line options.
-
-Added an include file search path: the `-i' command line option.
-
-Fixed a silly little preprocessor bug whereby starting a line with a
-`%!' environment-variable reference caused an `unknown directive'
-error.
-
-Added the long-awaited listing file support: the `-l' command line
-option.
-
-Fixed a problem with OBJ format whereby, in the absence of any
-explicit segment definition, non-global symbols declared in the
-implicit default segment generated spurious EXTDEF records in the
-output.
-
-Added the NASM environment variable.
-
-From this version forward, Win32 console-mode binaries will be
-included in the DOS distribution in addition to the 16-bit binaries.
-Added Makefile.vc for this purpose.
-
-Added `return 0;' to test/objlink.c to prevent compiler warnings.
-
-Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
-
-Added an alternative memory-reference syntax in which prefixing an
-operand with `&' is equivalent to enclosing it in square brackets,
-at the request of Fox Cutter.
-
-Errors in pass two now cause the program to return a non-zero error
-code, which they didn't before.
-
-Fixed the single-line macro cycle detection, which didn't work at
-all on macros with no parameters (caused an infinite loop). Also
-changed the behaviour of single-line macro cycle detection to work
-like cpp, so that macros like `extrn' as given in the documentation
-can be implemented.
-
-Fixed the implementation of WRT, which was too restrictive in that
-you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
-a relocatable reference.
-
-0.96 released November 1997
----------------------------
-
-Fixed a bug whereby, if `nasm sourcefile' would cause a filename
-collision warning and put output into `nasm.out', then `nasm
-sourcefile -o outputfile' still gave the warning even though the
-`-o' was honoured.
-
-Fixed name pollution under Digital UNIX: one of its header files
-defined R_SP, which broke the enum in nasm.h.
-
-Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
-two-operand forms; NDISASM didn't recognise the longer register
-forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
-flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
-size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
-undocumented because the Intel Architecture reference documents
-them.
-
-Fixed a problem with the local-label mechanism, whereby strange
-types of symbol (EQUs, auto-defined OBJ segment base symbols)
-interfered with the `previous global label' value and screwed up
-local labels.
-
-Fixed a bug whereby the stub preprocessor didn't communicate with
-the listing file generator, so that the -a and -l options in
-conjunction would produce a useless listing file.
-
-Merged `os2' object file format back into `obj', after discovering
-that `obj' _also_ shouldn't have a link pass separator in a module
-containing a non-trivial MODEND. Flat segments are now declared
-using the FLAT attribute. `os2' is no longer a valid object format
-name: use `obj'.
-
-Removed the fixed-size temporary storage in the evaluator. Very very
-long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
-so) should now no longer crash NASM.
-
-Fixed a bug involving segfaults on disassembly of MMX instructions,
-by changing the meaning of one of the operand-type flags in nasm.h.
-This may cause other apparently unrelated MMX problems; it needs to
-be tested thoroughly.
-
-Fixed some buffer overrun problems with large OBJ output files.
-Thanks to DJ Delorie for the bug report and fix.
-
-Made preprocess-only mode actually listen to the %line markers as it
-prints them, so that it can report errors more sanely.
-
-Re-designed the evaluator to keep more sensible track of expressions
-involving forward references: can now cope with previously-nightmare
-situations such as
- mov ax,foo | bar
- foo equ 1
- bar equ 2
-
-Added the ALIGN and ALIGNB standard macros.
-
-Added PIC support in ELF: use of WRT to obtain the four extra
-relocation types needed.
-
-Added the ability for output file formats to define their own
-extensions to the GLOBAL, COMMON and EXTERN directives.
-
-Implemented common-variable alignment, and global-symbol type and
-size declarations, in ELF.
-
-Implemented NEAR and FAR keywords for common variables, plus
-far-common element size specification, in OBJ.
-
-Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
-default WRT specification (either a segment or a group).
-
-Transformed the Unix NASM archive into an auto-configuring package.
-
-Added a sanity-check for people applying SEG to things which are
-already segment bases: this previously went unnoticed by the SEG
-processing and caused OBJ-driver panics later.
-
-Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
-type references: OBJ doesn't directly support dword-size segment
-base fixups, but as long as the low two bytes of the constant term
-are zero, a word-size fixup can be generated instead and it will
-work.
-
-Added the ability to specify sections' alignment requirements in
-Win32 object files and pure binary files.
-
-Added preprocess-time expression evaluation: the %assign (and
-%iassign) directive and the bare %if (and %elif) conditional. Added
-relational operators to the evaluator, for use only in %if
-constructs: the standard relationals = < > <= >= <> (and C-like
-synonyms == and !=) plus low-precedence logical operators &&, ^^ and
-||.
-
-Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
-
-Added the __FILE__ and __LINE__ standard macros.
-
-Added a sanity check for number constants being greater than
-0xFFFFFFFF. The warning can be disabled.
-
-Added the %0 token whereby a variadic multi-line macro can tell how
-many parameters it's been given in a specific invocation.
-
-Added %rotate, allowing multi-line macro parameters to be cycled.
-
-Added the `*' option for the maximum parameter count on multi-line
-macros, allowing them to take arbitrarily many parameters.
-
-Added the ability for the user-level forms of EXTERN, GLOBAL and
-COMMON to take more than one argument.
-
-Added the IMPORT and EXPORT directives in OBJ format, to deal with
-Windows DLLs.
-
-Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
-textual identity), and %ifid / %ifnum / %ifstr (token type testing).
-
-Added the ability to distinguish SHL AX,1 (the 8086 version) from
-SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
-be 1).
-
-Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
-with PIC shared library features.
-
-Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
-FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
-otherwise accepted standard. The previous behaviour, though it was a
-deliberate feature, was a deliberate feature based on a
-misunderstanding. Apologies for the inconvenience.
-
-Improved the flexibility of ABSOLUTE: you can now give it an
-expression rather than being restricted to a constant, and it can
-take relocatable arguments as well.
-
-Added the ability for a variable to be declared as EXTERN multiple
-times, and the subsequent definitions are just ignored.
-
-We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
-alone on a line (without a following instruction).
-
-Improved sanity checks on whether the arguments to EXTERN, GLOBAL
-and COMMON are valid identifiers.
-
-Added misc/exebin.mac to allow direct generation of .EXE files by
-hacking up an EXE header using DB and DW; also added test/binexe.asm
-to demonstrate the use of this. Thanks to Yann Guidon for
-contributing the EXE header code.
-
-ndisasm forgot to check whether the input file had been successfully
-opened. Now it does. Doh!
-
-Added the Cyrix extensions to the MMX instruction set.
-
-Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
-assembled differently. This is important since [ESI+EBP] and
-[EBP+ESI] have different default base segment registers.
-
-Added support for the PharLap OMF extension for 4096-byte segment
-alignment.
-
-0.97 released December 1997
----------------------------
-
-This was entirely a bug-fix release to 0.96, which seems to have got
-cursed. Silly me.
-
-Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
-fail. Caused by an error in the `MOV EAX,<segment>' support.
-
-ndisasm hung at EOF when compiled with lcc on Linux because lcc on
-Linux somehow breaks feof(). ndisasm now does not rely on feof().
-
-A heading in the documentation was missing due to a markup error in
-the indexing. Fixed.
-
-Fixed failure to update all pointers on realloc() within extended-
-operand code in parser.c. Was causing wrong behaviour and seg faults
-on lines such as `dd 0.0,0.0,0.0,0.0,...'
-
-Fixed a subtle preprocessor bug whereby invoking one multi-line
-macro on the first line of the expansion of another, when the second
-had been invoked with a label defined before it, didn't expand the
-inner macro.
-
-Added internal.doc back in to the distribution archives - it was
-missing in 0.96 *blush*
-
-Fixed bug causing 0.96 to be unable to assemble its own test files,
-specifically objtest.asm. *blush again*
-
-Fixed seg-faults and bogus error messages caused by mismatching
-%rep and %endrep within multi-line macro definitions.
-
-Fixed a problem with buffer overrun in OBJ, which was causing
-corruption at ends of long PUBDEF records.
-
-Separated DOS archives into main-program and documentation to reduce
-download size.
-
-0.98 released May 1999
-----------------------
-
-Fixed a bug whereby STRUC didn't work at all in RDF.
-
-Fixed a problem with group specification in PUBDEFs in OBJ.
-
-Improved ease of adding new output formats. Contribution due to
-Fox Cutter.
-
-Fixed a bug in relocations in the `bin' format: was showing up when
-a relocatable reference crossed an 8192-byte boundary in any output
-section.
-
-Fixed a bug in local labels: local-label lookups were inconsistent
-between passes one and two if an EQU occurred between the definition
-of a global label and the subsequent use of a local label local to
-that global.
-
-Fixed a seg-fault in the preprocessor (again) which happened when
-you use a blank line as the first line of a multi-line macro
-definition and then defined a label on the same line as a call to
-that macro.
-
-Fixed a stale-pointer bug in the handling of the NASM environment
-variable. Thanks to Thomas McWilliams.
-
-ELF had a hard limit on the number of sections which caused
-segfaults when transgressed. Fixed.
-
-Added ability for ndisasm to read from stdin by using `-' as the
-filename.
-
-ndisasm wasn't outputting the TO keyword. Fixed.
-
-Fixed error cascade on bogus expression in %if - an error in
-evaluation was causing the entire %if to be discarded, thus creating
-trouble later when the %else or %endif was encountered.
-
-Forward reference tracking was instruction-granular not operand-
-granular, which was causing 286-specific code to be generated
-needlessly on code of the form `shr word [forwardref],1'. Thanks to
-Jim Hague for sending a patch.
-
-All messages now appear on stdout, as sending them to stderr serves
-no useful purpose other than to make redirection difficult.
-
-Fixed the problem with EQUs pointing to an external symbol - this
-now generates an error message.
-
-Allowed multiple size prefixes to an operand, of which only the first
-is taken into account.
-
-Incorporated John Fine's changes, including fixes of a large number
-of preprocessor bugs, some small problems in OBJ, and a reworking of
-label handling to define labels before their line is assembled, rather
-than after.
-
-Reformatted a lot of the source code to be more readable. Included
-'coding.txt' as a guideline for how to format code for contributors.
-
-Stopped nested %reps causing a panic - they now cause a slightly more
-friendly error message instead.
-
-Fixed floating point constant problems (patch by Pedro Gimeno)
-
-Fixed the return value of insn_size() not being checked for -1, indicating
-an error.
-
-Incorporated 3D now instructions.
-
-Fixed the 'mov eax, eax + ebx' bug.
-
-Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
-
-Incorporated John Fine's command line parsing changes
-
-Incorporated David Lindauer's OMF debug support
-
-Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
-specification warning when sizes agree).
-
-Released NASM 0.98 Pre-release 1
-
-fixed bug in outcoff.c to do with truncating section names longer
-than 8 characters, referencing beyond end of string; 0.98 pre-release 2
-
-added response file support, improved command line handling, new layout
-help screen
-
-fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
-related bugs, updated Wishlist; 0.98 Prerelease 3.
-
-See the file "MODIFIED" for changes after 0.98p3.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..2d77e3a3
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,59 @@
+
+Installing nasm from source
+===========================
+
+Installing nasm is pretty straightforward on UN*X systems with GNU tools installed.
+
+If you checked out source from CVS you will need to run autoconf to generate configure,
+otherwise you don't have to.
+
+$ autoconf
+
+Then run configure to detect your platform settings and generate makefiles.
+
+$ ./configure
+
+You can get information about available configuration options by running `./configure --help`.
+
+If configure fails, please send bug report with detailed platform information to
+<nasm-bugs@lists.sourceforge.net> and we will try to help you asap!
+
+If everything went okay, type
+
+$ make
+
+to build nasm, ndisasm and rdoff tools
+or
+
+$ make everything
+
+to build the former plus the docs.
+
+You can decrease the size of produces executables by stripping off unnecessary information, to
+achieve this run
+
+$ make strip
+
+If you install to a system-wide location you might need to become root:
+$ su
+<enter root password>
+
+then
+
+$ make install
+
+optionally followed by
+
+$ make install_rdf
+
+Or you can
+
+$ make install_everything
+
+to install everything =)
+
+
+Thats it, enjoy!
+
+PS. Installation instructions for other platforms are underway.
+
diff --git a/License b/License
deleted file mode 100644
index c85c212e..00000000
--- a/License
+++ /dev/null
@@ -1,119 +0,0 @@
-
-Terms and Conditions for the use of the Netwide Assembler
-=========================================================
-
-Can I have the gist without reading the legalese?
--------------------------------------------------
-
-Basically, NASM is free. You can't charge for it. You can copy it as
-much as you like. You can incorporate it, or bits of it, into other
-free programs if you want. (But we want to know about it if you do,
-and we want to be mentioned in the credits.) We may well allow you
-to incorporate it into commercial software too, but we'll probably
-demand some money for it, and we'll certainly demand to be given
-credit. And in extreme cases (although I can't immediately think of
-a reason we might actually want to do this) we may refuse to let you
-do it at all.
-
-NASM LICENCE AGREEMENT
-======================
-
-By "the Software" this licence refers to the complete contents of
-the NASM archive, excluding this licence document itself, and
-excluding the contents of the `test' directory. The Netwide
-Disassembler, NDISASM, is specifically included under this licence.
-
-I. The Software is freely redistributable; anyone may copy the
-Software, or parts of the Software, and give away as many copies as
-they like to anyone, as long as this licence document is kept with
-the Software. Charging a fee for the Software is prohibited,
-although a fee may be charged for the act of transferring a copy,
-and you can offer warranty protection and charge a fee for that.
-
-II. The Software, or parts thereof, may be incorporated into other
-freely redistributable software (by which we mean software that may
-be obtained free of charge) without requiring permission from the
-authors, as long as due credit is given to the authors of the
-Software in the resulting work, as long as the authors are informed
-of this action if possible, and as long as those parts of the
-Software that are used remain under this licence.
-
-III. Modified forms of the Software may be created and distributed
-as long as the authors are informed of this action if possible, as
-long as the resulting work remains under this licence, as long as
-the modified form of the Software is distributed with documentation
-which still gives credit to the original authors of the Software,
-and as long as the modified form of the Software is distributed with
-a clear statement that it is not the original form of the Software
-in the form that it was distributed by the authors.
-
-IV. The Software, or parts thereof, may be incorporated into other
-software which is not freely redistributable (i.e. software for
-which a fee is charged), as long as permission is granted from the
-authors of the Software. The authors reserve the right to grant this
-permission only for a fee, which may at our option take the form of
-royalty payments. The authors also reserve the right to refuse to
-grant permission if they deem it necessary. For further information
-about who exactly the authors are, see clause XI below.
-
-V. The Software may be incorporated, in its original archive form,
-into software collections or archives which are not freely
-redistributable, as long as it is clearly stated that the Software
-itself remains freely redistributable and remains under this licence
-and no other. Such collections are deemed not to fall under article
-IV of this licence.
-
-VI. Object files or programs generated by the Software as output do
-not fall under this licence at all, and may be placed under any
-licence the author wishes. The authors explicitly lay no claim to,
-and assert no rights over, any programs written by other people and
-assembled into object form by the Software.
-
-VII. You may not copy, modify or distribute the Software except
-under the terms given in this licence document. You may not
-sublicense the Software or in any way place it under any other
-licence than this one. Since you have not signed this licence, you
-are not of course required to accept it; however, no other licence
-applies to the Software, and nothing else grants you any permission
-to copy, modify, sublicense or distribute the Software in any way.
-These actions are therefore prohibited if you do not accept this
-licence.
-
-VIII. There is no warranty for the Software, to the extent permitted
-by applicable law. The authors provide the Software "as is" without
-warranty of any kind, either expressed or implied, including but not
-limited to the implied warranties of merchantability and fitness for
-a particular purpose. The entire risk as to the quality and
-performance of the Software is with you. Should the Software prove
-defective, you assume the cost of all necessary servicing, repair or
-correction.
-
-IX. In no event, unless required by applicable law or agreed to in
-writing, will any of the authors be liable to you for damages,
-including any general, special, incidental or consequential damages,
-arising out of the use or the inability to use the Software,
-including but not limited to loss of data or data being rendered
-inaccurate or a failure of the Software to operate with any other
-programs, even if you have been advised of the possibility of such
-damages.
-
-X. In addition to what this Licence otherwise provides, the Software
-may be distributed in such a way as to be compliant with the GNU
-General Public Licence, as published by the Free Software Foundation,
-Cambridge, MA, USA; version 2, or, at your option, any later version;
-incorporated herein by reference. You must include a copy of this
-Licence with such distribution. Furthermore, patches sent to the
-authors for the purpose of inclusion in the official release version
-are considered cleared for release under the full terms of this
-Licence.
-
-XI. The authors of NASM are the original authors (Simon Tatham and
-Julian Hall) and all those who the original authors feel have
-contributed significantly to the overall project. If you wish to
-contact the authors, Julian Hall (jules@earthcorp.com) should be your
-first port of call.
-
-XII. Should any part of this agreement be deemed unenforcable, it is
-intended that the remainder of the agreement be held in force.
-
-END OF LICENCE AGREEMENT
diff --git a/MODIFIED b/MODIFIED
deleted file mode 100644
index eead729e..00000000
--- a/MODIFIED
+++ /dev/null
@@ -1,224 +0,0 @@
-01/28/01 - fbk - added Stepane Denis' SSE2 instructions to a *working*
- version of the code - some earlier versions were based on
- broken code - sorry 'bout that. version "0.98.07"
-
-01/28/01 - fbk - cosmetic modifications to nasm.c, nasm.h,
- AUTHORS, MODIFIED
-
-01/18/01 - fbk - "metalbrain"s jecxz bug fix in insns.dat
- - alter nasmdoc.src to match - version "0.98.06f"
-
-01/09/01 - fbk - removed the "outforms.h" file - it appears to be
- someone's old backup of "outform.h". version "0.98.06e"
-
-01/09/01 - fbk - finally added the fix for the "multiple %includes bug",
- known since 7/27/99 - reported originally (?) and sent to
- us by Austin Lunnen - he reports that John Fine had a fix
- within the day. Here it is...
-
----- Nelson Rush resigns from the group. Big thanks to Nelson for
- his leadership and enthusiasm in getting these changes
- incorporated into Nasm!
-
----- fbk - [list +], [list -] directives - ineptly implemented, should
- be re-written or removed, perhaps.
-
----- Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
- as well - testing might be desirable...
-
-08/07/00 - James Seter - -postfix, -prefix command line switches.
-
----- Yuri Zaporogets - rdoff utility changes.
-
-John Coffman's changes:
-For the JMP and other optimizations see the file README03.txt.
-
-Kendall Bennett's changes:
-For changes since the 0.98 release see the file scitech.txt. Note
- that you must define "TASM_COMPAT" at compile-time
- to get the Tasm Ideal Mode compatibility.
-
-----------------------------------------------
-... this is the 0.98 "modified" file ...
---------------------------------------------------
-This file details changes since NASM 0.98p3. All the releases in this
-file have been produced by H. Peter Anvin <hpa@zytor.com>.
-
-For release 0.98:
-* The documentation comment delimiter is \# not #.
-* Allow EQU definitions to refer to external labels; reported by
- Pedro Gimeno.
-* Re-enable support for RDOFF v1; reported by Pedro Gimeno.
-* Updated License file per OK from Simon and Julian.
-
-For release 0.98p9:
-* Update documentation (although the instruction set reference will
- have to wait; I don't want to hold up the 0.98 release for it.)
-* Verified that the NASM implementation of the PEXTRW and PMOVMSKB
- instructions is correct. The encoding differs from what the Intel
- manuals document, but the Pentium III behaviour matches NASM, not
- the Intel manuals.
-* Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
- Stefan Hoffmeister.
-* Resurrect the -s option, which was removed when changing the
- diagnostic output to stdout.
-
-For release 0.98p8:
-* Fix for "DB" when NASM is running on a bigendian machine.
-* Invoke insns.pl once for each output script, making Makefile.in
- legal for "make -j".
-* Improve the Unix configure-based makefiles to make package
- creation easier.
-* Included an RPM .spec file for building RPM (RedHat Package Manager)
- packages on Linux or Unix systems.
-* Fix Makefile dependency problems.
-* Change src/rdsrc.pl to include sectioning information in info
- output; required for install-info to work.
-* Updated the RDOFF distribution to version 2 from Jules; minor
- massaging to make it compile in my environment.
-* Split doc files that can be built by anyone with a Perl interpreter off
- into a separate archive.
-* "Dress rehearsal" release!
-
-For release 0.98p7:
-
-* Fixed opcodes with a third byte-sized immediate argument to not
- complain if given "byte" on the immediate.
-* Allow %undef to remove single-line macros with arguments. This
- matches the behaviour of #undef in the C preprocessor.
-* Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
- compatibility with most C compilers and preprocessors. This allows
- Makefile options to be shared between cc and nasm, for example.
-* Minor cleanups.
-* Went through the list of Katmai instructions and hopefully fixed the
- (rather few) mistakes in it.
-* (Hopefully) fixed a number of disassembler bugs related to ambiguous
- instructions (disambiguated by -p) and SSE instructions with REP.
-* Fix for bug reported by Mark Junger: "call dword 0x12345678" should
- work and may add an OSP (affected CALL, JMP, Jcc).
-* Fix for environments when "stderr" isn't a compile-time constant.
-
-For release 0.98p6:
-
-* Took officially over coordination of the 0.98 release; so drop
- the p3.x notation. Skipped p4 and p5 to avoid confusion with John
- Fine's J4 and J5 releases.
-* Update the documentation; however, it still doesn't include
- documentation for the various new instructions. I somehow wonder if
- it makes sense to have an instruction set reference in the assembler
- manual when Intel et al have PDF versions of their manuals online.
-* Recognize "idt" or "centaur" for the -p option to ndisasm.
-* Changed error messages back to stderr where they belong, but add an
- -E option to redirect them elsewhere (the DOS shell cannot redirect
- stderr.)
-* -M option to generate Makefile dependencies (based on code from Alex
- Verstak.)
-* %undef preprocessor directive, and -u option, that undefines a
- single-line macro.
-* OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
- Chuck Crayne.
-* Various minor bugfixes (reported by):
- - Dangling %s in preproc.c (Martin Junker)
-* THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am
- on a trip and didn't bring the Katmai instruction reference, so I
- can't work on them right now.
-* Updated the License file per agreement with Simon and Jules to
- include a GPL distribution clause.
-
-For release 0.98p3.7:
-
-* (Hopefully) fixed the canned Makefiles to include the outrdf2 and
- zoutieee modules.
-* Renamed changes.asm to changed.asm.
-
-For release 0.98p3.6:
-
-* Fixed a bunch of instructions that were added in 0.98p3.5 which had
- memory operands, and the address-size prefix was missing from the
- instruction pattern.
-
-For release 0.98p3.5:
-
-* Merged in changes from John S. Fine's 0.98-J5 release. John's based
- 0.98-J5 on my 0.98p3.3 release; this merges the changes.
-* Expanded the instructions flag field to a long so we can fit more
- flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
- such.
-* Fix the "PRIV" flag on a bunch of instructions, and create new
- "PROT" flag for protected-mode-only instructions (orthogonal to if
- the instruction is privileged!) and new "SMM" flag for SMM-only
- instructions.
-* Added AMD-only SYSCALL and SYSRET instructions.
-* Make SSE actually work, and add new Katmai MMX instructions.
-* Added a -p (preferred vendor) option to ndisasm so that it can
- distinguish e.g. Cyrix opcodes also used in SSE. For example:
-
- ndisasm -p cyrix aliased.bin
- 00000000 670F514310 paddsiw mm0,[ebx+0x10]
- 00000005 670F514320 paddsiw mm0,[ebx+0x20]
- ndisasm -p intel aliased.bin
- 00000000 670F514310 sqrtps xmm0,[ebx+0x10]
- 00000005 670F514320 sqrtps xmm0,[ebx+0x20]
-* Added a bunch of Cyrix-specific instructions.
-
-For release 0.98p3.4:
-
-* Made at least an attempt to modify all the additional Makefiles (in
- the Mkfiles directory). I can't test it, but this was the best I
- could do.
-* DOS DJGPP+"Opus Make" Makefile from John S. Fine.
-* changes.asm changes from John S. Fine.
-
-
-For release 0.98p3.3:
-
-* Patch from Conan Brink to allow nesting of %rep directives.
-* If we're going to allow INT01 as an alias for INT1/ICEBP (one of
- Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
- as well.
-* Updated changes.asm to include the latest changes.
-* Tried to clean up the <CR>s that had snuck in from a DOS/Windows
- environment into my Unix environment, and try to make sure than
- DOS/Windows users get them back.
-* We would silently generate broken tools if insns.dat wasn't sorted
- properly. Change insns.pl so that the order doesn't matter.
-* Fix bug in insns.pl (introduced by me) which would cause conditional
- instructions to have an extra "cc" in disassembly, e.g. "jnz"
- disassembled as "jccnz".
-
-
-For release 0.98p3.2:
-
-* Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
- http://www.csoft.net/cz/johnfine/
-* Changed previous "spotless" Makefile target (appropriate for distribution)
- to "distclean", and added "cleaner" target which is same as "clean"
- except deletes files generated by Perl scripts; "spotless" is union.
-* Removed BASIC programs from distribution. Get a Perl interpreter
- instead (see below.)
-* Calling this "pre-release 3.2" rather than "p3-hpa2" because of
- John's contributions.
-* Actually link in the IEEE output format (zoutieee.c); fix a bunch of
- compiler warnings in that file. Note I don't know what IEEE output
- is supposed to look like, so these changes were made "blind".
-
-
-For release 0.98p3-hpa:
-
-* Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
- buildable version for Unix systems (Makefile.in updates, etc.)
-* Changed insns.pl to create the instruction tables in nasm.h and
- names.c, so that a new instruction can be added by adding it *only*
- to insns.dat.
-* Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
- FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
- guarantee will never be used; one of them is documented as UD2 in
- Intel documentation, the other one just as "Undefined Opcode" --
- calling it UD1 seemed to make sense.)
-* MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
- characters long. Now MAX_SYMBOL is derived from insns.dat.
-* A note on the BASIC programs included: forget them. insns.bas is
- already out of date. Get yourself a Perl interpreter for your
- platform of choice at:
-
- http://www.cpan.org/ports/index.html
diff --git a/Makefile.in b/Makefile.in
index fb1f3877..6fabb205 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,7 +27,7 @@ NROFF = @NROFF@
.SUFFIXES: .c .i .s .o .1 .man
.PHONY: all doc rdf install clean distclean cleaner spotless install_rdf
-.PHONY: install_doc everything install_everything
+.PHONY: install_doc everything install_everything strip perlreq dist
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
@@ -42,8 +42,8 @@ NROFF = @NROFF@
$(NROFF) -man $< > $@
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
- outobj.o outas86.o outrdf2.o outdbg.o zoutieee.o \
+ parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o output/outieee.o \
preproc.o listing.o eval.o
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -69,19 +69,19 @@ nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h insns.h
nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.o: outform.c outform.h nasm.h insnsi.h
-outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
@@ -104,6 +104,10 @@ insnsn.c: insns.dat insns.pl
macros.c: standard.mac macros.pl
perl $(srcdir)/macros.pl $(srcdir)/standard.mac
+# This target generates all files that require perl.
+# This allows easier generation of distribution (see dist target).
+perlreq: macros.c insnsa.c insnsd.c insnsi.h insnsn.c
+
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
$(INSTALL_PROGRAM) ndisasm $(INSTALLROOT)$(bindir)/ndisasm
@@ -124,6 +128,9 @@ cleaner: clean
spotless: distclean cleaner
+strip:
+ strip --strip-unneeded nasm ndisasm
+
rdf:
cd rdoff && $(MAKE)
@@ -140,3 +147,7 @@ everything: all doc rdf
install_everything: everything install install_doc install_rdf
+dist: spotless perlreq
+ autoconf
+ rm -rf ./autom4te.cache
+ tar cvjf ../nasm-`./nasm-version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
diff --git a/Mkfiles/Makefile.b32 b/Mkfiles/Makefile.b32
index 3b92d0b4..98dc6f8a 100644
--- a/Mkfiles/Makefile.b32
+++ b/Mkfiles/Makefile.b32
@@ -80,10 +80,10 @@ SUFFIX= w# # by default, this makefile produces nasmw.exe and ndisasmw.exe
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
- assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
- outrdf2.$(OBJ) zoutieee.$(OBJ) \
+ assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
+ output/outrdf2.$(OBJ) output/outieee.$(OBJ) \
preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
@@ -126,15 +126,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.bc2 b/Mkfiles/Makefile.bc2
index a6a31ee3..49f10d37 100644
--- a/Mkfiles/Makefile.bc2
+++ b/Mkfiles/Makefile.bc2
@@ -109,7 +109,7 @@ NDISASMOBJS = $(OBJD)ndisasm.$(OBJ) $(OBJD)disasm.$(OBJ) $(OBJD)sync.$(OBJ) \
OUTOBJ= $(OBJD)outbin.$(OBJ) $(OBJD)outaout.$(OBJ) $(OBJD)outcoff.$(OBJ) \
$(OBJD)outelf.$(OBJ) $(OBJD)outobj.$(OBJ) $(OBJD)outas86.$(OBJ) \
$(OBJD)outrdf.$(OBJ) $(OBJD)outdbg.$(OBJ) $(OBJD)outrdf2.$(OBJ) \
- $(OBJD)zoutieee.$(OBJ)
+ $(OBJD)outieee.$(OBJ)
################################################################
@@ -201,31 +201,31 @@ $(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h
################################################################
# Dependencies for all of the output format's OBJ files
-$(OBJD)outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
$(NASM_ASM)
$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
diff --git a/Mkfiles/Makefile.bor b/Mkfiles/Makefile.bor
index eeb59cd2..49d3355d 100644
--- a/Mkfiles/Makefile.bor
+++ b/Mkfiles/Makefile.bor
@@ -25,9 +25,9 @@ OBJ = obj#
NASMOBJS1 = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ)
NASMOBJS2 = assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ)
-NASMOBJS3 = outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ)
-NASMOBJS4 = outobj.$(OBJ) outas86.$(OBJ) outdbg.$(OBJ) outrdf.$(OBJ)
-NASMOBJS5 = outrdf2.$(OBJ) zoutieee.$(OBJ)
+NASMOBJS3 = output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ)
+NASMOBJS4 = output/outobj.$(OBJ) output/outas86.$(OBJ) output/outdbg.$(OBJ) output/outrdf.$(OBJ)
+NASMOBJS5 = output/outrdf2.$(OBJ) output/outieee.$(OBJ)
NASMOBJS6 = preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
NASMOBJS = $(NASMOBJS1) $(NASMOBJS2) $(NASMOBJS3) $(NASMOBJS4) $(NASMOBJS5) \
@@ -65,15 +65,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
index abfe2b2b..afa3d033 100644
--- a/Mkfiles/Makefile.dj
+++ b/Mkfiles/Makefile.dj
@@ -22,9 +22,9 @@ CFLAGS = -O2 -I.
$(CC) -c $(CFLAGS) $*.c
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
- outobj.o outas86.o outrdf.o outdbg.o preproc.o listing.o \
- eval.o outrdf2.o zoutieee.o
+ parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outrdf.o output/outdbg.o preproc.o listing.o \
+ eval.o output/outrdf2.o output/outieee.o
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -48,16 +48,16 @@ nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h
nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.o: outform.c outform.h nasm.h insnsi.h
-outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.djo b/Mkfiles/Makefile.djo
index 1b529c37..5206f1af 100644
--- a/Mkfiles/Makefile.djo
+++ b/Mkfiles/Makefile.djo
@@ -40,18 +40,18 @@ CFLAGS = -O3
tcc -O -Z -c -ml -d -DOF_ONLY -DOF_BIN -DOF_OBJ -If:\public\turboc -I. $*.c >$*.err
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
- outobj.o outas86.o outrdf.o outrdf2.o zoutieee.o outdbg.o preproc.o listing.o \
+ parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outieee.o output/outdbg.o preproc.o listing.o \
eval.o
NASML = nasm.ol nasmlib.ol float.ol insnsa.ol assemble.ol labels.ol \
- parser.ol outform.ol outbin.ol outaout.ol outcoff.ol outelf.ol \
- outobj.ol outas86.ol outrdf.ol outrdf2.ol zoutieee.ol outdbg.ol preproc.ol listing.ol \
+ parser.ol outform.ol output/outbin.ol output/outaout.ol output/outcoff.ol output/outelf.ol \
+ output/outobj.ol output/outas86.ol output/outrdf.ol output/outrdf2.ol output/outieee.ol output/outdbg.ol preproc.ol listing.ol \
eval.ol
NASM16 = nasm.obj nasmlib.obj float.obj insnsa.obj assemble.obj labels.obj \
- parser.obj outform.obj outbin.obj \
- outobj.obj preproc.obj listing.obj \
+ parser.obj outform.obj output/outbin.obj \
+ output/outobj.obj preproc.obj listing.obj \
eval.obj
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -99,19 +99,19 @@ nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h
nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.o: outform.c outform.h nasm.h insnsi.h
-outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
assemble.ol: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
disasm.ol: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
@@ -125,19 +125,19 @@ nasm.ol: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h
nasmlib.ol: nasmlib.c nasm.h insnsi.h nasmlib.h
ndisasm.ol: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.ol: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.ol: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.ol: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.ol: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.ol: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.ol: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.ol: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.ol: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.ol: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.ol: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.ol: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.ol: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.ol: outform.c outform.h nasm.h insnsi.h
-outobj.ol: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.ol: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.ol: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.ol: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
parser.ol: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.ol: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.ol: sync.c sync.h
-zoutieee.ol: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.ol: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
assemble.obj: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
disasm.obj: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
@@ -151,19 +151,19 @@ nasm.obj: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.
outform.h listing.h
nasmlib.obj: nasmlib.c nasm.h insnsi.h nasmlib.h
ndisasm.obj: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.obj: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.obj: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.obj: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.obj: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.obj: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.obj: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.obj: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.obj: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.obj: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.obj: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.obj: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.obj: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.obj: outform.c outform.h nasm.h insnsi.h
-outobj.obj: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.obj: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.obj: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.obj: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
parser.obj: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.obj: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.obj: sync.c sync.h
-zoutieee.obj: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.obj: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
# These four source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
diff --git a/Mkfiles/Makefile.dl b/Mkfiles/Makefile.dl
index aadc7bc6..a13d19dd 100644
--- a/Mkfiles/Makefile.dl
+++ b/Mkfiles/Makefile.dl
@@ -21,9 +21,9 @@ NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) eval.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outrdf2.$(OBJ) outdbg.$(OBJ) \
- preproc.$(OBJ) listing.$(OBJ) zoutieee.$(OBJ)
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outrdf2.$(OBJ) output/outdbg.$(OBJ) \
+ preproc.$(OBJ) listing.$(OBJ) output/outieee.$(OBJ)
all : nasm.exe ndisasm.exe
diff --git a/Mkfiles/Makefile.dos b/Mkfiles/Makefile.dos
index 6b87d1f6..b6574f87 100644
--- a/Mkfiles/Makefile.dos
+++ b/Mkfiles/Makefile.dos
@@ -23,9 +23,9 @@ OBJ = obj#
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outrdf2.$(OBJ) \
- zoutieee.$(OBJ) outdbg.$(OBJ) preproc.$(OBJ) listing.$(OBJ) \
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outrdf2.$(OBJ) \
+ output/outieee.$(OBJ) output/outdbg.$(OBJ) preproc.$(OBJ) listing.$(OBJ) \
eval.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
@@ -52,15 +52,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.emx b/Mkfiles/Makefile.emx
index 9d532654..26264a93 100644
--- a/Mkfiles/Makefile.emx
+++ b/Mkfiles/Makefile.emx
@@ -44,8 +44,8 @@ NROFF = echo
$(NROFF) -man $< > $@
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
- outobj.o outas86.o outrdf.o outrdf2.o outdbg.o zoutieee.o \
+ parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outrdf.o output/outrdf2.o output/outdbg.o output/outieee.o \
preproc.o listing.o eval.o
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -71,19 +71,19 @@ nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h
nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.o: outform.c outform.h nasm.h insnsi.h
-outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
diff --git a/Mkfiles/Makefile.lcc b/Mkfiles/Makefile.lcc
index c5bbec73..9c6a9378 100644
--- a/Mkfiles/Makefile.lcc
+++ b/Mkfiles/Makefile.lcc
@@ -22,9 +22,9 @@ OBJ = obj
$(CC) -o $@ $*.c
NASM = nasm.${OBJ} nasmlib.${OBJ} float.${OBJ} insnsa.${OBJ} assemble.${OBJ} labels.${OBJ} \
- parser.${OBJ} outform.${OBJ} outbin.${OBJ} outaout.${OBJ} outcoff.${OBJ} outelf.${OBJ} \
- outobj.${OBJ} outas86.${OBJ} outrdf.${OBJ} outdbg.${OBJ} outrdf2.${OBJ} \
- zoutieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
+ parser.${OBJ} outform.${OBJ} output/outbin.${OBJ} output/outaout.${OBJ} output/outcoff.${OBJ} output/outelf.${OBJ} \
+ output/outobj.${OBJ} output/outas86.${OBJ} output/outrdf.${OBJ} output/outdbg.${OBJ} output/outrdf2.${OBJ} \
+ output/outieee.${OBJ} preproc.${OBJ} listing.${OBJ} eval.${OBJ}
NDISASM = ndisasm.${OBJ} disasm.${OBJ} sync.${OBJ} nasmlib.${OBJ} insnsd.${OBJ}
@@ -44,16 +44,16 @@ NASM.LNK: makefile.lcc
echo parser.$(OBJ) >> NASM.LNK
echo preproc.$(OBJ) >> NASM.LNK
echo outform.$(OBJ) >> NASM.LNK
- echo outbin.$(OBJ) >> NASM.LNK
- echo outaout.$(OBJ) >> NASM.LNK
- echo outcoff.$(OBJ) >> NASM.LNK
- echo outelf.$(OBJ) >> NASM.LNK
- echo outobj.$(OBJ) >> NASM.LNK
- echo outas86.$(OBJ) >> NASM.LNK
- echo outrdf.$(OBJ) >> NASM.LNK
- echo outrdf2.$(OBJ) >> NASM.LNK
- echo zoutieee.$(OBJ) >> NASM.LNK
- echo outdbg.$(OBJ) >> NASM.LNK
+ echo output/outbin.$(OBJ) >> NASM.LNK
+ echo output/outaout.$(OBJ) >> NASM.LNK
+ echo output/outcoff.$(OBJ) >> NASM.LNK
+ echo output/outelf.$(OBJ) >> NASM.LNK
+ echo output/outobj.$(OBJ) >> NASM.LNK
+ echo output/outas86.$(OBJ) >> NASM.LNK
+ echo output/outrdf.$(OBJ) >> NASM.LNK
+ echo output/outrdf2.$(OBJ) >> NASM.LNK
+ echo output/outieee.$(OBJ) >> NASM.LNK
+ echo output/outdbg.$(OBJ) >> NASM.LNK
NDISASM.LNK: makefile.lcc
echo ndisasm.$(OBJ) > NDISASM.LNK
@@ -80,16 +80,16 @@ nasm.${OBJ}: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labe
outform.h listing.h
nasmlib.${OBJ}: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.${OBJ}: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.${OBJ}: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.${OBJ}: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.${OBJ}: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.${OBJ}: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.${OBJ}: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.${OBJ}: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.${OBJ}: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.${OBJ}: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.${OBJ}: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.${OBJ}: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.${OBJ}: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.${OBJ}: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.${OBJ}: outform.c outform.h nasm.h insnsi.h
-outobj.${OBJ}: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.${OBJ}: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-zoutieee.${OBJ}: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.${OBJ}: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.${OBJ}: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.${OBJ}: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
parser.${OBJ}: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.${OBJ}: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.${OBJ}: sync.c sync.h
diff --git a/Mkfiles/Makefile.os2 b/Mkfiles/Makefile.os2
index f9236fe6..de4bad3c 100644
--- a/Mkfiles/Makefile.os2
+++ b/Mkfiles/Makefile.os2
@@ -168,25 +168,25 @@ $(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h nasmlib.h
################################################################
# Dependencies for all of the output format's OBJ files
-$(OBJD)outas86.$(OBJ): outas86.c nasm.h nasmlib.h
+$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outaout.$(OBJ): outaout.c nasm.h nasmlib.h
+$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outbin.$(OBJ): outbin.c nasm.h nasmlib.h
+$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
+$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
+$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outelf.$(OBJ): outelf.c nasm.h nasmlib.h
+$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outobj.$(OBJ): outobj.c nasm.h nasmlib.h
+$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h nasmlib.h
$(NASM_ASM)
$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h
diff --git a/Mkfiles/Makefile.sc b/Mkfiles/Makefile.sc
index 6563b69d..aa932b1d 100644
--- a/Mkfiles/Makefile.sc
+++ b/Mkfiles/Makefile.sc
@@ -44,9 +44,9 @@ OBJ = obj
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outrdf2.$(OBJ) \
- zoutieee.$(OBJ) outdbg.$(OBJ) \
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outrdf2.$(OBJ) \
+ output/outieee.$(OBJ) output/outdbg.$(OBJ) \
preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
@@ -92,15 +92,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.scw b/Mkfiles/Makefile.scw
index d7ce92e4..5cd06747 100644
--- a/Mkfiles/Makefile.scw
+++ b/Mkfiles/Makefile.scw
@@ -44,9 +44,9 @@ OBJ = obj
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
- outrdf2.$(OBJ) zoutieee.$(OBJ) \
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
+ output/outrdf2.$(OBJ) output/outieee.$(OBJ) \
preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
@@ -92,15 +92,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.unx b/Mkfiles/Makefile.unx
index 9bcb0c87..b5688499 100644
--- a/Mkfiles/Makefile.unx
+++ b/Mkfiles/Makefile.unx
@@ -2,11 +2,11 @@
# `configure' fails to generate a workable Makefile.
#
# If `configure' doesn't work for you, *please* inform <hpa@zytor.com>
+# and <nasm-bugs@lists.sourceforge.net>
#
# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
# Julian Hall. All rights reserved. The software is
-# redistributable under the licence given in the file "Licence"
-# distributed in the NASM archive.
+# redistributable under the GNU Lesser General Public License.
# You may need to adjust these values.
@@ -28,9 +28,9 @@ INSTALL_DATA = ${INSTALL} -m 644
$(CC) -c $(CFLAGS) $*.c
NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o outbin.o outaout.o outcoff.o outelf.o \
- outobj.o outas86.o outrdf.o outdbg.o preproc.o listing.o \
- eval.o outrdf2.o zoutieee.o
+ parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outrdf.o output/outdbg.o preproc.o listing.o \
+ eval.o output/outrdf2.o output/outieee.o
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -54,16 +54,16 @@ nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h
outform.h listing.h
nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-outaout.o: outaout.c nasm.h insnsi.h nasmlib.h outform.h
-outas86.o: outas86.c nasm.h insnsi.h nasmlib.h outform.h
-outbin.o: outbin.c nasm.h insnsi.h nasmlib.h outform.h
-outcoff.o: outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-outdbg.o: outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-outelf.o: outelf.c nasm.h insnsi.h nasmlib.h outform.h
+output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
outform.o: outform.c outform.h nasm.h insnsi.h
-outobj.o: outobj.c nasm.h insnsi.h nasmlib.h outform.h
-outrdf2.o: outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-zoutieee.o: zoutieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
diff --git a/Mkfiles/Makefile.vc b/Mkfiles/Makefile.vc
index 4b8c280a..da6ecfc2 100644
--- a/Mkfiles/Makefile.vc
+++ b/Mkfiles/Makefile.vc
@@ -22,10 +22,10 @@ SUFFIX = w# # by default, this makefile produces nasmw.exe and ndisasmw.exe
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
- preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \
- zoutieee.$(OBJ)
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
+ preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
+ output/outieee.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
insnsd.$(OBJ)
@@ -51,15 +51,15 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outdbg.$(OBJ): outdbg.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.wc b/Mkfiles/Makefile.wc
index 3feb8605..6dbbd538 100644
--- a/Mkfiles/Makefile.wc
+++ b/Mkfiles/Makefile.wc
@@ -40,10 +40,10 @@ OBJ = obj
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
- preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \
- zoutieee.$(OBJ)
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
+ preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
+ output/outieee.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
insnsd.$(OBJ)
@@ -70,18 +70,18 @@ NASM.LNK: makefile.wc
echo F labels.$(OBJ) >> NASM.LNK
echo F listing.$(OBJ) >> NASM.LNK
echo F parser.$(OBJ) >> NASM.LNK
- echo F preproc.$(OBJ) >> NASM.LNK
+ echo F preproc.$(OBJ) >> NASM.LNK
echo F outform.$(OBJ) >> NASM.LNK
- echo F outbin.$(OBJ) >> NASM.LNK
- echo F outaout.$(OBJ) >> NASM.LNK
- echo F outcoff.$(OBJ) >> NASM.LNK
- echo F outelf.$(OBJ) >> NASM.LNK
- echo F outobj.$(OBJ) >> NASM.LNK
- echo F outas86.$(OBJ) >> NASM.LNK
- echo F outrdf.$(OBJ) >> NASM.LNK
- echo F outrdf2.$(OBJ) >> NASM.LNK
- echo F zoutieee.$(OBJ) >> NASM.LNK
- echo F outdbg.$(OBJ) >> NASM.LNK
+ echo F output/outbin.$(OBJ) >> NASM.LNK
+ echo F output/outaout.$(OBJ) >> NASM.LNK
+ echo F output/outcoff.$(OBJ) >> NASM.LNK
+ echo F output/outelf.$(OBJ) >> NASM.LNK
+ echo F output/outobj.$(OBJ) >> NASM.LNK
+ echo F output/outas86.$(OBJ) >> NASM.LNK
+ echo F output/outrdf.$(OBJ) >> NASM.LNK
+ echo F output/outrdf2.$(OBJ) >> NASM.LNK
+ echo F output/outieee.$(OBJ) >> NASM.LNK
+ echo F output/outdbg.$(OBJ) >> NASM.LNK
NDISASM.LNK: makefile.wc
echo N ndisasm.exe > NDISASM.LNK
@@ -103,14 +103,14 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/Mkfiles/Makefile.wcw b/Mkfiles/Makefile.wcw
index 81a96fee..256096cf 100644
--- a/Mkfiles/Makefile.wcw
+++ b/Mkfiles/Makefile.wcw
@@ -40,10 +40,10 @@ OBJ = obj
NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
- outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
- outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
- preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \
- zoutieee.$(OBJ)
+ output/outbin.$(OBJ) output/outaout.$(OBJ) output/outcoff.$(OBJ) output/outelf.$(OBJ) \
+ output/outobj.$(OBJ) output/outas86.$(OBJ) output/outrdf.$(OBJ) output/outdbg.$(OBJ) \
+ preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) output/outrdf2.$(OBJ) \
+ output/outieee.$(OBJ)
NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
insnsd.$(OBJ)
@@ -70,18 +70,18 @@ NASM.LNK: makefile.wcw
echo F labels.$(OBJ) >> NASM.LNK
echo F listing.$(OBJ) >> NASM.LNK
echo F parser.$(OBJ) >> NASM.LNK
- echo F preproc.$(OBJ) >> NASM.LNK
+ echo F preproc.$(OBJ) >> NASM.LNK
echo F outform.$(OBJ) >> NASM.LNK
- echo F outbin.$(OBJ) >> NASM.LNK
- echo F outaout.$(OBJ) >> NASM.LNK
- echo F outcoff.$(OBJ) >> NASM.LNK
- echo F outelf.$(OBJ) >> NASM.LNK
- echo F outobj.$(OBJ) >> NASM.LNK
- echo F outas86.$(OBJ) >> NASM.LNK
- echo F outrdf.$(OBJ) >> NASM.LNK
- echo F outrdf2.$(OBJ) >> NASM.LNK
- echo F zoutieee.$(OBJ) >> NASM.LNK
- echo F outdbg.$(OBJ) >> NASM.LNK
+ echo F output/outbin.$(OBJ) >> NASM.LNK
+ echo F output/outaout.$(OBJ) >> NASM.LNK
+ echo F output/outcoff.$(OBJ) >> NASM.LNK
+ echo F output/outelf.$(OBJ) >> NASM.LNK
+ echo F output/outobj.$(OBJ) >> NASM.LNK
+ echo F output/outas86.$(OBJ) >> NASM.LNK
+ echo F output/outrdf.$(OBJ) >> NASM.LNK
+ echo F output/outrdf2.$(OBJ) >> NASM.LNK
+ echo F output/outieee.$(OBJ) >> NASM.LNK
+ echo F output/outdbg.$(OBJ) >> NASM.LNK
NDISASM.LNK: makefile.wcw
echo N ndisasm.exe > NDISASM.LNK
@@ -103,14 +103,14 @@ nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-outas86.$(OBJ): outas86.c nasm.h insnsi.h nasmlib.h
-outaout.$(OBJ): outaout.c nasm.h insnsi.h nasmlib.h
-outbin.$(OBJ): outbin.c nasm.h insnsi.h nasmlib.h
-outcoff.$(OBJ): outcoff.c nasm.h insnsi.h nasmlib.h
-outelf.$(OBJ): outelf.c nasm.h insnsi.h nasmlib.h
-outobj.$(OBJ): outobj.c nasm.h insnsi.h nasmlib.h
-outrdf2.$(OBJ): outrdf2.c nasm.h insnsi.h nasmlib.h
-zoutieee.$(OBJ): zoutieee.c nasm.h insnsi.h nasmlib.h
+output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
diff --git a/README b/README
index 755a4652..29f07685 100644
--- a/README
+++ b/README
@@ -1,5 +1,6 @@
NASM, the Netwide Assembler.
- Version 0.98.26.
+ Version 0.98.30.
+ 2002-04-29
Many many developers all over the net respect NASM for what it is
- a widespread (thus netwide), portable (thus netwide!), very
@@ -16,12 +17,5 @@ famous Open Source development center on The Net.
Visit our development page at http://nasm.2y.net and our
SF project at http://sf.net/projects/nasm
-The NASM documentation is in process of severe re-arrangement
-(especially the License issues with sourcecode, the old
-license can be found in doc/License), all files from previous
-releases that didn't go thru the process yet are placed in doc/
-subdirectory. Look there if you don't find a file you need here.
-
-
With best regards,
NASM crew.
diff --git a/Readme b/Readme
deleted file mode 100644
index dbbd18da..00000000
--- a/Readme
+++ /dev/null
@@ -1,49 +0,0 @@
-
- NetWide Assembler for the SciTech MGL
- -------------------------------------
-
-This is a modified distribution of NASM, the Netwide Assembler. NASM
-is a prototype general-purpose x86 assembler. It will currently output
-flat-form binary files, a.out, COFF and ELF Unix object files,
-Microsoft Win32 and 16-bit DOS object files, OS/2 object files, the
-as86 object format, and a home-grown format called RDF.
-
-This version of NASM has been modified by SciTech Software such that it
-can be used to assemble source code in the SciTech MGL graphics library,
-and understands enough of TASM assembler syntax such that both NASM
-and TASM can be used to generate assembler modules for the MGL graphics
-library. A complete macro package is provided as part of the SciTech
-MGL that provides macros to help in building modules that will work with
-either assembler.
-
-A pre-compiled binary of NASM is provided as part of the SciTech MGL
-graphics library, however you may re-build the assembler from the sources
-provided. To do so make sure you have the SciTech Makefile Utilties
-correctly configured for your compiler, and then simly type:
-
- unset DBG
- dmake OPT=1
-
-to build an optimised, non-debug version of the assembler. If you wish
-to rebuild for a different OS other than DOS or Win32, you will need to
-first compile the DMAKE make program for your OS. See the DMAKE source
-code for more information.
-
-Licensing issues:
------------------
-
-For information about how you can distribute and use NASM, see the
-file Licence.
-
-The NASM web page is at http://www.cryogen.com/Nasm/
-
-Bug reports specific to the SciTech MGL should be posted to SciTech
-Software MGL newsgroups:
-
- news://news.scitechsoft.com/scitech.mgl.developer
-
-Bug reports (and patches if you can) for NASM itself that are not SciTech
-MGL related should be sent to the authors at:
-
- Julian Hall <jules@earthcorp.com>
- Simon Tatham <anakin@pobox.com>
diff --git a/TODO b/TODO
index ab8bbdbf..79054437 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,339 @@
-Things to do (incorporate with doc/Wishlist):
-
-1. i18n via gettext
-2. Convert shallow code model to deep code model. Tired of messing between
-lots of unrelated files (especially .c/.h stuff).
-3. Automated dependency generation for Makefile. Current looks awful and will break
-if anything changes.
-4. (as result of 2) Move output modules out*.c to output/ subdir. (?)
+NASM TODO list
+==============
+
+This, like the AUTHORS file, is intended for easy readability by both human
+and machine, thus the format.
+
+ F: feature
+ V: version you should expect it by
+ R: responsible person or - if unassigned
+ C: % complete
+ D: description
+ D: maybe on multiple lines
+
+Anything that doesn't start with /^[FVRCD]:/ should be ignored.
+
+ F:-line triggers new entry.
+ Empty V,R,C assume: V: ?, R: -, C: 0%
+
+=============
+
+F: i18n via gettext
+
+F: Convert shallow code model to deep code model
+D: Tired of messing between lots of unrelated files (especially .c/.h stuff)
+
+F: Automated dependency generation for Makefile
+D: Current looks awful and will break if anything changes.
+
+F: Move output modules out*.c to output/ subdir
+R: madfire
+C: 10%
+
+== THESE ARE FROM old NASM's Wishlist
+== THEY NEED SEVERE REVISING (seems they weren't updated for a couple of years or so)
+
+F: Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy
+V: 0.98
+D: (nop@dlc.fi)
+
+F: Package the Linux Assembler HOWTO
+V: 0.98
+
+F: 3DNow!, SSE and other extensions need documenting
+V: 0.98
+D: hpa: Does it really make sense to have a whole instruction set
+D: reference packaged with the assembler?
+
+F: prototypes of lrotate don't match in test/*. Fix.
+V: 0.98
+
+F: Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub
+V: 0.98
+D: it might be a lot better than CWSDPMI. It's in PMW133.ZIP.
+
+F: %undef operator that goes along with %define
+V: ?
+C: 100%
+
+F: Fix `%error' giving error messages twice.
+V: 0.99
+D: Not especially important, as changes planned for 1.1x below will make
+D: the preprocessor be only called once.
+
+F: Sort out problems with OBJ
+V: 0.99
+D: * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we
+D: should avoid xxx32 records wherever we can.
+D: * However, didn't we change _to_ using xxx32 at some stage? Try
+D: to remember why and when.
+D: * Apparently Delphi's linker has trouble with two or more
+D: globals being defined inside a PUBDEF32. Don't even know if it
+D: _can_ cope with a PUBDEF16.
+D: * Might need extra flags. *sigh*
+
+F: Symbol table output may possibly be useful.
+V: 0.99
+D: Ken Martwick (kenm@efn.org) wants the following format:
+D: labelname type offset(hex) repetition count
+D: Possibly include xref addresses after repetition count?
+
+F: ELF fixes
+V: 0.99
+D: There are various other bugs in outelf.c that make certain kinds
+D: of relocation not work. See zbrown.asm. Looks like we may have to do
+D: a major rewrite of parts of it. Compare some NASM code output with
+D: equivalent GAS code output. Look at the ELF spec. Generally fix things.
+
+F: ELF fixes
+V: 0.99
+D: NASM is currently using a kludge in ELF that involves defining
+D: a symbol at a zero absolute offset. This isn't needed, as the
+D: documented solution to the problem that this solves is to use
+D: SHN_UNDEF.
+
+F: Debug information, in all formats it can be usefully done in.
+V: 0.99
+D: * including line-number record support.
+D: * "George C. Lindauer" <gclind01@starbase.spd.louisville.edu>
+D: wants to have some say in how this goes through.
+D: * Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out.
+
+F: Think about a line-continuation character.
+V: 0.99
+
+F: Consider allowing declaration of two labels on the same line,
+V: 0.99
+D: syntax 'label1[:] label2[:] ... instruction'.
+D: Need to investigate feasibility.
+
+F: Quoting of quotes by doubling them, in string and char constants.
+V: 0.99
+
+F: Two-operand syntax for SEGMENT/SECTION macro to avoid warnings
+D: of ignored section parameters on reissue of __SECT__.
+D: Or maybe skip the warning if the given parameters are identical to
+D: what was actually stored. Investigate.
+V: 0.99
+
+F: Apparently we are not missing a PSRAQ instruction, because it
+D: doesn't exist. Check that it doesn't exist as an undocumented
+D: instruction, or something stupid like that.
+V: 0.99
+
+F: Any assembled form starting 0x80 can also start 0x82.
+V: 1.00
+D: ndisasm should know this. New special code in instruction encodings, probably.
+
+F: Pointing an EQU at an external symbol now generates an error.
+V: 1.05
+D: There may be a better way of handling this; we should look into it.
+D: Ideally, the label mechanism should be changed to cope with one
+D: label being declared relative to another - that may work, but could be
+D: a pain to implement (or is it? it may be easy enough that you just
+D: need to declare a new offset in the same segment...) This should be done
+D: before v1.0 is released. There is a comment regarding this in labels.c,
+D: towards the end of the file, which discusses ways of fixing this.
+
+F: nested %rep used to cause a panic.
+V: 1.10
+D: Now a more informative error message is produced. This problem whould
+D: be fixed before v1.0.
+D: See comment in switch() statement block for PP_REP in do_directive()
+D: in preproc.c (line 1585, or thereabouts)
+
+F: Contribution
+D: zgraeme.tar contains improved hash table routines
+D: contributed by Graeme Defty <graeme@HK.Super.NET> for use in the
+D: label manager.
+
+F: Contribution
+D: zsyntax.zip contains a syntax-highlighting mode for
+D: NASM, for use with the Aurora text editor (??).
+
+F: Contribution
+D: zvim.zip contains a syntax-highlighting mode for NASM, for use with vim.
+
+F: Contribution
+D: zkendal1.zip and zkendal2.zip contain Kendall
+D: Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff,
+D: providing an alternative syntax mode for NASM which allows a macro
+D: set to be written that allows the same source files to be
+D: assembled with NASM and TASM.
+R: Kendall Bennett
+C: 100%
+
+F: Add the UD2 instruction.
+C: 100%
+
+F: Add the four instructions documented in 24368901.pdf (Intel's own document).
+C: 100%
+
+F: Some means of avoiding MOV memoffs,EAX which apparently the
+D: Pentium pairing detector thinks modifies EAX. Similar means of
+D: choosing instruction encodings where necessary.
+V: 1.10?
+
+F: The example of ..@ makes it clear that a ..@ label isn't just
+D: local, but doesn't make it clear that it isn't just global either.
+
+F: hpa wants an evaluator operator for ceil(log2(x)).
+
+F: Extra reloc types in ELF
+D: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23.
+D: Add support for the 16s at least.
+
+F: Lazy section creation or selective section output
+D: in COFF/win32 at least and probably other formats: don't bother to emit a section
+D: if it contains no data. Particularly the default auto-created
+D: section. We believe zero-length sections crash at least WLINK (in win32).
+
+F: Make the flags field in `struct itemplate' in insns.h a long instead of an int.
+C: 100%?
+
+F: Implement %ifref to check whether a single-line macro has ever been expanded since (last re) definition. Or maybe not. We'll see.
+
+F: add pointer to \k{insLEAVE} and \k{insENTER} in chapters about mixed-language programming.
+
+F: Some equivalent to TASM's GLOBAL directive
+D: ie something which defines a symbol as external if it doesn't end up being defined
+D: but defines it as public if it does end up being defined.
+
+F: Documentation doesn't explain about C++ name mangling.
+
+F: see if BITS can be made to do anything sensible in obj (eg set the default new-segment property to Use32).
+
+F: OBJ: coalesce consecutive offset and segment fixups for the same location into full-32bit-pointer fixups.
+D: This is apparently necessary because some twazzock in the PowerBASIC development
+D: team didn't design to support the OMF spec the way the rest of the
+D: world sees it.
+
+F: Allow % to be separated from the rest of a preproc directive, for alternative directive indentation styles.
+
+F: __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and __NASM_MINOR__.
+
+F: Warn on TIMES combined with multi-line macros.
+V: 1.00
+D: TIMES gets applied to first line only - should bring to users' attention.
+
+F: Re-work the evaluator, again, with a per-object-format fixup
+D: routine, so as to be able to cope with section offsets "really"
+D: being pure numbers; should be able to allow at _least_ the two
+D: common idioms
+D: TIMES 510-$ DB 0 ; bootsector
+D: MOV AX,(PROG_END-100H)/16 ; .COM TSR
+D: Would need to call the fixup throughout the evaluator, and the
+D: fixup would have to be allowed to return UNKNOWN on pass one if it
+D: had to. (_Always_ returning UNKNOWN on pass one, though a lovely
+D: clean design, breaks the first of the above examples.)
+V: 1.10
+
+F: Preprocessor identifier concatenation?
+V: 1.10
+
+F: Arbitrary section names in `bin'.
+V: 0.98.09
+D: Is this necessary? Is it even desirable?
+D: hpa: Desirable, yes. Necessary? Probably not, but there are definitely cases where it becomes quite useful.
+R: madfire
+C: 100%
+
+F: Ability to read from a pipe.
+V: 1.10
+D: Obviously not useful under dos, so memory problems with storing
+D: entire input file aren't a problem either.
+
+F: File caching under DOS/32 bit...
+V: 1.10?
+D: maybe even implement discardable buffers that get thrown away
+D: when we get a NULL returned from malloc(). Only really useful under
+D: DOS. Think about it.
+
+F: possibly spool out the pre-processed stuff to a file, to avoid having to re-process it.
+V: 1.10?
+D: Possible problems with preprocessor values not known on pass 1? Have a look...
+
+F: Or maybe we can spool out a pre-parsed version...?
+V: 1.10
+D: Need to investigate feasibility. Does the results from the parser
+D: change from pass 1 to pass 2? Would it be feasible to alter it so that
+D: the parser returns an invariant result, and this is then processed
+D: afterwards to resolve label references, etc?
+
+F: Subsection support?
+
+F: A good ALIGN mechanism, similar to GAS's.
+V: 0.98p1
+D: GAS pads out space by means of the following (32-bit) instructions:
+D: 8DB42600000000 lea esi,[esi+0x0]
+D: 8DB600000000 lea esi,[esi+0x0]
+D: 8D742600 lea esi,[esi+0x0]
+D: 8D7600 lea esi,[esi+0x0]
+D: 8D36 lea esi,[esi]
+D: 90 nop
+D: It uses up to two of these instructions to do up to 14-byte pads;
+D: when more than 14 bytes are needed, it issues a (short) jump to
+D: the end of the padded section and then NOPs the rest. Come up with
+D: a similar scheme for 16 bit mode, and also come up with a way to
+D: use it - internal to the assembler, so that programs using ALIGN
+D: don't knock over preprocess-only mode.
+D: Also re-work the macro form so that when given one argument in a
+D: code section it calls this feature.
+R: Panos Minos
+C: 100%?
+
+F: Possibly a means whereby FP constants can be specified as immediate operands to non-FP instructions.
+D: * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP
+D: constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT
+D: 1.2 to get the two halves of a double-precision one. Best to
+D: ignore extended-precision in case it bites.
+D: * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4
+D: (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x)
+D: and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte
+D: chunks, one-byte chunks, even stranger chunks, and pieces of
+D: ten-byte reals to be bandied around as well.
+
+F: A UNION macro might be quite cool
+D: now that ABSOLUTE is sane enough to be able to handle it.
+
+F: An equivalent to gcc's ## stringify operator, plus string concatenation
+D: somehow implemented without undue ugliness, so as
+D: to be able to do `%include "/my/path/%1"' in a macro, or something
+D: similar...
+
+F: Actually _do_ something with the processor, privileged and
+D: undocumented flags in the instruction table. When this happens,
+D: consider allowing PMULHRW to map to either of the Cyrix or AMD
+D: versions?
+D: hpa: The -p option to ndisasm now uses this to some extent.
+V: 1.10
+
+F: Maybe NEC V20/V30 instructions? ?
+D: hpa: What are they? Should be trivial to implement.
+
+F: Yet more object formats.
+D: * Possibly direct support for .EXE files?
+V: 1.10
+
+F: Symbol map in binary format. Format-specific options...
+V: 1.10?
+
+F: REDESIGN: Think about EQU dependency, and about start-point specification in OBJ. Possibly re-think directive support.
+V: 1.20?
+
+F: Think about a wrapper program like gcc?
+V: 2.00?
+D: Possibly invent a _patch_ for gcc so that it can take .asm files on the command line?
+D: If a wrapper happens, think about adding an option to cause the
+D: resulting executable file to be executed immediately, thus
+D: allowing NASM source files to have #!... (probably silly)
+
+F: Multi-platform support?
+D: If so: definitely Alpha; possibly Java byte code;
+D: probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe
+D: Vax. Perhaps Z80 and 6502, just for a laugh?
+
+F: Consider a 'verbose' option that prints information about the resulting object file onto stdout.
+
+F: Line numbers in the .lst file don't match the line numbers in the input.
+D: They probably should, rather than the current matching of the post-preprocessor line numbers.
diff --git a/Wishlist b/Wishlist
deleted file mode 100644
index ccf7760d..00000000
--- a/Wishlist
+++ /dev/null
@@ -1,276 +0,0 @@
-NASM Wishlist
-=============
-
-Numbers on right hand side are version numbers that it would be nice to
-have this done by. ? means I haven't looked at it yet.
-
-- Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy. 0.98
- (nop@dlc.fi)
-
-- Package the Linux Assembler HOWTO. 0.98
-
-- 3DNow!, SSE and other extensions need documenting. 0.98
- hpa: Does it really make sense to have a whole instruction set
- reference packaged with the assembler?
-
-- prototypes of lrotate don't match in test/*. Fix. 0.98
-
-- Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub 0.98
- - it might be a lot better than CWSDPMI. It's in PMW133.ZIP.
-
-- %undef operator that goes along with %define DONE
-
-- Fix `%error' giving error messages twice. 0.99
- Not especially important, as changes planned for 1.1x below will make
- the preprocessor be only called once.
-
-- Sort out problems with OBJ: 0.99
- * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we
- should avoid xxx32 records wherever we can.
- * However, didn't we change _to_ using xxx32 at some stage? Try
- to remember why and when.
- * Apparently Delphi's linker has trouble with two or more
- globals being defined inside a PUBDEF32. Don't even know if it
- _can_ cope with a PUBDEF16.
- * Might need extra flags. *sigh*
-
-- Symbol table output may possibly be useful. 0.99
- Ken Martwick (kenm@efn.org) wants the following format:
- labelname type offset(hex) repetition count
- Possibly include xref addresses after repetition count?
-
-- There are various other bugs in outelf.c that make certain kinds 0.99
- of relocation not work. See zbrown.asm. Looks like we may have to do
- a major rewrite of parts of it. Compare some NASM code output with
- equivalent GAS code output. Look at the ELF spec. Generally fix things.
-
-- NASM is currently using a kludge in ELF that involves defining 0.99
- a symbol at a zero absolute offset. This isn't needed, as the
- documented solution to the problem that this solves is to use
- SHN_UNDEF.
-
-- Debug information, in all formats it can be usefully done in. 0.99
- * including line-number record support.
- * "George C. Lindauer" <gclind01@starbase.spd.louisville.edu>
- wants to have some say in how this goes through.
- * Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out.
-
-- Think about a line-continuation character. 0.99
-
-- Consider allowing declaration of two labels on the same line,
- syntax 'label1[:] label2[:] ... instruction'. Need to investigate
- feasibility. 0.99
-
-- Quoting of quotes by doubling them, in string and char constants. 0.99
-
-- Two-operand syntax for SEGMENT/SECTION macro to avoid warnings 0.99
- of ignored section parameters on reissue of __SECT__.
- Or maybe skip the warning if the given parameters are identical to
- what was actually stored. Investigate.
-
-- Apparently we are not missing a PSRAQ instruction, because it
- doesn't exist. Check that it doesn't exist as an undocumented
- instruction, or something stupid like that. 0.99
-
-- Any assembled form starting 0x80 can also start 0x82. ndisasm 1.00
- should know this. New special code in instruction encodings,
- probably.
-
-- Pointing an EQU at an external symbol now generates an error. There 1.05
- may be a better way of handling this; we should look into it.
- Ideally, the label mechanism should be changed to cope with one
- label being declared relative to another - that may work, but could be
- a pain to implement (or is it? it may be easy enough that you just
- need to declare a new offset in the same segment...) This should be done
- before v1.0 is released. There is a comment regarding this in labels.c,
- towards the end of the file, which discusses ways of fixing this.
-
-- nested %rep used to cause a panic. Now a more informative error 1.10
- message is produced. This problem whould be fixed before v1.0.
- See comment in switch() statement block for PP_REP in do_directive()
- in preproc.c (line 1585, or thereabouts)
-
-- Contribution: zgraeme.tar contains improved hash table routines ?
- contributed by Graeme Defty <graeme@HK.Super.NET> for use in the
- label manager.
-
-- Contribution: zsyntax.zip contains a syntax-highlighting mode for ?
- NASM, for use with the Aurora text editor (??).
-
-- Contribution: zvim.zip contains a syntax-highlighting mode for ?
- NASM, for use with vim.
-
-- Contribution: zkendal1.zip and zkendal2.zip contain Kendall ?
- Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff,
- providing an alternative syntax mode for NASM which allows a macro
- set to be written that allows the same source files to be
- assembled with NASM and TASM.
-
-- Add the UD2 instruction. DONE
-
-- Add the four instructions documented in 24368901.pdf (Intel's own DONE
- document).
-
-- Some means of avoiding MOV memoffs,EAX which apparently the 1.10?
- Pentium pairing detector thinks modifies EAX. Similar means of
- choosing instruction encodings where necessary.
-
-- The example of ..@ makes it clear that a ..@ label isn't just ?
- local, but doesn't make it clear that it isn't just global either.
-
-- hpa wants an evaluator operator for ceil(log2(x)). ?
-
-- Extra reloc types in ELF: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23.
- Add support for the 16s at least. ?
-
-
-- Lazy section creation or selective section output, in COFF/win32 ?
- at least and probably other formats: don't bother to emit a section
- if it contains no data. Particularly the default auto-created
- section. We believe zero-length sections crash at least WLINK (in
- win32).
-
-- Make the flags field in `struct itemplate' in insns.h a long ?
- instead of an int.
-
-- Implement %ifref to check whether a single-line macro has ever been ?
- expanded since (last re) definition. Or maybe not. We'll see.
-
-- add pointer to \k{insLEAVE} and \k{insENTER} in chapters about ?
- mixed-language programming.
-
-- Some equivalent to TASM's GLOBAL directive, ie something which ?
- defines a symbol as external if it doesn't end up being defined
- but defines it as public if it does end up being defined.
-
-- Documentation doesn't explain about C++ name mangling. ?
-
-- see if BITS can be made to do anything sensible in obj (eg set the ?
- default new-segment property to Use32).
-
-- OBJ: coalesce consecutive offset and segment fixups for the same ?
- location into full-32bit-pointer fixups. This is apparently
- necessary because some twazzock in the PowerBASIC development
- team didn't deign to support the OMF spec the way the rest of the
- world sees it.
-
-- Allow % to be separated from the rest of a preproc directive, for ?
- alternative directive indentation styles.
-
-- __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and ?
- __NASM_MINOR__.
-
-- Warn on TIMES combined with multi-line macros. TIMES gets applied 1.00
- to first line only - should bring to users' attention.
-
-- Re-work the evaluator, again, with a per-object-format fixup 1.10
- routine, so as to be able to cope with section offsets "really"
- being pure numbers; should be able to allow at _least_ the two
- common idioms
- TIMES 510-$ DB 0 ; bootsector
- MOV AX,(PROG_END-100H)/16 ; .COM TSR
- Would need to call the fixup throughout the evaluator, and the
- fixup would have to be allowed to return UNKNOWN on pass one if it
- had to. (_Always_ returning UNKNOWN on pass one, though a lovely
- clean design, breaks the first of the above examples.)
-
-- Preprocessor identifier concatenation? 1.10
-
-- Arbitrary section names in `bin'. ?
- Is this necessary? Is it even desirable?
- hpa: Desirable, yes. Necessary? Probably not, but there are
- definitely cases where it becomes quite useful.
-
-- Ability to read from a pipe. Obviously not useful under dos, so 1.10
- memory problems with storing entire input file aren't a problem
- either.
-
- Related topic: file caching under DOS/32 bit... 1.10?
- maybe even implement discardable buffers that get thrown away
- when we get a NULL returned from malloc(). Only really useful under
- DOS. Think about it.
-
- Another related topic: possibly spool out the pre-processed 1.10?
- stuff to a file, to avoid having to re-process it. Possible problems
- with preprocessor values not known on pass 1? Have a look...
-
- Or maybe we can spool out a pre-parsed version...? 1.10
- Need to investigate feasibility. Does the results from the parser
- change from pass 1 to pass 2? Would it be feasible to alter it so that
- the parser returns an invariant result, and this is then processed
- afterwards to resolve label references, etc?
-
-- Subsection support? ?
-
-- A good ALIGN mechanism, similar to GAS's. GAS pads out space by 1.10?
- means of the following (32-bit) instructions:
- 8DB42600000000 lea esi,[esi+0x0]
- 8DB600000000 lea esi,[esi+0x0]
- 8D742600 lea esi,[esi+0x0]
- 8D7600 lea esi,[esi+0x0]
- 8D36 lea esi,[esi]
- 90 nop
- It uses up to two of these instructions to do up to 14-byte pads;
- when more than 14 bytes are needed, it issues a (short) jump to
- the end of the padded section and then NOPs the rest. Come up with
- a similar scheme for 16 bit mode, and also come up with a way to
- use it - internal to the assembler, so that programs using ALIGN
- don't knock over preprocess-only mode.
- Also re-work the macro form so that when given one argument in a
- code section it calls this feature.
-
-- Possibly a means whereby FP constants can be specified as ?
- immediate operands to non-FP instructions.
- * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP
- constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT
- 1.2 to get the two halves of a double-precision one. Best to
- ignore extended-precision in case it bites.
- * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4
- (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x)
- and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte
- chunks, one-byte chunks, even stranger chunks, and pieces of
- ten-byte reals to be bandied around as well.
-
-- A UNION macro might be quite cool, now that ABSOLUTE is sane ?
- enough to be able to handle it.
-
-- An equivalent to gcc's ## stringify operator, plus string ?
- concatenation, somehow implemented without undue ugliness, so as
- to be able to do `%include "/my/path/%1"' in a macro, or something
- similar...
-
-- Actually _do_ something with the processor, privileged and 1.10
- undocumented flags in the instruction table. When this happens,
- consider allowing PMULHRW to map to either of the Cyrix or AMD
- versions?
- hpa: The -p option to ndisasm now uses this to some extent.
-
-- Maybe NEC V20/V30 instructions? ?
- hpa: What are they? Should be trivial to implement.
-
-- Yet more object formats.
- * Possibly direct support for .EXE files? 1.10
-
-- Symbol map in binary format. Format-specific options... 1.10?
-
-- REDESIGN: Think about EQU dependency, and about start-point 1.20?
- specification in OBJ. Possibly re-think directive support.
-
-- Think about a wrapper program like gcc? Possibly invent a _patch_ 2.00?
- for gcc so that it can take .asm files on the command line?
-
-- If a wrapper happens, think about adding an option to cause the ?
- resulting executable file to be executed immediately, thus
- allowing NASM source files to have #!... (probably silly)
-
-- Multi-platform support? If so: definitely Alpha; possibly Java ?
- byte code; probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe
- Vax. Perhaps Z80 and 6502, just for a laugh?
-
-- Consider a 'verbose' option that prints information about the ?
- resulting object file onto stdout.
-
-- Line numbers in the .lst file don't match the line numbers in the ?
- input. They probably should, rather than the current matching
- of the post-preprocessor line numbers.
-
diff --git a/doc/Changes b/doc/Changes
deleted file mode 100644
index f383182e..00000000
--- a/doc/Changes
+++ /dev/null
@@ -1,542 +0,0 @@
-Change log for NASM
-===================
-
-This is the Changelog for the official releases; this is a modified
-version. For the changes from the official release, see the MODIFIED file.
-
-0.90 released October 1996
---------------------------
-
-First release version. First support for object file output. Other
-changes from previous version (0.3x) too numerous to document.
-
-0.91 released November 1996
----------------------------
-
-Loads of bug fixes.
-Support for RDF added.
-Support for DBG debugging format added.
-Support for 32-bit extensions to Microsoft OBJ format added.
-Revised for Borland C: some variable names changed, makefile added.
-LCC support revised to actually work.
-JMP/CALL NEAR/FAR notation added.
-`a16', `o16', `a32' and `o32' prefixes added.
-Range checking on short jumps implemented.
-MMX instruction support added.
-Negative floating point constant support added.
-Memory handling improved to bypass 64K barrier under DOS.
-$ prefix to force treatment of reserved words as identifiers added.
-Default-size mechanism for object formats added.
-Compile-time configurability added.
-`#', `@', `~' and `?' are now valid characters in labels.
-`-e' and `-k' options in NDISASM added.
-
-0.92 released January 1997
---------------------------
-
-The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
-fixed. This also affected the LCC driver.
-
-Fixed a bug regarding 32-bit effective addresses of the form
-[other_register+ESP].
-
-Documentary changes, notably documentation of the fact that Borland
-Win32 compilers use `obj' rather than `win32' object format.
-
-Fixed the COMENT record in OBJ files, which was formatted
-incorrectly.
-
-Fixed a bug causing segfaults in large RDF files.
-
-OBJ format now strips initial periods from segment and group
-definitions, in order to avoid complications with the local label
-syntax.
-
-Fixed a bug in disassembling far calls and jumps in NDISASM.
-
-Added support for user-defined sections in COFF and ELF files.
-
-Compiled the DOS binaries with a sensible amount of stack, to
-prevent stack overflows on any arithmetic expression containing
-parentheses.
-
-Fixed a bug in handling of files that do not terminate in a newline.
-
-0.93 released January 1997
---------------------------
-
-This release went out in a great hurry after semi-crippling bugs
-were found in 0.92.
-
-Really _did_ fix the stack overflows this time. *blush*
-
-Had problems with EA instruction sizes changing between passes, when
-an offset contained a forward reference and so 4 bytes were
-allocated for the offset in pass one; by pass two the symbol had
-been defined and happened to be a small absolute value, so only 1
-byte got allocated, causing instruction size mismatch between passes
-and hence incorrect address calculations. Fixed.
-
-Stupid bug in the revised ELF section generation fixed (associated
-string-table section for .symtab was hard-coded as 7, even when this
-didn't fit with the real section table). Was causing `ld' to
-seg-fault under Linux.
-
-Included a new Borland C makefile, Makefile.bc2, donated by Fox
-Cutter <lmb@comtch.iea.com>.
-
-0.94 released April 1997
-------------------------
-
-Major item: added the macro processor.
-
-Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
-reorganised CMPXCHG instruction into early-486 and Pentium forms.
-Thanks to Thobias Jones for the information.
-
-Fixed two more stupid bugs in ELF, which were causing `ld' to
-continue to seg-fault in a lot of non-trivial cases.
-
-Fixed a seg-fault in the label manager.
-
-Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
-the only option for BCD loads/stores in any case.
-
-Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
-anyone bothers to provide it. Previously they complained unless no
-keyword at all was present.
-
-Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
-vestige of a bug that I thought had been fixed in 0.92. This was
-fixed, hopefully for good this time...
-
-Another minor phase error (insofar as a phase error can _ever_ be
-minor) fixed, this one occurring in code of the form
- rol ax,forward_reference
- forward_reference equ 1
-
-The number supplied to TIMES is now sanity-checked for positivity,
-and also may be greater than 64K (which previously didn't work on
-16-bit systems).
-
-Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
-
-Added the INCBIN pseudo-opcode.
-
-Due to the advent of the preprocessor, the [INCLUDE] and [INC]
-directives have become obsolete. They are still supported in this
-version, with a warning, but won't be in the next.
-
-Fixed a bug in OBJ format, which caused incorrect object records to
-be output when absolute labels were made global.
-
-Updates to RDOFF subdirectory, and changes to outrdf.c.
-
-0.95 released July 1997
------------------------
-
-Fixed yet another ELF bug. This one manifested if the user relied on
-the default segment, and attempted to define global symbols without
-first explicitly declaring the target segment.
-
-Added makefiles (for NASM and the RDF tools) to build Win32 console
-apps under Symantec C++. Donated by Mark Junker.
-
-Added `macros.bas' and `insns.bas', QBasic versions of the Perl
-scripts that convert `standard.mac' to `macros.c' and convert
-`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
-Junker.
-
-Changed the diassembled forms of the conditional instructions so
-that JB is now emitted as JC, and other similar changes. Suggested
-list by Ulrich Doewich.
-
-Added `@' to the list of valid characters to begin an identifier
-with.
-
-Documentary changes, notably the addition of the `Common Problems'
-section in nasm.doc.
-
-Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
-
-Fixed a bug in perm_copy() in labels.c which was causing exceptions
-in cleanup_labels() on some systems.
-
-Positivity sanity check in TIMES argument changed from a warning to
-an error following a further complaint.
-
-Changed the acceptable limits on byte and word operands to allow
-things like `~10111001b' to work.
-
-Fixed a major problem in the preprocessor which caused seg-faults if
-macro definitions contained blank lines or comment-only lines.
-
-Fixed inadequate error checking on the commas separating the
-arguments to `db', `dw' etc.
-
-Fixed a crippling bug in the handling of macros with operand counts
-defined with a `+' modifier.
-
-Fixed a bug whereby object file formats which stored the input file
-name in the output file (such as OBJ and COFF) weren't doing so
-correctly when the output file name was specified on the command
-line.
-
-Removed [INC] and [INCLUDE] support for good, since they were
-obsolete anyway.
-
-Fixed a bug in OBJ which caused all fixups to be output in 16-bit
-(old-format) FIXUPP records, rather than putting the 32-bit ones in
-FIXUPP32 (new-format) records.
-
-Added, tentatively, OS/2 object file support (as a minor variant on
-OBJ).
-
-Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
-
-Removed a spurious second fclose() on the output file.
-
-Added the `-s' command line option to redirect all messages which
-would go to stderr (errors, help text) to stdout instead.
-
-Added the `-w' command line option to selectively suppress some
-classes of assembly warning messages.
-
-Added the `-p' pre-include and `-d' pre-define command-line options.
-
-Added an include file search path: the `-i' command line option.
-
-Fixed a silly little preprocessor bug whereby starting a line with a
-`%!' environment-variable reference caused an `unknown directive'
-error.
-
-Added the long-awaited listing file support: the `-l' command line
-option.
-
-Fixed a problem with OBJ format whereby, in the absence of any
-explicit segment definition, non-global symbols declared in the
-implicit default segment generated spurious EXTDEF records in the
-output.
-
-Added the NASM environment variable.
-
-From this version forward, Win32 console-mode binaries will be
-included in the DOS distribution in addition to the 16-bit binaries.
-Added Makefile.vc for this purpose.
-
-Added `return 0;' to test/objlink.c to prevent compiler warnings.
-
-Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
-
-Added an alternative memory-reference syntax in which prefixing an
-operand with `&' is equivalent to enclosing it in square brackets,
-at the request of Fox Cutter.
-
-Errors in pass two now cause the program to return a non-zero error
-code, which they didn't before.
-
-Fixed the single-line macro cycle detection, which didn't work at
-all on macros with no parameters (caused an infinite loop). Also
-changed the behaviour of single-line macro cycle detection to work
-like cpp, so that macros like `extrn' as given in the documentation
-can be implemented.
-
-Fixed the implementation of WRT, which was too restrictive in that
-you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
-a relocatable reference.
-
-0.96 released November 1997
----------------------------
-
-Fixed a bug whereby, if `nasm sourcefile' would cause a filename
-collision warning and put output into `nasm.out', then `nasm
-sourcefile -o outputfile' still gave the warning even though the
-`-o' was honoured.
-
-Fixed name pollution under Digital UNIX: one of its header files
-defined R_SP, which broke the enum in nasm.h.
-
-Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
-two-operand forms; NDISASM didn't recognise the longer register
-forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
-flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
-size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
-undocumented because the Intel Architecture reference documents
-them.
-
-Fixed a problem with the local-label mechanism, whereby strange
-types of symbol (EQUs, auto-defined OBJ segment base symbols)
-interfered with the `previous global label' value and screwed up
-local labels.
-
-Fixed a bug whereby the stub preprocessor didn't communicate with
-the listing file generator, so that the -a and -l options in
-conjunction would produce a useless listing file.
-
-Merged `os2' object file format back into `obj', after discovering
-that `obj' _also_ shouldn't have a link pass separator in a module
-containing a non-trivial MODEND. Flat segments are now declared
-using the FLAT attribute. `os2' is no longer a valid object format
-name: use `obj'.
-
-Removed the fixed-size temporary storage in the evaluator. Very very
-long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
-so) should now no longer crash NASM.
-
-Fixed a bug involving segfaults on disassembly of MMX instructions,
-by changing the meaning of one of the operand-type flags in nasm.h.
-This may cause other apparently unrelated MMX problems; it needs to
-be tested thoroughly.
-
-Fixed some buffer overrun problems with large OBJ output files.
-Thanks to DJ Delorie for the bug report and fix.
-
-Made preprocess-only mode actually listen to the %line markers as it
-prints them, so that it can report errors more sanely.
-
-Re-designed the evaluator to keep more sensible track of expressions
-involving forward references: can now cope with previously-nightmare
-situations such as
- mov ax,foo | bar
- foo equ 1
- bar equ 2
-
-Added the ALIGN and ALIGNB standard macros.
-
-Added PIC support in ELF: use of WRT to obtain the four extra
-relocation types needed.
-
-Added the ability for output file formats to define their own
-extensions to the GLOBAL, COMMON and EXTERN directives.
-
-Implemented common-variable alignment, and global-symbol type and
-size declarations, in ELF.
-
-Implemented NEAR and FAR keywords for common variables, plus
-far-common element size specification, in OBJ.
-
-Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
-default WRT specification (either a segment or a group).
-
-Transformed the Unix NASM archive into an auto-configuring package.
-
-Added a sanity-check for people applying SEG to things which are
-already segment bases: this previously went unnoticed by the SEG
-processing and caused OBJ-driver panics later.
-
-Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
-type references: OBJ doesn't directly support dword-size segment
-base fixups, but as long as the low two bytes of the constant term
-are zero, a word-size fixup can be generated instead and it will
-work.
-
-Added the ability to specify sections' alignment requirements in
-Win32 object files and pure binary files.
-
-Added preprocess-time expression evaluation: the %assign (and
-%iassign) directive and the bare %if (and %elif) conditional. Added
-relational operators to the evaluator, for use only in %if
-constructs: the standard relationals = < > <= >= <> (and C-like
-synonyms == and !=) plus low-precedence logical operators &&, ^^ and
-||.
-
-Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
-
-Added the __FILE__ and __LINE__ standard macros.
-
-Added a sanity check for number constants being greater than
-0xFFFFFFFF. The warning can be disabled.
-
-Added the %0 token whereby a variadic multi-line macro can tell how
-many parameters it's been given in a specific invocation.
-
-Added %rotate, allowing multi-line macro parameters to be cycled.
-
-Added the `*' option for the maximum parameter count on multi-line
-macros, allowing them to take arbitrarily many parameters.
-
-Added the ability for the user-level forms of EXTERN, GLOBAL and
-COMMON to take more than one argument.
-
-Added the IMPORT and EXPORT directives in OBJ format, to deal with
-Windows DLLs.
-
-Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
-textual identity), and %ifid / %ifnum / %ifstr (token type testing).
-
-Added the ability to distinguish SHL AX,1 (the 8086 version) from
-SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
-be 1).
-
-Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
-with PIC shared library features.
-
-Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
-FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
-otherwise accepted standard. The previous behaviour, though it was a
-deliberate feature, was a deliberate feature based on a
-misunderstanding. Apologies for the inconvenience.
-
-Improved the flexibility of ABSOLUTE: you can now give it an
-expression rather than being restricted to a constant, and it can
-take relocatable arguments as well.
-
-Added the ability for a variable to be declared as EXTERN multiple
-times, and the subsequent definitions are just ignored.
-
-We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
-alone on a line (without a following instruction).
-
-Improved sanity checks on whether the arguments to EXTERN, GLOBAL
-and COMMON are valid identifiers.
-
-Added misc/exebin.mac to allow direct generation of .EXE files by
-hacking up an EXE header using DB and DW; also added test/binexe.asm
-to demonstrate the use of this. Thanks to Yann Guidon for
-contributing the EXE header code.
-
-ndisasm forgot to check whether the input file had been successfully
-opened. Now it does. Doh!
-
-Added the Cyrix extensions to the MMX instruction set.
-
-Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
-assembled differently. This is important since [ESI+EBP] and
-[EBP+ESI] have different default base segment registers.
-
-Added support for the PharLap OMF extension for 4096-byte segment
-alignment.
-
-0.97 released December 1997
----------------------------
-
-This was entirely a bug-fix release to 0.96, which seems to have got
-cursed. Silly me.
-
-Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
-fail. Caused by an error in the `MOV EAX,<segment>' support.
-
-ndisasm hung at EOF when compiled with lcc on Linux because lcc on
-Linux somehow breaks feof(). ndisasm now does not rely on feof().
-
-A heading in the documentation was missing due to a markup error in
-the indexing. Fixed.
-
-Fixed failure to update all pointers on realloc() within extended-
-operand code in parser.c. Was causing wrong behaviour and seg faults
-on lines such as `dd 0.0,0.0,0.0,0.0,...'
-
-Fixed a subtle preprocessor bug whereby invoking one multi-line
-macro on the first line of the expansion of another, when the second
-had been invoked with a label defined before it, didn't expand the
-inner macro.
-
-Added internal.doc back in to the distribution archives - it was
-missing in 0.96 *blush*
-
-Fixed bug causing 0.96 to be unable to assemble its own test files,
-specifically objtest.asm. *blush again*
-
-Fixed seg-faults and bogus error messages caused by mismatching
-%rep and %endrep within multi-line macro definitions.
-
-Fixed a problem with buffer overrun in OBJ, which was causing
-corruption at ends of long PUBDEF records.
-
-Separated DOS archives into main-program and documentation to reduce
-download size.
-
-0.98 released May 1999
-----------------------
-
-Fixed a bug whereby STRUC didn't work at all in RDF.
-
-Fixed a problem with group specification in PUBDEFs in OBJ.
-
-Improved ease of adding new output formats. Contribution due to
-Fox Cutter.
-
-Fixed a bug in relocations in the `bin' format: was showing up when
-a relocatable reference crossed an 8192-byte boundary in any output
-section.
-
-Fixed a bug in local labels: local-label lookups were inconsistent
-between passes one and two if an EQU occurred between the definition
-of a global label and the subsequent use of a local label local to
-that global.
-
-Fixed a seg-fault in the preprocessor (again) which happened when
-you use a blank line as the first line of a multi-line macro
-definition and then defined a label on the same line as a call to
-that macro.
-
-Fixed a stale-pointer bug in the handling of the NASM environment
-variable. Thanks to Thomas McWilliams.
-
-ELF had a hard limit on the number of sections which caused
-segfaults when transgressed. Fixed.
-
-Added ability for ndisasm to read from stdin by using `-' as the
-filename.
-
-ndisasm wasn't outputting the TO keyword. Fixed.
-
-Fixed error cascade on bogus expression in %if - an error in
-evaluation was causing the entire %if to be discarded, thus creating
-trouble later when the %else or %endif was encountered.
-
-Forward reference tracking was instruction-granular not operand-
-granular, which was causing 286-specific code to be generated
-needlessly on code of the form `shr word [forwardref],1'. Thanks to
-Jim Hague for sending a patch.
-
-All messages now appear on stdout, as sending them to stderr serves
-no useful purpose other than to make redirection difficult.
-
-Fixed the problem with EQUs pointing to an external symbol - this
-now generates an error message.
-
-Allowed multiple size prefixes to an operand, of which only the first
-is taken into account.
-
-Incorporated John Fine's changes, including fixes of a large number
-of preprocessor bugs, some small problems in OBJ, and a reworking of
-label handling to define labels before their line is assembled, rather
-than after.
-
-Reformatted a lot of the source code to be more readable. Included
-'coding.txt' as a guideline for how to format code for contributors.
-
-Stopped nested %reps causing a panic - they now cause a slightly more
-friendly error message instead.
-
-Fixed floating point constant problems (patch by Pedro Gimeno)
-
-Fixed the return value of insn_size() not being checked for -1, indicating
-an error.
-
-Incorporated 3D now instructions.
-
-Fixed the 'mov eax, eax + ebx' bug.
-
-Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
-
-Incorporated John Fine's command line parsing changes
-
-Incorporated David Lindauer's OMF debug support
-
-Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size
-specification warning when sizes agree).
-
-Released NASM 0.98 Pre-release 1
-
-fixed bug in outcoff.c to do with truncating section names longer
-than 8 characters, referencing beyond end of string; 0.98 pre-release 2
-
-added response file support, improved command line handling, new layout
-help screen
-
-fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
-related bugs, updated Wishlist; 0.98 Prerelease 3.
-
-See the file "MODIFIED" for changes after 0.98p3.
diff --git a/doc/License b/doc/License
deleted file mode 100644
index c85c212e..00000000
--- a/doc/License
+++ /dev/null
@@ -1,119 +0,0 @@
-
-Terms and Conditions for the use of the Netwide Assembler
-=========================================================
-
-Can I have the gist without reading the legalese?
--------------------------------------------------
-
-Basically, NASM is free. You can't charge for it. You can copy it as
-much as you like. You can incorporate it, or bits of it, into other
-free programs if you want. (But we want to know about it if you do,
-and we want to be mentioned in the credits.) We may well allow you
-to incorporate it into commercial software too, but we'll probably
-demand some money for it, and we'll certainly demand to be given
-credit. And in extreme cases (although I can't immediately think of
-a reason we might actually want to do this) we may refuse to let you
-do it at all.
-
-NASM LICENCE AGREEMENT
-======================
-
-By "the Software" this licence refers to the complete contents of
-the NASM archive, excluding this licence document itself, and
-excluding the contents of the `test' directory. The Netwide
-Disassembler, NDISASM, is specifically included under this licence.
-
-I. The Software is freely redistributable; anyone may copy the
-Software, or parts of the Software, and give away as many copies as
-they like to anyone, as long as this licence document is kept with
-the Software. Charging a fee for the Software is prohibited,
-although a fee may be charged for the act of transferring a copy,
-and you can offer warranty protection and charge a fee for that.
-
-II. The Software, or parts thereof, may be incorporated into other
-freely redistributable software (by which we mean software that may
-be obtained free of charge) without requiring permission from the
-authors, as long as due credit is given to the authors of the
-Software in the resulting work, as long as the authors are informed
-of this action if possible, and as long as those parts of the
-Software that are used remain under this licence.
-
-III. Modified forms of the Software may be created and distributed
-as long as the authors are informed of this action if possible, as
-long as the resulting work remains under this licence, as long as
-the modified form of the Software is distributed with documentation
-which still gives credit to the original authors of the Software,
-and as long as the modified form of the Software is distributed with
-a clear statement that it is not the original form of the Software
-in the form that it was distributed by the authors.
-
-IV. The Software, or parts thereof, may be incorporated into other
-software which is not freely redistributable (i.e. software for
-which a fee is charged), as long as permission is granted from the
-authors of the Software. The authors reserve the right to grant this
-permission only for a fee, which may at our option take the form of
-royalty payments. The authors also reserve the right to refuse to
-grant permission if they deem it necessary. For further information
-about who exactly the authors are, see clause XI below.
-
-V. The Software may be incorporated, in its original archive form,
-into software collections or archives which are not freely
-redistributable, as long as it is clearly stated that the Software
-itself remains freely redistributable and remains under this licence
-and no other. Such collections are deemed not to fall under article
-IV of this licence.
-
-VI. Object files or programs generated by the Software as output do
-not fall under this licence at all, and may be placed under any
-licence the author wishes. The authors explicitly lay no claim to,
-and assert no rights over, any programs written by other people and
-assembled into object form by the Software.
-
-VII. You may not copy, modify or distribute the Software except
-under the terms given in this licence document. You may not
-sublicense the Software or in any way place it under any other
-licence than this one. Since you have not signed this licence, you
-are not of course required to accept it; however, no other licence
-applies to the Software, and nothing else grants you any permission
-to copy, modify, sublicense or distribute the Software in any way.
-These actions are therefore prohibited if you do not accept this
-licence.
-
-VIII. There is no warranty for the Software, to the extent permitted
-by applicable law. The authors provide the Software "as is" without
-warranty of any kind, either expressed or implied, including but not
-limited to the implied warranties of merchantability and fitness for
-a particular purpose. The entire risk as to the quality and
-performance of the Software is with you. Should the Software prove
-defective, you assume the cost of all necessary servicing, repair or
-correction.
-
-IX. In no event, unless required by applicable law or agreed to in
-writing, will any of the authors be liable to you for damages,
-including any general, special, incidental or consequential damages,
-arising out of the use or the inability to use the Software,
-including but not limited to loss of data or data being rendered
-inaccurate or a failure of the Software to operate with any other
-programs, even if you have been advised of the possibility of such
-damages.
-
-X. In addition to what this Licence otherwise provides, the Software
-may be distributed in such a way as to be compliant with the GNU
-General Public Licence, as published by the Free Software Foundation,
-Cambridge, MA, USA; version 2, or, at your option, any later version;
-incorporated herein by reference. You must include a copy of this
-Licence with such distribution. Furthermore, patches sent to the
-authors for the purpose of inclusion in the official release version
-are considered cleared for release under the full terms of this
-Licence.
-
-XI. The authors of NASM are the original authors (Simon Tatham and
-Julian Hall) and all those who the original authors feel have
-contributed significantly to the overall project. If you wish to
-contact the authors, Julian Hall (jules@earthcorp.com) should be your
-first port of call.
-
-XII. Should any part of this agreement be deemed unenforcable, it is
-intended that the remainder of the agreement be held in force.
-
-END OF LICENCE AGREEMENT
diff --git a/doc/Readme b/doc/Readme
deleted file mode 100644
index dbbd18da..00000000
--- a/doc/Readme
+++ /dev/null
@@ -1,49 +0,0 @@
-
- NetWide Assembler for the SciTech MGL
- -------------------------------------
-
-This is a modified distribution of NASM, the Netwide Assembler. NASM
-is a prototype general-purpose x86 assembler. It will currently output
-flat-form binary files, a.out, COFF and ELF Unix object files,
-Microsoft Win32 and 16-bit DOS object files, OS/2 object files, the
-as86 object format, and a home-grown format called RDF.
-
-This version of NASM has been modified by SciTech Software such that it
-can be used to assemble source code in the SciTech MGL graphics library,
-and understands enough of TASM assembler syntax such that both NASM
-and TASM can be used to generate assembler modules for the MGL graphics
-library. A complete macro package is provided as part of the SciTech
-MGL that provides macros to help in building modules that will work with
-either assembler.
-
-A pre-compiled binary of NASM is provided as part of the SciTech MGL
-graphics library, however you may re-build the assembler from the sources
-provided. To do so make sure you have the SciTech Makefile Utilties
-correctly configured for your compiler, and then simly type:
-
- unset DBG
- dmake OPT=1
-
-to build an optimised, non-debug version of the assembler. If you wish
-to rebuild for a different OS other than DOS or Win32, you will need to
-first compile the DMAKE make program for your OS. See the DMAKE source
-code for more information.
-
-Licensing issues:
------------------
-
-For information about how you can distribute and use NASM, see the
-file Licence.
-
-The NASM web page is at http://www.cryogen.com/Nasm/
-
-Bug reports specific to the SciTech MGL should be posted to SciTech
-Software MGL newsgroups:
-
- news://news.scitechsoft.com/scitech.mgl.developer
-
-Bug reports (and patches if you can) for NASM itself that are not SciTech
-MGL related should be sent to the authors at:
-
- Julian Hall <jules@earthcorp.com>
- Simon Tatham <anakin@pobox.com>
diff --git a/doc/Wishlist b/doc/Wishlist
deleted file mode 100644
index ccf7760d..00000000
--- a/doc/Wishlist
+++ /dev/null
@@ -1,276 +0,0 @@
-NASM Wishlist
-=============
-
-Numbers on right hand side are version numbers that it would be nice to
-have this done by. ? means I haven't looked at it yet.
-
-- Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy. 0.98
- (nop@dlc.fi)
-
-- Package the Linux Assembler HOWTO. 0.98
-
-- 3DNow!, SSE and other extensions need documenting. 0.98
- hpa: Does it really make sense to have a whole instruction set
- reference packaged with the assembler?
-
-- prototypes of lrotate don't match in test/*. Fix. 0.98
-
-- Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub 0.98
- - it might be a lot better than CWSDPMI. It's in PMW133.ZIP.
-
-- %undef operator that goes along with %define DONE
-
-- Fix `%error' giving error messages twice. 0.99
- Not especially important, as changes planned for 1.1x below will make
- the preprocessor be only called once.
-
-- Sort out problems with OBJ: 0.99
- * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we
- should avoid xxx32 records wherever we can.
- * However, didn't we change _to_ using xxx32 at some stage? Try
- to remember why and when.
- * Apparently Delphi's linker has trouble with two or more
- globals being defined inside a PUBDEF32. Don't even know if it
- _can_ cope with a PUBDEF16.
- * Might need extra flags. *sigh*
-
-- Symbol table output may possibly be useful. 0.99
- Ken Martwick (kenm@efn.org) wants the following format:
- labelname type offset(hex) repetition count
- Possibly include xref addresses after repetition count?
-
-- There are various other bugs in outelf.c that make certain kinds 0.99
- of relocation not work. See zbrown.asm. Looks like we may have to do
- a major rewrite of parts of it. Compare some NASM code output with
- equivalent GAS code output. Look at the ELF spec. Generally fix things.
-
-- NASM is currently using a kludge in ELF that involves defining 0.99
- a symbol at a zero absolute offset. This isn't needed, as the
- documented solution to the problem that this solves is to use
- SHN_UNDEF.
-
-- Debug information, in all formats it can be usefully done in. 0.99
- * including line-number record support.
- * "George C. Lindauer" <gclind01@starbase.spd.louisville.edu>
- wants to have some say in how this goes through.
- * Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out.
-
-- Think about a line-continuation character. 0.99
-
-- Consider allowing declaration of two labels on the same line,
- syntax 'label1[:] label2[:] ... instruction'. Need to investigate
- feasibility. 0.99
-
-- Quoting of quotes by doubling them, in string and char constants. 0.99
-
-- Two-operand syntax for SEGMENT/SECTION macro to avoid warnings 0.99
- of ignored section parameters on reissue of __SECT__.
- Or maybe skip the warning if the given parameters are identical to
- what was actually stored. Investigate.
-
-- Apparently we are not missing a PSRAQ instruction, because it
- doesn't exist. Check that it doesn't exist as an undocumented
- instruction, or something stupid like that. 0.99
-
-- Any assembled form starting 0x80 can also start 0x82. ndisasm 1.00
- should know this. New special code in instruction encodings,
- probably.
-
-- Pointing an EQU at an external symbol now generates an error. There 1.05
- may be a better way of handling this; we should look into it.
- Ideally, the label mechanism should be changed to cope with one
- label being declared relative to another - that may work, but could be
- a pain to implement (or is it? it may be easy enough that you just
- need to declare a new offset in the same segment...) This should be done
- before v1.0 is released. There is a comment regarding this in labels.c,
- towards the end of the file, which discusses ways of fixing this.
-
-- nested %rep used to cause a panic. Now a more informative error 1.10
- message is produced. This problem whould be fixed before v1.0.
- See comment in switch() statement block for PP_REP in do_directive()
- in preproc.c (line 1585, or thereabouts)
-
-- Contribution: zgraeme.tar contains improved hash table routines ?
- contributed by Graeme Defty <graeme@HK.Super.NET> for use in the
- label manager.
-
-- Contribution: zsyntax.zip contains a syntax-highlighting mode for ?
- NASM, for use with the Aurora text editor (??).
-
-- Contribution: zvim.zip contains a syntax-highlighting mode for ?
- NASM, for use with vim.
-
-- Contribution: zkendal1.zip and zkendal2.zip contain Kendall ?
- Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff,
- providing an alternative syntax mode for NASM which allows a macro
- set to be written that allows the same source files to be
- assembled with NASM and TASM.
-
-- Add the UD2 instruction. DONE
-
-- Add the four instructions documented in 24368901.pdf (Intel's own DONE
- document).
-
-- Some means of avoiding MOV memoffs,EAX which apparently the 1.10?
- Pentium pairing detector thinks modifies EAX. Similar means of
- choosing instruction encodings where necessary.
-
-- The example of ..@ makes it clear that a ..@ label isn't just ?
- local, but doesn't make it clear that it isn't just global either.
-
-- hpa wants an evaluator operator for ceil(log2(x)). ?
-
-- Extra reloc types in ELF: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23.
- Add support for the 16s at least. ?
-
-
-- Lazy section creation or selective section output, in COFF/win32 ?
- at least and probably other formats: don't bother to emit a section
- if it contains no data. Particularly the default auto-created
- section. We believe zero-length sections crash at least WLINK (in
- win32).
-
-- Make the flags field in `struct itemplate' in insns.h a long ?
- instead of an int.
-
-- Implement %ifref to check whether a single-line macro has ever been ?
- expanded since (last re) definition. Or maybe not. We'll see.
-
-- add pointer to \k{insLEAVE} and \k{insENTER} in chapters about ?
- mixed-language programming.
-
-- Some equivalent to TASM's GLOBAL directive, ie something which ?
- defines a symbol as external if it doesn't end up being defined
- but defines it as public if it does end up being defined.
-
-- Documentation doesn't explain about C++ name mangling. ?
-
-- see if BITS can be made to do anything sensible in obj (eg set the ?
- default new-segment property to Use32).
-
-- OBJ: coalesce consecutive offset and segment fixups for the same ?
- location into full-32bit-pointer fixups. This is apparently
- necessary because some twazzock in the PowerBASIC development
- team didn't deign to support the OMF spec the way the rest of the
- world sees it.
-
-- Allow % to be separated from the rest of a preproc directive, for ?
- alternative directive indentation styles.
-
-- __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and ?
- __NASM_MINOR__.
-
-- Warn on TIMES combined with multi-line macros. TIMES gets applied 1.00
- to first line only - should bring to users' attention.
-
-- Re-work the evaluator, again, with a per-object-format fixup 1.10
- routine, so as to be able to cope with section offsets "really"
- being pure numbers; should be able to allow at _least_ the two
- common idioms
- TIMES 510-$ DB 0 ; bootsector
- MOV AX,(PROG_END-100H)/16 ; .COM TSR
- Would need to call the fixup throughout the evaluator, and the
- fixup would have to be allowed to return UNKNOWN on pass one if it
- had to. (_Always_ returning UNKNOWN on pass one, though a lovely
- clean design, breaks the first of the above examples.)
-
-- Preprocessor identifier concatenation? 1.10
-
-- Arbitrary section names in `bin'. ?
- Is this necessary? Is it even desirable?
- hpa: Desirable, yes. Necessary? Probably not, but there are
- definitely cases where it becomes quite useful.
-
-- Ability to read from a pipe. Obviously not useful under dos, so 1.10
- memory problems with storing entire input file aren't a problem
- either.
-
- Related topic: file caching under DOS/32 bit... 1.10?
- maybe even implement discardable buffers that get thrown away
- when we get a NULL returned from malloc(). Only really useful under
- DOS. Think about it.
-
- Another related topic: possibly spool out the pre-processed 1.10?
- stuff to a file, to avoid having to re-process it. Possible problems
- with preprocessor values not known on pass 1? Have a look...
-
- Or maybe we can spool out a pre-parsed version...? 1.10
- Need to investigate feasibility. Does the results from the parser
- change from pass 1 to pass 2? Would it be feasible to alter it so that
- the parser returns an invariant result, and this is then processed
- afterwards to resolve label references, etc?
-
-- Subsection support? ?
-
-- A good ALIGN mechanism, similar to GAS's. GAS pads out space by 1.10?
- means of the following (32-bit) instructions:
- 8DB42600000000 lea esi,[esi+0x0]
- 8DB600000000 lea esi,[esi+0x0]
- 8D742600 lea esi,[esi+0x0]
- 8D7600 lea esi,[esi+0x0]
- 8D36 lea esi,[esi]
- 90 nop
- It uses up to two of these instructions to do up to 14-byte pads;
- when more than 14 bytes are needed, it issues a (short) jump to
- the end of the padded section and then NOPs the rest. Come up with
- a similar scheme for 16 bit mode, and also come up with a way to
- use it - internal to the assembler, so that programs using ALIGN
- don't knock over preprocess-only mode.
- Also re-work the macro form so that when given one argument in a
- code section it calls this feature.
-
-- Possibly a means whereby FP constants can be specified as ?
- immediate operands to non-FP instructions.
- * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP
- constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT
- 1.2 to get the two halves of a double-precision one. Best to
- ignore extended-precision in case it bites.
- * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4
- (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x)
- and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte
- chunks, one-byte chunks, even stranger chunks, and pieces of
- ten-byte reals to be bandied around as well.
-
-- A UNION macro might be quite cool, now that ABSOLUTE is sane ?
- enough to be able to handle it.
-
-- An equivalent to gcc's ## stringify operator, plus string ?
- concatenation, somehow implemented without undue ugliness, so as
- to be able to do `%include "/my/path/%1"' in a macro, or something
- similar...
-
-- Actually _do_ something with the processor, privileged and 1.10
- undocumented flags in the instruction table. When this happens,
- consider allowing PMULHRW to map to either of the Cyrix or AMD
- versions?
- hpa: The -p option to ndisasm now uses this to some extent.
-
-- Maybe NEC V20/V30 instructions? ?
- hpa: What are they? Should be trivial to implement.
-
-- Yet more object formats.
- * Possibly direct support for .EXE files? 1.10
-
-- Symbol map in binary format. Format-specific options... 1.10?
-
-- REDESIGN: Think about EQU dependency, and about start-point 1.20?
- specification in OBJ. Possibly re-think directive support.
-
-- Think about a wrapper program like gcc? Possibly invent a _patch_ 2.00?
- for gcc so that it can take .asm files on the command line?
-
-- If a wrapper happens, think about adding an option to cause the ?
- resulting executable file to be executed immediately, thus
- allowing NASM source files to have #!... (probably silly)
-
-- Multi-platform support? If so: definitely Alpha; possibly Java ?
- byte code; probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe
- Vax. Perhaps Z80 and 6502, just for a laugh?
-
-- Consider a 'verbose' option that prints information about the ?
- resulting object file onto stdout.
-
-- Line numbers in the .lst file don't match the line numbers in the ?
- input. They probably should, rather than the current matching
- of the post-preprocessor line numbers.
-
diff --git a/insns.dat b/insns.dat
index 353aa80f..c82ad168 100644
--- a/insns.dat
+++ b/insns.dat
@@ -830,11 +830,11 @@ PUNPCKHDQ mmxreg,mem \301\2\x0F\x6A\110 PENT,MMX,SM
PUNPCKHDQ mmxreg,mmxreg \2\x0F\x6A\110 PENT,MMX
PUNPCKHWD mmxreg,mem \301\2\x0F\x69\110 PENT,MMX,SM
PUNPCKHWD mmxreg,mmxreg \2\x0F\x69\110 PENT,MMX
-PUNPCKLBW mmxreg,mem32 \301\2\x0F\x60\110 PENT,MMX
+PUNPCKLBW mmxreg,mem \301\2\x0F\x60\110 PENT,MMX,SM
PUNPCKLBW mmxreg,mmxreg \2\x0F\x60\110 PENT,MMX
-PUNPCKLDQ mmxreg,mem32 \301\2\x0F\x62\110 PENT,MMX
+PUNPCKLDQ mmxreg,mem \301\2\x0F\x62\110 PENT,MMX,SM
PUNPCKLDQ mmxreg,mmxreg \2\x0F\x62\110 PENT,MMX
-PUNPCKLWD mmxreg,mem32 \301\2\x0F\x61\110 PENT,MMX
+PUNPCKLWD mmxreg,mem \301\2\x0F\x61\110 PENT,MMX,SM
PUNPCKLWD mmxreg,mmxreg \2\x0F\x61\110 PENT,MMX
PUSH reg16 \320\10\x50 8086
PUSH reg32 \321\10\x50 386
diff --git a/insns.pl b/insns.pl
index c1eacb17..914f84c4 100644
--- a/insns.pl
+++ b/insns.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-#
+#
# insns.pl produce insnsa.c, insnsd.c, insnsi.h, insnsn.c from insns.dat
#
# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
diff --git a/install-sh b/install-sh
index ebc66913..f39433a7 100755
--- a/install-sh
+++ b/install-sh
@@ -1,5 +1,5 @@
#! /bin/sh
-#
+#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
diff --git a/lcc/Readme b/lcc/Readme
deleted file mode 100644
index 569b9be7..00000000
--- a/lcc/Readme
+++ /dev/null
@@ -1,52 +0,0 @@
-This directory contains the necessary files to port the C compiler
-``LCC'' (available by FTP from sunsite.doc.ic.ac.uk in the directory
-/computing/programming/languages/c/lcc) to compile for Linux (a.out
-or ELF) by using NASM as a back-end code generator.
-
-This patch has been tested on lcc version 3.6.
-
-To install:
-
-- Copy `x86nasm.md' into the `src' directory of the lcc tree.
-
-- Copy either `lin-elf.c' or `lin-aout.c' into the `etc' directory.
-
-- If you're installing for a.out, edit `x86nasm.md' and change the
- conditional after the comment reading "CHANGE THIS FOR a.out" in
- the `defsymbol' function from `#if 0' to `#if 1'.
-
-- Make the following changes to `bind.c' in the `src' directory:
-
- - Near the top of the file, add a line that reads
- extern Interface x86nasmIR;
-
- - In the `bindings' array, add the lines
- "x86-nasm", &x86nasmIR,
- "x86/nasm", &x86nasmIR,
- (in sensible looking places...)
-
- A sample `bind.c' has been provided to show what the result of
- this might look like. You might be able to get away with using it
- directly...
-
-- Modify the lcc makefile to include rules for x86nasm.o: this will
- have to be done in about three places. Just copy any line with
- `x86' on it and modify it to read `x86nasm' everywhere. (Except
- that in the list of object files that rcc is made up from, do
- remember to ensure that every line but the last has a trailing
- backslash...)
-
-- You may have to modify the contents of `lin-elf.c' or `lin-aout.c'
- to reflect the true locations of files such as crt0.o, crt1.o,
- ld-linux.so and so forth. If you don't know where to find these,
- compile a short C program with `gcc -v' and see what command line
- gcc feeds to `ld'.
-
-- You should now be able to build lcc, using `lin-elf.c' or
- `lin-aout.c' as the system-dependent part of the `lcc' wrapper
- program.
-
-- Symlink x86nasm.c into the `src' directory before attempting the
- triple test, or the compile will fail.
-
-- Now it should pass the triple test, on either ELF or a.out. Voila!
diff --git a/macros.c b/macros.c
deleted file mode 100644
index ed70a75e..00000000
--- a/macros.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* This file auto-generated from standard.mac by macros.pl - don't edit it */
-
-static char *stdmac[] = {
- "%define __NASM_MAJOR__ 0",
- "%define __NASM_MINOR__ 98",
- "%define __FILE__",
- "%define __LINE__",
- "%define __SECT__",
- "%imacro section 1+.nolist",
- "%define __SECT__ [section %1]",
- "__SECT__",
- "%endmacro",
- "%imacro segment 1+.nolist",
- "%define __SECT__ [segment %1]",
- "__SECT__",
- "%endmacro",
- "%imacro absolute 1+.nolist",
- "%define __SECT__ [absolute %1]",
- "__SECT__",
- "%endmacro",
- "%imacro struc 1.nolist",
- "%push struc",
- "%define %$strucname %1",
- "[absolute 0]",
- "%$strucname:",
- "%endmacro",
- "%imacro endstruc 0.nolist",
- "%{$strucname}_size:",
- "%pop",
- "__SECT__",
- "%endmacro",
- "%imacro istruc 1.nolist",
- "%push istruc",
- "%define %$strucname %1",
- "%$strucstart:",
- "%endmacro",
- "%imacro at 1-2+.nolist",
- "times %1-($-%$strucstart) db 0",
- "%2",
- "%endmacro",
- "%imacro iend 0.nolist",
- "times %{$strucname}_size-($-%$strucstart) db 0",
- "%pop",
- "%endmacro",
- "%imacro align 1-2+.nolist nop",
- "times ($$-$) & ((%1)-1) %2",
- "%endmacro",
- "%imacro alignb 1-2+.nolist resb 1",
- "times ($$-$) & ((%1)-1) %2",
- "%endmacro",
- "%imacro extern 1-*.nolist",
- "%rep %0",
- "[extern %1]",
- "%rotate 1",
- "%endrep",
- "%endmacro",
- "%imacro bits 1+.nolist",
- "[bits %1]",
- "%endmacro",
- "%imacro global 1-*.nolist",
- "%rep %0",
- "[global %1]",
- "%rotate 1",
- "%endrep",
- "%endmacro",
- "%imacro common 1-*.nolist",
- "%rep %0",
- "[common %1]",
- "%rotate 1",
- "%endrep",
- "%endmacro",
- NULL
-};
diff --git a/macros.pl b/macros.pl
index 097cb712..15739f5c 100644
--- a/macros.pl
+++ b/macros.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-#
+#
# macros.pl produce macros.c from standard.mac
#
# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
diff --git a/makedist.sh b/makedist.sh
index 78f078a9..aadd671e 100755
--- a/makedist.sh
+++ b/makedist.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-
+
MAJORVER=`grep NASM_MAJOR_VER nasm.h | head -1 | cut -f3 -d' '`
MINORVER=`grep NASM_MINOR_VER nasm.h | head -1 | cut -f3 -d' '`
VERSION=`grep NASM_VER nasm.h | head -1 | cut -f3 -d' ' | sed s/\"//g`
diff --git a/misc/findleak.pl b/misc/findleak.pl
index 727628b4..dbb33671 100644
--- a/misc/findleak.pl
+++ b/misc/findleak.pl
@@ -1,4 +1,6 @@
#!/usr/bin/perl
+# From: Ed Beroset <beroset@mindspring.com>
+
my %mem = {};
my %alloc = {};
while(<>)
@@ -38,4 +40,3 @@ foreach $goo (sort keys %mem)
print "$mem{$goo} $alloc{$goo}";
}
}
-# From: Ed Beroset <beroset@mindspring.com>
diff --git a/misc/nasmstab b/misc/nasmstab
index d61d88a8..32ef67e0 100644
--- a/misc/nasmstab
+++ b/misc/nasmstab
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-
+
sub StabLine ($ $ $ $ $ $) {
local ($comment,$n_strx,$type,$other,$desc,$value) = @_;
print $comment;
diff --git a/misc/pmw.bat b/misc/pmw.bat
index 8ed2beff..88b67a59 100644
--- a/misc/pmw.bat
+++ b/misc/pmw.bat
@@ -1,7 +1,7 @@
@echo off
rem some batch file to bind nasm and ndisasm with pmode/w
rem a mega cool dos extender for watcom done by tran
-rem
+rem
rem max 8 megs, dpmi stack 256*16=4096, no banner
pmwlite.exe nasm.exe
pmwsetup.exe /X8388608 /P256 /B0 nasm.exe
diff --git a/misc/simon.jpg b/misc/simon.jpg
new file mode 100644
index 00000000..574fcb44
--- /dev/null
+++ b/misc/simon.jpg
Binary files differ
diff --git a/nasm-dir b/nasm-dir
new file mode 100755
index 00000000..6643851e
--- /dev/null
+++ b/nasm-dir
@@ -0,0 +1,5 @@
+#!/bin/sh
+# returns nasm directory
+# used for dist building
+
+basename `pwd`
diff --git a/nasm-version b/nasm-version
new file mode 100755
index 00000000..e6de6b99
--- /dev/null
+++ b/nasm-version
@@ -0,0 +1,5 @@
+#!/bin/sh
+# returns nasm version from nasm.h
+# used for dist building
+
+grep NASM_VER nasm.h | awk -F " " -F "\"" '{print $2}'
diff --git a/nasm.1 b/nasm.1
index 1e682391..198a2495 100644
--- a/nasm.1
+++ b/nasm.1
@@ -71,6 +71,12 @@ easily redirected.
Causes
.B nasm
to exit immediately, after displaying its version number.
+.I (obsolete)
+.TP
+.BI \-v
+Causes
+.B nasm
+to exit immediately, after displaying its version number.
.TP
.BI \-f " format"
Specifies the output file format. Formats include
diff --git a/nasm.c b/nasm.c
index 14ef45bc..a0446d83 100644
--- a/nasm.c
+++ b/nasm.c
@@ -80,7 +80,7 @@ static enum op_type operating_mode;
* doesn't do anything. Initial defaults are given here.
*/
static char suppressed[1+ERR_WARN_MAX] = {
- 0, TRUE, TRUE, TRUE, FALSE
+ 0, TRUE, TRUE, TRUE, FALSE, TRUE
};
/*
@@ -89,6 +89,7 @@ static char suppressed[1+ERR_WARN_MAX] = {
*/
static char *suppressed_names[1+ERR_WARN_MAX] = {
NULL, "macro-params", "macro-selfref", "orphan-labels", "number-overflow",
+ "gnu-elf-extensions"
};
/*
@@ -100,7 +101,8 @@ static char *suppressed_what[1+ERR_WARN_MAX] = {
"macro calls with wrong no. of params",
"cyclic macro self-references",
"labels alone on lines without trailing `:'",
- "numeric constants greater than 0xFFFFFFFF"
+ "numeric constants greater than 0xFFFFFFFF",
+ "using 8- or 16-bit relocation in ELF, a GNU extension"
};
/*
@@ -446,7 +448,7 @@ static int process_arg (char *p, char *q)
" -w+foo enables warnings about foo; -w-foo disables them\n"
"where foo can be:\n");
for (i=1; i<=ERR_WARN_MAX; i++)
- printf(" %-16s%s (default %s)\n",
+ printf(" %-23s %s (default %s)\n",
suppressed_names[i], suppressed_what[i],
suppressed[i] ? "off" : "on");
printf ("\nresponse files should contain command line parameters"
diff --git a/nasm.h b/nasm.h
index 63400b2c..ca2c6aae 100644
--- a/nasm.h
+++ b/nasm.h
@@ -13,7 +13,7 @@
#define NASM_MAJOR_VER 0
#define NASM_MINOR_VER 98
-#define NASM_VER "0.98.26"
+#define NASM_VER "0.98.30"
#ifndef NULL
#define NULL 0
@@ -97,7 +97,8 @@ typedef void (*efunc) (int severity, char *fmt, ...);
#define ERR_WARN_OL 0x00000300 /* orphan label (no colon, and
* alone on line) */
#define ERR_WARN_NOV 0x00000400 /* numeric overflow */
-#define ERR_WARN_MAX 4 /* the highest numbered one */
+#define ERR_WARN_GNUELF 0x00000500 /* using GNU ELF extensions */
+#define ERR_WARN_MAX 5 /* the highest numbered one */
/*
* -----------------------
diff --git a/outforms.h b/outforms.h
deleted file mode 100644
index 2afbbe27..00000000
--- a/outforms.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* outform.h header file for binding output format drivers to the
- * remainder of the code in the Netwide Assembler
- *
- * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
- * Julian Hall. All rights reserved. The software is
- * redistributable under the licence given in the file "Licence"
- * distributed in the NASM archive.
- */
-
-/*
- * This header file allows configuration of which output formats
- * get compiled into the NASM binary. You can configure by defining
- * various preprocessor symbols beginning with "OF_", either on the
- * compiler command line or at the top of this file.
- *
- * OF_ONLY -- only include specified object formats
- * OF_name -- ensure that output format 'name' is included
- * OF_NO_name -- remove output format 'name'
- * OF_DOS -- ensure that 'obj', 'bin' & 'win32' are included.
- * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf' are in.
- * OF_OTHERS -- ensure that 'bin', 'as86' & 'rdf' are in.
- * OF_ALL -- ensure that all formats are included.
- *
- * OF_DEFAULT=of_name -- ensure that 'name' is the default format.
- *
- * eg: -DOF_UNIX -DOF_ELF -DOF_DEFAULT=of_elf would be a suitable config
- * for an average linux system.
- *
- * Default config = -DOF_ALL -DOF_DEFAULT=of_bin
- *
- * You probably only want to set these options while compiling 'nasm.c'. */
-
-#ifndef NASM_OUTFORMS_H
-#define NASM_OUTFORMS_H
-
-#include "nasm.h"
-
-/* -------------- USER MODIFIABLE PART ---------------- */
-
-/*
- * Insert #defines here in accordance with the configuration
- * instructions above.
- *
- * E.g.
- *
- * #define OF_ONLY
- * #define OF_OBJ
- * #define OF_BIN
- *
- * for a 16-bit DOS assembler with no extraneous formats.
- */
-
-/* ------------ END USER MODIFIABLE PART -------------- */
-
-/* ====configurable info begins here==== */
-/* formats configurable:
- * bin,obj,elf,aout,aoutb,coff,win32,as86,rdf */
-
-/* process options... */
-
-#ifndef OF_ONLY
-#ifndef OF_ALL
-#define OF_ALL /* default is to have all formats */
-#endif
-#endif
-
-#ifdef OF_ALL /* set all formats on... */
-#ifndef OF_BIN
-#define OF_BIN
-#endif
-#ifndef OF_OBJ
-#define OF_OBJ
-#endif
-#ifndef OF_ELF
-#define OF_ELF
-#endif
-#ifndef OF_COFF
-#define OF_COFF
-#endif
-#ifndef OF_AOUT
-#define OF_AOUT
-#endif
-#ifndef OF_AOUTB
-#define OF_AOUTB
-#endif
-#ifndef OF_WIN32
-#define OF_WIN32
-#endif
-#ifndef OF_AS86
-#define OF_AS86
-#endif
-#ifndef OF_RDF
-#define OF_RDF
-#endif
-#endif /* OF_ALL */
-
-/* turn on groups of formats specified.... */
-#ifdef OF_DOS
-#ifndef OF_OBJ
-#define OF_OBJ
-#endif
-#ifndef OF_BIN
-#define OF_BIN
-#endif
-#ifndef OF_WIN32
-#define OF_WIN32
-#endif
-#endif
-
-#ifdef OF_UNIX
-#ifndef OF_AOUT
-#define OF_AOUT
-#endif
-#ifndef OF_AOUTB
-#define OF_AOUTB
-#endif
-#ifndef OF_COFF
-#define OF_COFF
-#endif
-#ifndef OF_ELF
-#define OF_ELF
-#endif
-#endif
-
-#ifdef OF_OTHERS
-#ifndef OF_BIN
-#define OF_BIN
-#endif
-#ifndef OF_AS86
-#define OF_AS86
-#endif
-#ifndef OF_RDF
-#define OF_RDF
-#endif
-#endif
-
-/* finally... override any format specifically specifed to be off */
-#ifdef OF_NO_BIN
-#undef OF_BIN
-#endif
-#ifdef OF_NO_OBJ
-#undef OF_OBJ
-#endif
-#ifdef OF_NO_ELF
-#undef OF_ELF
-#endif
-#ifdef OF_NO_AOUT
-#undef OF_AOUT
-#endif
-#ifdef OF_NO_AOUTB
-#undef OF_AOUTB
-#endif
-#ifdef OF_NO_COFF
-#undef OF_COFF
-#endif
-#ifdef OF_NO_WIN32
-#undef OF_WIN32
-#endif
-#ifdef OF_NO_AS86
-#undef OF_AS86
-#endif
-#ifdef OF_NO_RDF
-#undef OF_RDF
-#endif
-
-#ifndef OF_DEFAULT
-#define OF_DEFAULT of_bin
-#endif
-
-#ifdef BUILD_DRIVERS_ARRAY /* only if included from outform.c */
-
-/* pull in the externs for the different formats, then make the *drivers
- * array based on the above defines */
-
-extern struct ofmt of_bin;
-extern struct ofmt of_aout;
-extern struct ofmt of_aoutb;
-extern struct ofmt of_coff;
-extern struct ofmt of_elf;
-extern struct ofmt of_as86;
-extern struct ofmt of_obj;
-extern struct ofmt of_win32;
-extern struct ofmt of_rdf;
-extern struct ofmt of_dbg;
-
-struct ofmt *drivers[]={
-#ifdef OF_BIN
- &of_bin,
-#endif
-#ifdef OF_AOUT
- &of_aout,
-#endif
-#ifdef OF_AOUTB
- &of_aoutb,
-#endif
-#ifdef OF_COFF
- &of_coff,
-#endif
-#ifdef OF_ELF
- &of_elf,
-#endif
-#ifdef OF_AS86
- &of_as86,
-#endif
-#ifdef OF_OBJ
- &of_obj,
-#endif
-#ifdef OF_WIN32
- &of_win32,
-#endif
-#ifdef OF_RDF
- &of_rdf,
-#endif
-#ifdef OF_DBG
- &of_dbg,
-#endif
-
- NULL
-};
-
-#endif /* BUILD_DRIVERS_ARRAY */
-
-#endif /* NASM_OUTFORMS_H */
diff --git a/outaout.c b/output/outaout.c
index b8e74be5..b8e74be5 100644
--- a/outaout.c
+++ b/output/outaout.c
diff --git a/outas86.c b/output/outas86.c
index 8c695675..8c695675 100644
--- a/outas86.c
+++ b/output/outas86.c
diff --git a/outbin.c b/output/outbin.c
index 95ac5da7..95ac5da7 100644
--- a/outbin.c
+++ b/output/outbin.c
diff --git a/outcoff.c b/output/outcoff.c
index 973d9fe7..973d9fe7 100644
--- a/outcoff.c
+++ b/output/outcoff.c
diff --git a/outdbg.c b/output/outdbg.c
index 723e372d..723e372d 100644
--- a/outdbg.c
+++ b/output/outdbg.c
diff --git a/outelf.c b/output/outelf.c
index 38f4a563..ddd87fe2 100644
--- a/outelf.c
+++ b/output/outelf.c
@@ -21,12 +21,23 @@
/*
* Relocation types.
*/
-#define R_386_32 1 /* ordinary absolute relocation */
-#define R_386_PC32 2 /* PC-relative relocation */
-#define R_386_GOT32 3 /* an offset into GOT */
-#define R_386_PLT32 4 /* a PC-relative offset into PLT */
-#define R_386_GOTOFF 9 /* an offset from GOT base */
-#define R_386_GOTPC 10 /* a PC-relative offset _to_ GOT */
+enum reloc_type {
+ R_386_32 = 1, /* ordinary absolute relocation */
+ R_386_PC32 = 2, /* PC-relative relocation */
+ R_386_GOT32 = 3, /* an offset into GOT */
+ R_386_PLT32 = 4, /* a PC-relative offset into PLT */
+ R_386_COPY = 5, /* ??? */
+ R_386_GLOB_DAT = 6, /* ??? */
+ R_386_JUMP_SLOT = 7, /* ??? */
+ R_386_RELATIVE = 8, /* ??? */
+ R_386_GOTOFF = 9, /* an offset from GOT base */
+ R_386_GOTPC = 10, /* a PC-relative offset _to_ GOT */
+ /* These are GNU extensions, but useful */
+ R_386_16 = 20, /* A 16-bit absolute relocation */
+ R_386_PC16 = 21, /* A 16-bit PC-relative relocation */
+ R_386_8 = 22, /* An 8-bit absolute relocation */
+ R_386_PC8 = 23 /* An 8-bit PC-relative relocation */
+};
struct Reloc {
struct Reloc *next;
@@ -709,6 +720,7 @@ static void elf_out (long segto, void *data, unsigned long type,
error(ERR_PANIC, "OUT_RAWDATA with other than NO_SEG");
elf_sect_write (s, data, realbytes);
} else if (type == OUT_ADDRESS) {
+ int gnu16 = 0;
addr = *(long *)data;
if (segment != NO_SEG) {
if (segment % 2) {
@@ -716,7 +728,12 @@ static void elf_out (long segto, void *data, unsigned long type,
" segment base references");
} else {
if (wrt == NO_SEG) {
+ if ( realbytes == 2 ) {
+ gnu16 = 1;
+ elf_add_reloc (s, segment, R_386_16);
+ } else {
elf_add_reloc (s, segment, R_386_32);
+ }
} else if (wrt == elf_gotpc_sect+1) {
/*
* The user will supply GOT relative to $$. ELF
@@ -731,8 +748,14 @@ static void elf_out (long segto, void *data, unsigned long type,
addr = elf_add_gsym_reloc (s, segment, addr,
R_386_GOT32, TRUE);
} else if (wrt == elf_sym_sect+1) {
+ if ( realbytes == 2 ) {
+ gnu16 = 1;
+ addr = elf_add_gsym_reloc (s, segment, addr,
+ R_386_16, FALSE);
+ } else {
addr = elf_add_gsym_reloc (s, segment, addr,
R_386_32, FALSE);
+ }
} else if (wrt == elf_plt_sect+1) {
error(ERR_NONFATAL, "ELF format cannot produce non-PC-"
"relative PLT references");
@@ -744,14 +767,35 @@ static void elf_out (long segto, void *data, unsigned long type,
}
}
p = mydata;
- if (realbytes != 4 && segment != NO_SEG)
- error (ERR_NONFATAL, "ELF format does not support non-32-bit"
- " relocations");
- WRITELONG (p, addr);
+ if (gnu16) {
+ error(ERR_WARNING|ERR_WARN_GNUELF,
+ "16-bit relocations in ELF is a GNU extension");
+ WRITESHORT (p, addr);
+ } else {
+ if (realbytes != 4 && segment != NO_SEG) {
+ error (ERR_NONFATAL, "Unsupported non-32-bit ELF relocation");
+ }
+ WRITELONG (p, addr);
+ }
elf_sect_write (s, mydata, realbytes);
} else if (type == OUT_REL2ADR) {
- error (ERR_NONFATAL, "ELF format does not support 16-bit"
- " relocations");
+ if (segment == segto)
+ error(ERR_PANIC, "intra-segment OUT_REL2ADR");
+ if (segment != NO_SEG && segment % 2) {
+ error(ERR_NONFATAL, "ELF format does not support"
+ " segment base references");
+ } else {
+ if (wrt == NO_SEG) {
+ error (ERR_WARNING|ERR_WARN_GNUELF,
+ "16-bit relocations in ELF is a GNU extension");
+ elf_add_reloc (s, segment, R_386_PC16);
+ } else {
+ error (ERR_NONFATAL, "Unsupported non-32-bit ELF relocation");
+ }
+ }
+ p = mydata;
+ WRITESHORT (p, *(long*)data - realbytes);
+ elf_sect_write (s, mydata, 2L);
} else if (type == OUT_REL4ADR) {
if (segment == segto)
error(ERR_PANIC, "intra-segment OUT_REL4ADR");
diff --git a/zoutieee.c b/output/outieee.c
index 9784e797..9784e797 100644
--- a/zoutieee.c
+++ b/output/outieee.c
diff --git a/outobj.c b/output/outobj.c
index 4d8b6c96..4d8b6c96 100644
--- a/outobj.c
+++ b/output/outobj.c
diff --git a/outrdf.c b/output/outrdf.c
index d9989e52..d9989e52 100644
--- a/outrdf.c
+++ b/output/outrdf.c
diff --git a/outrdf2.c b/output/outrdf2.c
index e0988739..e0988739 100644
--- a/outrdf2.c
+++ b/output/outrdf2.c
diff --git a/parser.c b/parser.c
index 23d32926..653f8a69 100644
--- a/parser.c
+++ b/parser.c
@@ -122,7 +122,7 @@ insn *parse_line (int pass, char *buffer, insn *result,
expr *value;
i = stdscan(NULL, &tokval);
- value = evaluate (stdscan, NULL, &tokval, NULL, pass, error, NULL);
+ value = evaluate (stdscan, NULL, &tokval, NULL, pass0, error, NULL);
i = tokval.t_type;
if (!value) { /* but, error in evaluator */
result->opcode = -1; /* unrecoverable parse error: */
@@ -189,9 +189,10 @@ insn *parse_line (int pass, char *buffer, insn *result,
result->opcode == I_RESD ||
result->opcode == I_RESQ ||
result->opcode == I_REST ||
- result->opcode == I_EQU)
+ result->opcode == I_EQU ||
+ result->opcode == I_INCBIN) /* fbk */
{
- critical = pass;
+ critical = pass0;
}
else
critical = (pass==2 ? 2 : 0);
diff --git a/rdoff/Makefile.dj b/rdoff/Makefile.dj
deleted file mode 100644
index 20997395..00000000
--- a/rdoff/Makefile.dj
+++ /dev/null
@@ -1,75 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-#
-# Auto-configuring Makefile for RDOFF object file utils; part of the
-# Netwide Assembler
-#
-# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
-# Julian Hall. All rights reserved. The software is
-# redistributable under the licence given in the file "Licence"
-# distributed in the NASM archive.
-
-# You may need to adjust these values.
-
-prefix = /djgpp
-CC = gcc -s
-CFLAGS = -O2 -I..
-
-# You _shouldn't_ need to adjust anything below this line.
-
-exec_prefix = ${prefix}
-bindir = ${exec_prefix}/bin
-mandir = ${prefix}/man
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_DATA = ${INSTALL} -m 644
-LN_S = ln -s
-
-LDRDFLIBS = rdoff.o ../nasmlib.o symtab.o hash.o collectn.o rdlib.o segtab.o
-RDXLIBS = rdoff.o rdfload.o symtab.o hash.o collectn.o
-
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-
-all: rdfdump ldrdf rdx rdflib rdf2bin rdf2com
-
-rdfdump: rdfdump.o
- $(CC) -o rdfdump rdfdump.o
-
-ldrdf: ldrdf.o $(LDRDFLIBS)
- $(CC) -o ldrdf ldrdf.o $(LDRDFLIBS)
-rdx: rdx.o $(RDXLIBS)
- $(CC) -o rdx rdx.o $(RDXLIBS)
-rdflib: rdflib.o
- $(CC) -o rdflib rdflib.o
-rdf2bin: rdf2bin.o $(RDXLIBS) nasmlib.o
- $(CC) -o rdf2bin rdf2bin.o $(RDXLIBS) nasmlib.o
-rdf2com:
- $(LN_S) rdf2bin rdf2com
-
-rdf2bin.o: rdf2bin.c
-rdfdump.o: rdfdump.c
-rdoff.o: rdoff.c rdoff.h
-ldrdf.o: ldrdf.c rdoff.h ../nasmlib.h symtab.h collectn.h rdlib.h
-symtab.o: symtab.c symtab.h hash.h
-collectn.o: collectn.c collectn.h
-rdx.o: rdx.c rdoff.h rdfload.h symtab.h
-rdfload.o: rdfload.c rdfload.h rdoff.h collectn.h symtab.h
-rdlib.o: rdlib.c rdlib.h
-rdflib.o: rdflib.c
-hash.o: hash.c hash.h
-segtab.o: segtab.c segtab.h
-
-nasmlib.o: ../nasmlib.c ../nasmlib.h ../names.c ../nasm.h
- $(CC) -c $(CFLAGS) ../nasmlib.c
-
-clean:
- rm -f *.o rdfdump ldrdf rdx rdflib rdf2bin rdf2com
-
-install: rdfdump ldrdf rdx rdflib rdf2bin rdf2com
- $(INSTALL_PROGRAM) rdfdump $(bindir)/rdfdump
- $(INSTALL_PROGRAM) ldrdf $(bindir)/ldrdf
- $(INSTALL_PROGRAM) rdx $(bindir)/rdx
- $(INSTALL_PROGRAM) rdflib $(bindir)/rdflib
- $(INSTALL_PROGRAM) rdf2bin $(bindir)/rdf2bin
- cd $(bindir); $(LN_S) rdf2bin rdf2com
diff --git a/rdoff/Makefile.emx b/rdoff/Makefile.emx
deleted file mode 100644
index fbaa934c..00000000
--- a/rdoff/Makefile.emx
+++ /dev/null
@@ -1,76 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# $Id$
-#
-# Auto-configuring Makefile for RDOFF object file utils; part of the
-# Netwide Assembler
-#
-# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
-# Julian Hall. All rights reserved. The software is
-# redistributable under the licence given in the file "Licence"
-# distributed in the NASM archive.
-
-top_srcdir = ..
-srcdir = .
-prefix = /usr/local
-exec_prefix = ${prefix}
-bindir = ${exec_prefix}/bin
-mandir = ${prefix}/man
-
-CC = gcc
-CFLAGS = -s -Zomf -O2 -fomit-frame-pointer -Wall -ansi -pedantic -I$(srcdir) -I$(top_srcdir)
-LDFLAGS = -s -Zomf -Zexe -Zcrtdll
-LIBS = -lgcc
-
-INSTALL = .././install-sh -c
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_DATA = ${INSTALL} -m 644
-
-LDRDFLIBS = rdoff.o nasmlib.o symtab.o collectn.o rdlib.o segtab.o hash.o
-RDXLIBS = rdoff.o rdfload.o symtab.o collectn.o hash.o
-
-.c.o:
- $(CC) -c $(CFLAGS) -o $@ $<
-
-all: rdfdump ldrdf rdx rdflib rdf2bin
-
-rdfdump: rdfdump.o
- $(CC) $(LDFLAGS) -o rdfdump rdfdump.o $(LIBS)
-ldrdf: ldrdf.o $(LDRDFLIBS)
- $(CC) $(LDFLAGS) -o ldrdf ldrdf.o $(LDRDFLIBS) $(LIBS)
-rdx: rdx.o $(RDXLIBS)
- $(CC) $(LDFLAGS) -o rdx rdx.o $(RDXLIBS) $(LIBS)
-rdflib: rdflib.o
- $(CC) $(LDFLAGS) -o rdflib rdflib.o $(LIBS)
-rdf2bin: rdf2bin.o $(RDXLIBS) nasmlib.o
- $(CC) $(LDFLAGS) -o rdf2bin rdf2bin.o $(RDXLIBS) nasmlib.o $(LIBS)
-
-rdf2bin.o: rdf2bin.c
-rdfdump.o: rdfdump.c
-rdoff.o: rdoff.c rdoff.h
-ldrdf.o: ldrdf.c rdoff.h $(top_srcdir)/nasmlib.h symtab.h collectn.h rdlib.h
-symtab.o: symtab.c symtab.h
-collectn.o: collectn.c collectn.h
-rdx.o: rdx.c rdoff.h rdfload.h symtab.h
-rdfload.o: rdfload.c rdfload.h rdoff.h collectn.h symtab.h
-rdlib.o: rdlib.c rdlib.h
-rdflib.o: rdflib.c
-segtab.o: segtab.c
-
-nasmlib.o: $(top_srcdir)/nasmlib.c
- $(CC) -c $(CFLAGS) -o $@ $(top_srcdir)/nasmlib.c
-
-clean:
- rm -f *.o rdfdump ldrdf rdx rdflib rdf2bin rdf2com
-
-spotless: clean
- rm -f Makefile
-
-distclean: spotless
-
-install: rdfdump ldrdf rdx rdflib rdf2bin rdf2com
- $(INSTALL_PROGRAM) rdfdump $(INSTALLROOT)$(bindir)/rdfdump
- $(INSTALL_PROGRAM) ldrdf $(INSTALLROOT)$(bindir)/ldrdf
- $(INSTALL_PROGRAM) rdx $(INSTALLROOT)$(bindir)/rdx
- $(INSTALL_PROGRAM) rdflib $(INSTALLROOT)$(bindir)/rdflib
- $(INSTALL_PROGRAM) rdf2bin $(INSTALLROOT)$(bindir)/rdf2bin
- cd $(INSTALLROOT)$(bindir) && rm -f rdf2com && $(LN_S) rdf2bin rdf2com
diff --git a/rdoff/Makefile.sc b/rdoff/Makefile.sc
deleted file mode 100644
index 7b45fe7e..00000000
--- a/rdoff/Makefile.sc
+++ /dev/null
@@ -1,56 +0,0 @@
-# Makefile for RDOFF object file utils; part of the Netwide Assembler
-#
-# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
-# Julian Hall. All rights reserved. The software is
-# redistributable under the licence given in the file "Licence"
-# distributed in the NASM archive.
-#
-# This Makefile is designed for use under Unix (probably fairly
-# portably).
-
-CC = sc
-CCFLAGS = -I..\ -c -a1 -mn -Nc -w2 -w7 -o+time -5
-LINK = link
-LINKFLAGS = /noi /exet:NT /su:console
-
-OBJ=obj
-EXE=.exe
-
-NASMLIB = ..\nasmlib.$(OBJ)
-NASMLIB_H = ..\nasmlib.h
-LDRDFLIBS = rdoff.$(OBJ) $(NASMLIB) symtab.$(OBJ) collectn.$(OBJ) rdlib.$(OBJ)
-RDXLIBS = rdoff.$(OBJ) rdfload.$(OBJ) symtab.$(OBJ) collectn.$(OBJ)
-
-.c.$(OBJ):
- $(CC) $(CCFLAGS) $*.c
-
-all : rdfdump$(EXE) ldrdf$(EXE) rdx$(EXE) rdflib$(EXE) rdf2bin$(EXE) rdf2com$(EXE)
-
-rdfdump$(EXE) : rdfdump.$(OBJ)
- $(LINK) $(LINKFLAGS) rdfdump.$(OBJ), rdfdump$(EXE);
-ldrdf$(EXE) : ldrdf.$(OBJ) $(LDRDFLIBS)
- $(LINK) $(LINKFLAGS) ldrdf.$(OBJ) $(LDRDFLIBS), ldrdf$(EXE);
-rdx$(EXE) : rdx.$(OBJ) $(RDXLIBS)
- $(LINK) $(LINKFLAGS) rdx.$(OBJ) $(RDXLIBS), rdx$(EXE);
-rdflib$(EXE) : rdflib.$(OBJ)
- $(LINK) $(LINKFLAGS) rdflib.$(OBJ), rdflib$(EXE);
-rdf2bin$(EXE) : rdf2bin.$(OBJ) $(RDXLIBS) $(NASMLIB)
- $(LINK) $(LINKFLAGS) rdf2bin.$(OBJ) $(RDXLIBS) $(NASMLIB), rdf2bin$(EXE);
-rdf2com$(EXE) : rdf2bin$(EXE)
- copy rdf2bin$(EXE) rdf2com$(EXE)
-
-rdf2bin.$(OBJ) : rdf2bin.c
-rdfdump.$(OBJ) : rdfdump.c
-rdoff.$(OBJ) : rdoff.c rdoff.h
-ldrdf.$(OBJ) : ldrdf.c rdoff.h $(NASMLIB_H) symtab.h collectn.h rdlib.h
-symtab.$(OBJ) : symtab.c symtab.h
-collectn.$(OBJ) : collectn.c collectn.h
-rdx.$(OBJ) : rdx.c rdoff.h rdfload.h symtab.h
-rdfload.$(OBJ) : rdfload.c rdfload.h rdoff.h collectn.h symtab.h
-rdlib.$(OBJ) : rdlib.c rdlib.h
-rdflib.$(OBJ) : rdflib.c
-
-clean :
- del *.$(OBJ) rdfdump$(EXE) ldrdf$(EXE) rdx$(EXE) rdflib$(EXE) rdf2bin$(EXE)
-
-
diff --git a/rdoff/Makefile.unx b/rdoff/Makefile.unx
deleted file mode 100644
index 89d439f8..00000000
--- a/rdoff/Makefile.unx
+++ /dev/null
@@ -1,75 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-#
-# Auto-configuring Makefile for RDOFF object file utils; part of the
-# Netwide Assembler
-#
-# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
-# Julian Hall. All rights reserved. The software is
-# redistributable under the licence given in the file "Licence"
-# distributed in the NASM archive.
-
-# You may need to adjust these values.
-
-prefix = /usr/local
-CC = cc
-CFLAGS = -O -I..
-
-# You _shouldn't_ need to adjust anything below this line.
-
-exec_prefix = ${prefix}
-bindir = ${exec_prefix}/bin
-mandir = ${prefix}/man
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_DATA = ${INSTALL} -m 644
-LN_S = ln -s
-
-LDRDFLIBS = rdoff.o ../nasmlib.o symtab.o hash.o collectn.o rdlib.o segtab.o
-RDXLIBS = rdoff.o rdfload.o symtab.o hash.o collectn.o
-
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-
-all: rdfdump ldrdf rdx rdflib rdf2bin rdf2com
-
-rdfdump: rdfdump.o
- $(CC) -o rdfdump rdfdump.o
-
-ldrdf: ldrdf.o $(LDRDFLIBS)
- $(CC) -o ldrdf ldrdf.o $(LDRDFLIBS)
-rdx: rdx.o $(RDXLIBS)
- $(CC) -o rdx rdx.o $(RDXLIBS)
-rdflib: rdflib.o
- $(CC) -o rdflib rdflib.o
-rdf2bin: rdf2bin.o $(RDXLIBS) nasmlib.o
- $(CC) -o rdf2bin rdf2bin.o $(RDXLIBS) nasmlib.o
-rdf2com:
- $(LN_S) rdf2bin rdf2com
-
-rdf2bin.o: rdf2bin.c
-rdfdump.o: rdfdump.c
-rdoff.o: rdoff.c rdoff.h
-ldrdf.o: ldrdf.c rdoff.h ../nasmlib.h symtab.h collectn.h rdlib.h
-symtab.o: symtab.c symtab.h hash.h
-collectn.o: collectn.c collectn.h
-rdx.o: rdx.c rdoff.h rdfload.h symtab.h
-rdfload.o: rdfload.c rdfload.h rdoff.h collectn.h symtab.h
-rdlib.o: rdlib.c rdlib.h
-rdflib.o: rdflib.c
-hash.o: hash.c hash.h
-segtab.o: segtab.c segtab.h
-
-nasmlib.o: ../nasmlib.c ../nasmlib.h ../names.c ../nasm.h
- $(CC) -c $(CFLAGS) ../nasmlib.c
-
-clean:
- rm -f *.o rdfdump ldrdf rdx rdflib rdf2bin rdf2com
-
-install: rdfdump ldrdf rdx rdflib rdf2bin rdf2com
- $(INSTALL_PROGRAM) rdfdump $(bindir)/rdfdump
- $(INSTALL_PROGRAM) ldrdf $(bindir)/ldrdf
- $(INSTALL_PROGRAM) rdx $(bindir)/rdx
- $(INSTALL_PROGRAM) rdflib $(bindir)/rdflib
- $(INSTALL_PROGRAM) rdf2bin $(bindir)/rdf2bin
- cd $(bindir); $(LN_S) rdf2bin rdf2com
diff --git a/rdoff/test/makelib.sh b/rdoff/test/makelib.sh
index 520bb193..91bffa52 100644
--- a/rdoff/test/makelib.sh
+++ b/rdoff/test/makelib.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-
+
[ $1 ] || {
echo "Usage: $0 <library name> <module> [...]"
exit 1