1
.\" gasp man page by Christopher C. Chimelis, chris@debian.org
2
.\" for binutils 2.9.5.0.12 17 Sep 1999
3
.TH gasp 1 "September 1999" Debian "GNU Development Tools"
5
gasp \- a preprocessor for assembly programs
11
.RB "[\|" \-a | \-\-alternate "\|]"
14
.RB " | " "\-\-commentchar\ "\c
17
.RB "[\|" \-d | \-\-debug "\|]"
18
.RB "[\|" \-h | \-\-help "\|]"
19
.RB "[\|" \-M | \-\-mri "\|]"
22
.RB " | " "\-\-output\ "\c
25
.RB "[\|" \-p | \-\-print "\|]"
26
.RB "[\|" \-s | \-\-copysource "\|]"
27
.RB "[\|" \-u | \-\-unreasonable "\|]"
28
.RB "[\|" \-v | \-\-version "\|]"
35
The primary purpose of the GNU assembler is to assemble the output of
36
other programs--notably compilers. When you have to hand-code
37
specialized routines in assembly, that means the GNU assembler is an
38
unfriendly processor: it has no directives for macros, conditionals, or
39
many other conveniences that you might expect.
41
In some cases you can simply use the C preprocessor, or a generalized
42
preprocessor like M4; but this can be awkward, since none of these
43
things are designed with assembly in mind.
46
fills this need. It is expressly designed to provide the
47
facilities you need with hand-coded assembly code. Implementing it as a
48
preprocessor, rather than part of the assembler, allows the maximum
49
flexibility: you can use it with hand-coded assembly, without paying a
50
penalty of added complexity in the assembler you use for compiler
54
are the files to be preprocessed.
57
The simplest way to use GASP is to run it as a filter and assemble
58
its output. In Unix and its ilk, you can do this, for example:
60
$ gasp prog.asm | as -o prog.o
62
Naturally, there are also a few command-line options to allow you to
63
request variations on this basic theme. Here is the full set of
64
possibilities for the GASP command line.
70
Use alternative macro syntax. *Note Alternate macro syntax:
71
Alternate, for a discussion of how this syntax differs from the
77
.BI "\-\-commentchar " CHAR
78
Use CHAR as the comment character. The default comment character
79
is `!'. For example, to use a semicolon as the comment character,
80
specify `-c ';'' on the GASP command line. Since assembler
81
command characters often have special significance to command
82
shells, it is a good idea to quote or escape CHAR when you specify
85
For the sake of simplicity, all examples in this manual use the
86
default comment character `!'.
92
Show debugging statistics. In this version of GASP, this option
93
produces statistics about the string buffers that GASP allocates
94
internally. For each defined buffersize S, GASP shows the number
95
of strings N that it allocated, with a line like this:
99
GASP displays these statistics on the standard error stream, when
106
Display a summary of the GASP command line options.
112
Use MRI compatibility mode. Using this option causes GASP to
113
accept the syntax and pseudo-ops used by the Microtec Research
119
.BI "\-\-output " OUTFILE
122
Write the output in a file called OUTFILE. If you do not use the
123
`-o' option, GASP writes its output on the standard output stream.
129
Print line numbers. GASP obeys this option _only_ if you also
130
specify `-s' to copy source lines to its output. With `-s -p',
131
GASP displays the line number of each source line copied
132
(immediately after the comment character at the beginning of the
139
Copy the source lines to the output file. Use this option to see
140
the effect of each preprocessor line on the GASP output. GASP
141
places a comment character (`!' by default) at the beginning of
142
each source line it copies, so that you can use this option and
143
still assemble the result.
149
Bypass "unreasonable expansion" limit. Since you can define GASP
150
macros inside other macro definitions, the preprocessor normally
151
includes a sanity check. If your program requires more than 1,000
152
nested expansions, GASP normally exits with an error message. Use
153
this option to turn off this check, allowing unlimited nested
160
Display the GASP version number.
164
The input file names. You must specify at least one input file;
165
if you specify more, GASP preprocesses them all, concatenating the
166
output in the order you list the INFILE arguments.
168
Mark the end of each input file with the preprocessor command
177
The GNU Binary Utilities\c
178
\&, Roland H. Pesch (October 1991);