summaryrefslogtreecommitdiff
path: root/nasm.1
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2007-09-30 22:15:36 -0700
committerCharles Crayne <chuck@thor.crayne.org>2007-09-30 22:15:36 -0700
commitfcce07f171c69d499feebf355f9700ee4f6024ee (patch)
tree1d3f571ec443ecabb925889867154d549606af68 /nasm.1
parentb001e898592404373620b84feed7d9677c7cffbc (diff)
downloadnasm-fcce07f171c69d499feebf355f9700ee4f6024ee.tar.gz
nasm-fcce07f171c69d499feebf355f9700ee4f6024ee.tar.bz2
nasm-fcce07f171c69d499feebf355f9700ee4f6024ee.zip
modified: nasm.1 to add newer command line options
modified: nasm.c to fully parse command line before redirecting stderr.
Diffstat (limited to 'nasm.1')
-rw-r--r--nasm.1172
1 files changed, 95 insertions, 77 deletions
diff --git a/nasm.1 b/nasm.1
index 7b5d292..d662df8 100644
--- a/nasm.1
+++ b/nasm.1
@@ -4,23 +4,29 @@ nasm \- the Netwide Assembler, a portable 80x86 assembler
.SH SYNOPSIS
.B nasm
[
+.B \-@
+response file
+] [
.B \-f
format
] [
.B \-o
outfile
] [
+.B \-l
+listfile
+] [
.IR options ...
-] infile
+] filename
.br
.B nasm \-h
.br
-.B nasm \-r
+.B nasm \-v
.SH DESCRIPTION
The
.B nasm
command assembles the file
-.I infile
+.I filename
and directs output to the file
.I outfile
if specified. If
@@ -33,11 +39,12 @@ extensions for a raw binary file. Failing that, the output file name
will be `nasm.out'.
.SS OPTIONS
.TP
-.B \-h
+.BI \-@ " filename"
Causes
.B nasm
-to exit immediately, after giving a summary of its invocation
-options, and listing all its supported output file formats.
+to process options from
+.I filename
+as if they were included on the command line.
.TP
.B \-a
Causes
@@ -45,6 +52,14 @@ Causes
to assemble the given input file without first applying the macro
preprocessor.
.TP
+.BI \-D " macro[=value]"
+Pre-defines a single-line macro.
+.TP
+.BI \-d " macro[=value]"
+Same as the
+.B \-D
+option.
+.TP
.B \-e
Causes
.B nasm
@@ -53,44 +68,37 @@ to preprocess the given input file, and write the output to
(or the specified output file name), and not actually assemble
anything.
.TP
-.B \-M
-Causes
-.B nasm
-to output Makefile-style dependencies to stdout; normal output is
-suppressed.
+.BI \-f " format"
+Specifies the output file format. To see a list of valid output
+formats, use the
+.B -hf
+option.
.TP
-.BI \-E " filename"
+.B \-g
Causes
.B nasm
-to redirect error messages to
-.IR filename .
-This option exists to support operating systems on which stderr is not
-easily redirected.
+to generate debug information in selected format
.TP
-.BI \-r
+.B \-h
Causes
.B nasm
-to exit immediately, after displaying its version number.
-.I (obsolete)
+to exit immediately, after giving a summary of its invocation
+options.
.TP
-.BI \-v
-Causes
-.B nasm
-to exit immediately, after displaying its version number.
+.B \-hf
+Same as
+.B -h
+, but also lists all valid output formats.
.TP
-.BI \-f " format"
-Specifies the output file format. Formats include
-.IR bin ,
-to produce flat-form binary files, and
-.I aout
-and
-.I elf
-to produce Linux a.out and ELF object files, respectively.
+.BI \-I " directory"
+Adds a directory to the search path for include files. The directory
+specification must include the trailing slash, as it will be
+directly prepended to the name of the include file.
.TP
-.BI \-o " outfile"
-Specifies a precise name for the output file, overriding
-.BR nasm 's
-default means of determining it.
+.BI \-i " directory"
+Same as the
+.B \-I
+option.
.TP
.BI \-l " listfile"
Causes an assembly listing to be directed to the given file, in
@@ -98,35 +106,19 @@ which the original source is displayed on the right hand side (plus
the source for included files and the expansions of multi-line
macros) and the generated code is shown in hex on the left.
.TP
-.B \-s
-Causes
-.B nasm
-to send its error messages and/or help text to
-.I stdout
-instead of
-.IR stderr .
-.TP
-.BI \-w [+-]foo
+.B \-M
Causes
.B nasm
-to enable or disable certain classes of warning messages, for
-example
-.B \-w+orphan-labels
-or
-.B \-w-macro-params
-to, respectively, enable warnings about labels alone on lines or
-disable warnings about incorrect numbers of parameters in macro
-calls.
+to output Makefile-style dependencies to stdout; normal output is
+suppressed.
.TP
-.BI \-I " directory"
-Adds a directory to the search path for include files. The directory
-specification must include the trailing slash, as it will be
-directly prepended to the name of the include file.
+.BI \-O " number"
+optimize branch offsets (-O0 disables, default).
.TP
-.BI \-i " directory"
-Same as the
-.B \-I
-option.
+.BI \-o " outfile"
+Specifies a precise name for the output file, overriding
+.BR nasm 's
+default means of determining it.
.TP
.BI \-P " file"
Specifies a file to be pre-included, before the main source file
@@ -137,13 +129,24 @@ Same as the
.B \-P
option.
.TP
-.BI \-D " macro[=value]"
-Pre-defines a single-line macro.
+.BI \-r
+Causes
+.B nasm
+to exit immediately, after displaying its version number.
+.I (obsolete)
.TP
-.BI \-d " macro[=value]"
-Same as the
-.B \-D
-option.
+.B \-s
+Causes
+.B nasm
+to send its error messages and/or help text to
+.I stdout
+instead of
+.IR stderr .
+.TP
+.B \-t
+Causes
+.B nasm
+to assemble in SciTech TASM compatible mode
.TP
.BI \-U " macro"
Undefines a single-line macro.
@@ -152,6 +155,31 @@ Undefines a single-line macro.
Same as the
.B \-U
option.
+.TP
+.BI \-v
+Causes
+.B nasm
+to exit immediately, after displaying its version number.
+.TP
+.BI \-w [+-]foo
+Causes
+.B nasm
+to enable or disable certain classes of warning messages, for
+example
+.B \-w+orphan-labels
+or
+.B \-w-macro-params
+.TP
+.BI \-X " format"
+specifies error reporting format (gnu or vc).
+.TP
+.BI \-Z " filename"
+Causes
+.B nasm
+to redirect error messages to
+.IR filename .
+This option exists to support operating systems on which stderr is not
+easily redirected.
.PP
.RE
.SS SYNTAX
@@ -452,17 +480,7 @@ and
.IR %elifnctx
are also supported.
.SH BUGS
-There is a reported seg-fault on some (Linux) systems with some
-large source files. This appears to be very hard to reproduce. All
-other
-.I known
-bugs have been fixed...
-.SH RESTRICTIONS
-There is no support for listing files, symbol maps, or debugging
-object-file records. The advanced features of the ELF and Win32
-object file formats are not supported, and there is no means for
-warning the programmer against using an instruction beyond the
-capability of the target processor.
+Please report bugs through the bug tracker function at http://nasm.sourceforge.org.
.SH SEE ALSO
.BR as "(" 1 "),"
.BR ld "(" 1 ")."