Readme 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 RDOFF.
  6. Also included is NDISASM, a prototype x86 binary-file disassembler
  7. which uses the same instruction table as NASM.
  8. To install NASM on UNIX or Linux, type `./configure', then `make', and
  9. then either `make install', or copy the file `nasm' (and maybe
  10. `ndisasm') to a directory on your search path (maybe /usr/local/bin,
  11. or ~/bin if you don't have root access). You may also want to copy the
  12. man page `nasm.1' (and maybe `ndisasm.1') to somewhere sensible. Note
  13. that source and binaries are also available in RPM format; to install
  14. an RPM on a system which uses this packaging format (mostly Linux
  15. distributions) simply do "rpm -Uivh filename.rpm".
  16. To install under DOS, if you don't need to rebuild from the sources,
  17. you can just copy either nasm.exe and ndisasm.exe (32-bit DOS-extended
  18. versions), nasmr.exe and ndisasmr.exe (16-bit classical DOS
  19. executables), or nasmw.exe and ndisasmw.exe (Win32 console
  20. applications - less likely to run out of memory), to somewhere on your
  21. PATH.
  22. The 32-bit applications require a DPMI server. If you're running
  23. under plain DOS and don't have a DPMI server already, you can get
  24. CSDPMI from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/.
  25. To rebuild the DOS sources, various makefiles are provided:
  26. - Makefile.dos, the one I build the standard 16-bit releases from,
  27. designed for a hybrid system using Microsoft C and Borland Make
  28. (don't ask why :-)
  29. - Makefile.vc, for Microsoft Visual C++ compiling to a Win32
  30. command-line application. This is the one I build the standard
  31. Win32 release binaries from.
  32. - Makefile.bor, for Borland C.
  33. - Makefile.bc2, also for Borland C, contributed by Fox Cutter.
  34. Reported to work better than Makefile.bor on some systems.
  35. - Makefile.sc, for Symantec C++, compiling to a 32-bit extended DOS
  36. executable.. Contributed by Mark Junker.
  37. - Makefile.scw, also for Symantec C++, compiling to a Win32 command-
  38. line application. Also contributed by Mark Junker.
  39. - Makefile.wc, for Watcom C, compiling to a 32-bit extended DOS
  40. executable. Contributed by Dominik Behr.
  41. - Makefile.wcw, also for Watcom C, compiling to a Win32 command-
  42. line application. Also contributed by Dominik Behr.
  43. - Makefile.dj, for DJGPP, compiling to a 32-bit extended DOS
  44. executable. Contributed by Dominik Behr.
  45. - Makefile.lcc, for lcc-win32, compiling to a Win32 command line
  46. application. (The lcc-win32 compiler and tools are available from
  47. http://www.remcomp.com/lcc-win32/)
  48. I can't guarantee that all of those makefiles work, because I don't
  49. have all of those compilers. However, Makefile.dos and Makefile.vc
  50. work on my system, and so do Makefile.bor and Makefile.bc2.
  51. Be careful with Borland C: there have been various conflicting
  52. reports about how reliable the Huge memory model is. If you try to
  53. compile NASM in Large model, you may get DGROUP overflows due to the
  54. vast quantity of data in the instruction tables. I've had reports
  55. from some people that Huge model doesn't work at all (and also
  56. reports from others that it works fine), so if you don't want to try
  57. moving to Huge, you could try adding the option `-dc' to the
  58. compiler command line instead, which causes string literals to be
  59. moved from DGROUP to the code segments and might make Large model
  60. start working. (Either solution works for me.)
  61. To rebuild truly from scratch, or to make any changes to insns.dat or
  62. standard.mac, you need a Perl interpreter installed. Perl
  63. interpreters are available for a number of platforms, from:
  64. http://www.cpan.org/ports/
  65. For DOS you can also get one from:
  66. ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/
  67. Dominik Behr has also contributed the file misc/pmw.bat, which is a
  68. batch file to turn the output from Makefile.wc (NASM.EXE and
  69. NDISASM.EXE) into standalone executables incorporating Tran's
  70. PMODE/W DOS extender, rather than depending on an external extender
  71. program.
  72. Some of the Windows makefiles produce executables called nasmw.exe
  73. and ndisasmw.exe, and some don't. Be prepared for either...
  74. If you want to build a restricted version of NASM containing only
  75. some of the object file formats, you can achieve this by adding
  76. #defines to `outform.h' (see the file itself for documentation), or
  77. equivalently by adding compiler command line options in the
  78. Makefile.
  79. There is a machine description file for the `LCC' retargetable C
  80. compiler (version 4.0), in the directory `lcc', along with
  81. instructions for its use. This means that NASM can now be used as
  82. the code-generator back end for a useful C compiler.
  83. Michael `Wuschel' Tippach has ported his DOS extender `WDOSX' to
  84. enable it to work with the 32-bit binary files NASM can output: the
  85. original extender and his port `WDOSX/N' are available from his web
  86. page, http://www.geocities.com/SiliconValley/Park/4493.
  87. Matt Mastracci has written a document explaining how to write
  88. assembly language modules in DJGPP programs using NASM: it's on his
  89. web site at http://www.ucalgary.ca/~mmastrac/djgppasm.doc.
  90. The `misc' directory contains `nasm.sl', a NASM editing mode for the
  91. JED programmers' editor (see http://space.mit.edu/~davis/jed.html
  92. for details about JED). The comment at the start of the file gives
  93. instructions on how to install the mode. This directory also
  94. contains a file (`magic') containing lines to add to /etc/magic on
  95. Unix systems to allow the `file' command to recognise RDF files, and
  96. a zip file (`exasm.zip') containing the necessary files for syntax
  97. highlighting in the Aurora DOS editor. (The Aurora files were
  98. contributed by <[email protected]>; I haven't tested them as I
  99. don't have Aurora.)
  100. The `rdoff' directory contains sources for a linker and loader for
  101. the RDF object file format, to run under Linux, and also
  102. documentation on the internal structure of RDF files.
  103. For information about how you can distribute and use NASM, see the
  104. file Licence. We were tempted to put NASM under the GPL, but decided
  105. that in many ways it was too restrictive for developers.
  106. For release 0.98 and later, the NASM source distribution contains the
  107. following components:
  108. Unix Windows, OS/2 DOS
  109. nasm-X.XX.tar.gz nasm-X.XX.zip nasmXXXs.zip
  110. Main archive: Contain all sources you need to build NASM,
  111. plus the documentation source code. If you have a Perl
  112. interpreter and (possibly) Winhelp compiler installed, you
  113. don't need any additional files.
  114. nasm-X.XX-xdoc.tar.gz nasm-X.XX-xdoc.zip nasmXXXd.zip
  115. Documentation in HTML, INFO, text, and PostScript format.
  116. You can compile these files yourself from the main archive
  117. if you have a Perl interpreter installed.
  118. N/A nasm-X.XX-whlp.zip N/A
  119. Documentation in Windows help format. You can compile this
  120. file yourself from the main archive if you have a Perl
  121. interpreter and a Winhelp compiler installed.
  122. The Unix, Windows-OS/2, and DOS versions differ in the following ways:
  123. The Unix version uses the Unix line ending convention (LF), and long file
  124. names with upper and lower case.
  125. The Windows-OS/2 version uses the Microsoft line ending convention
  126. (CR+LF), and long file names with upper and lower case.
  127. The DOS version uses the Microsoft line ending convention (CR+LF),
  128. with all filenames in 8.3 monocase.
  129. For information about how to use NASM, see the various forms of
  130. documentation in the `doc' directory: documentation is provided in
  131. HTML, PostScript, plain text, Texinfo, and Windows Help formats. For
  132. information about how to use NDISASM, see `ndisasm.doc'. For
  133. information about the internal structure of NASM, see
  134. `internal.doc'. (In particular, _please_ read `internal.doc' before
  135. writing any code for us...)
  136. The NASM web page is at http://www.cryogen.com/Nasm/
  137. Bug reports (and patches if you can) should be sent to
  138. <[email protected]>.