NASM 0.95
[nasm.git] / Readme
blob97e8beb32e3933d3b73af54f0da0a5a1692b7c04
1 This is a distribution of NASM, the Netwide Assembler. NASM is a
2 prototype general-purpose x86 assembler. It will currently output
3 flat-form binary files, a.out, COFF and ELF Unix object files,
4 Microsoft Win32 and 16-bit DOS object files, OS/2 object files, the
5 as86 object format, and a home-grown format called RDF.
7 Also included is NDISASM, a prototype x86 binary-file disassembler
8 which uses the same instruction table as NASM.
10 To install NASM on Linux, type `make', and then when it has finished
11 copy the file `nasm' (and maybe `ndisasm') to a directory on your
12 search path (maybe /usr/local/bin, or ~/bin if you don't have root
13 access). You may also want to copy the man page `nasm.1' (and maybe
14 `ndisasm.1') to somewhere sensible.
16 To rebuild the DOS sources, various makefiles are provided:
18 - Makefile.dos, the one I build the standard 16-bit releases from,
19   designed for a hybrid system using Microsoft C and Borland Make
20   (don't ask why :-)
21 - Makefile.vc, for Microsoft Visual C++ compiling to a Win32
22   command-line application. This is the one I build the standard
23   Win32 release binaries from.
25 - Makefile.bor, for Borland C.
26 - Makefile.bc2, also for Borland C, contributed by Fox Cutter.
27   Reported to work better than Makefile.bor on some systems.
29 - Makefile.sc, for Symantec C++. Contributed by Mark Junker.
30 - Makefile.wc, for Watcom C, compiling to a 32-bit extended DOS
31   executable. Contributed by Dominik Behr.
32 - Makefile.wcw, also for Watcom C, compiling to a Win32 command-
33   line application. Also contributed by Dominik Behr.
35 I can't guarantee that all of those makefiles work, because I don't
36 have all of those compilers. However, Makefile.dos and Makefile.vc
37 work on my system, and so do Makefile.bor and Makefile.bc2.
39 Be careful with Borland C: there have been various conflicting
40 reports about how reliable the Huge memory model is. If you try to
41 compile NASM in Large model, you may get DGROUP overflows due to the
42 vast quantity of data in the instruction tables. I've had reports
43 from some people that Huge model doesn't work at all (and also
44 reports from others that it works fine), so if you don't want to try
45 moving to Huge, you could try adding the option `-dc' to the
46 compiler command line instead, which causes string literals to be
47 moved from DGROUP to the code segments and might make Large model
48 start working. (Either solution works for me.)
50 Dominik Behr has also contributed the file misc/pmw.bat, which is a
51 batch file to turn the output from Makefile.wc (NASM.EXE and
52 NDISASM.EXE) into standalone executables incorporating Tran's
53 PMODE/W DOS extender, rather than depending on an external extender
54 program.
56 If you're trying to unpack the DOS (.ZIP format) archive under Unix
57 instead of using the .tar.gz version, you can save some time by
58 doing `unzip -aL', which will convert the DOS-format text files to
59 Unix and also convert all names to lower case.
61 If you want to build a restricted version of NASM containing only
62 some of the object file formats, you can achieve this by adding
63 #defines to `outform.h' (see the file itself for documentation), or
64 equivalently by adding compiler command line options in the
65 Makefile.
67 There is a machine description file for the `LCC' retargetable C
68 compiler, in the directory `lcc', along with instructions for its
69 use. This means that NASM can now be used as the code-generator back
70 end for a useful C compiler.
72 Michael `Wuschel' Tippach has ported his DOS extender `WDOSX' to
73 enable it to work with the 32-bit binary files NASM can output: the
74 original extender and his port `WDOSX/N' are available from his web
75 page, http://www.geocities.com/SiliconValley/Park/4493.
77 Matt Mastracci has written a document explaining how to write
78 assembly language modules in DJGPP programs using NASM: it's on his
79 web site at http://www.ucalgary.ca/~mmastrac/djgppasm.doc.
81 The `misc' directory contains `nasm.sl', a NASM editing mode for the
82 JED programmers' editor (see http://space.mit.edu/~davis/jed.html
83 for details about JED). The comment at the start of the file gives
84 instructions on how to install the mode. This directory also
85 contains a file (`magic') containing lines to add to /etc/magic on
86 Unix systems to allow the `file' command to recognise RDF files.
88 The `rdoff' directory contains sources for a linker and loader for
89 the RDF object file format, to run under Linux, and also
90 documentation on the internal structure of RDF files.
92 For information about how you can distribute and use NASM, see the
93 file Licence. We were tempted to put NASM under the GPL, but decided
94 that in many ways it was too restrictive for developers.
96 For information about how to use NASM, see `nasm.doc'. For
97 information about how to use NDISASM, see `ndisasm.doc'. For
98 information about the internal structure of NASM, see
99 `internal.doc'. (In particular, _please_ read `internal.doc' before
100 writing any code for us...)
102 The NASM web page is at http://www.cryogen.com/Nasm/
104 Bug reports (and patches if you can) should be sent to
105 <jules@earthcorp.com> or <anakin@pobox.com>.