~ubuntu-branches/ubuntu/hoary/binutils/hoary

« back to all changes in this revision

Viewing changes to debian/gasp.1

  • Committer: Bazaar Package Importer
  • Author(s): Christopher C. Chimelis
  • Date: 2002-04-18 13:03:49 UTC
  • Revision ID: james.westby@ubuntu.com-20020418130349-pr9a1j3znz4gh3j6
Tags: 2.12.90.0.1-4
* Added patch from Gerhardt Tonn
  to fix s390 merge problem (closes: Bug#143187)
* Corrected DOW of my last changelog entry :-P

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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"
 
4
.SH NAME
 
5
gasp \- a preprocessor for assembly programs
 
6
.SH SYNOPSIS
 
7
.hy 0
 
8
.na
 
9
.TP
 
10
.B gasp
 
11
.RB "[\|" \-a | \-\-alternate "\|]"
 
12
.RB "[\|" "\-c\ "\c
 
13
.I CHAR\c
 
14
.RB " | " "\-\-commentchar\ "\c
 
15
.I CHAR\c
 
16
\&\|]
 
17
.RB "[\|" \-d | \-\-debug "\|]"
 
18
.RB "[\|" \-h | \-\-help "\|]"
 
19
.RB "[\|" \-M | \-\-mri "\|]"
 
20
.RB "[\|" "\-o\ "\c
 
21
.I OUTFILE\c
 
22
.RB " | " "\-\-output\ "\c
 
23
.I OUTFILE\c
 
24
\&\|]
 
25
.RB "[\|" \-p | \-\-print "\|]"
 
26
.RB "[\|" \-s | \-\-copysource "\|]"
 
27
.RB "[\|" \-u | \-\-unreasonable "\|]"
 
28
.RB "[\|" \-v | \-\-version "\|]"
 
29
.I INFILE \c
 
30
\&.\|.\.
 
31
.ad b
 
32
.hy 1
 
33
.SH DESCRIPTION
 
34
\c
 
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.
 
40
 
 
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.
 
44
 
 
45
.B gasp \c
 
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
 
51
output.
 
52
.PP
 
53
.IR  "INFILE" .\|.\|.
 
54
are the files to be preprocessed.
 
55
 
 
56
.SH OPTIONS
 
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:
 
59
 
 
60
     $ gasp prog.asm | as -o prog.o
 
61
 
 
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.
 
65
 
 
66
.TP
 
67
.B \-a
 
68
.TP
 
69
.B \-\-alternate
 
70
Use alternative macro syntax.  *Note Alternate macro syntax:
 
71
Alternate, for a discussion of how this syntax differs from the
 
72
default GASP syntax.
 
73
 
 
74
.TP
 
75
.BI "\-c " CHAR
 
76
.TP
 
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
 
83
a comment character.
 
84
 
 
85
For the sake of simplicity, all examples in this manual use the
 
86
default comment character `!'.
 
87
 
 
88
.TP
 
89
.B \-d
 
90
.TP
 
91
.B \-\-debug
 
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:
 
96
 
 
97
     strings size S : N
 
98
 
 
99
GASP displays these statistics on the standard error stream, when
 
100
done preprocessing.
 
101
 
 
102
.TP
 
103
.B \-h
 
104
.TP
 
105
.B \-\-help
 
106
Display a summary of the GASP command line options.
 
107
 
 
108
.TP
 
109
.B \-M
 
110
.TP
 
111
.B \-\-mri
 
112
Use MRI compatibility mode.  Using this option causes GASP to
 
113
accept the syntax and pseudo-ops used by the Microtec Research
 
114
`ASM68K' assembler.
 
115
 
 
116
.TP
 
117
.BI "\-o " OUTFILE
 
118
.TP
 
119
.BI "\-\-output " OUTFILE
 
120
`-o OUTFILE'
 
121
`--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.
 
124
 
 
125
.TP
 
126
.B \-p
 
127
.TP
 
128
.B \-\-print
 
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
 
133
line).
 
134
 
 
135
.TP
 
136
.B \-s
 
137
.TP
 
138
.B \-\-copysource
 
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.
 
144
 
 
145
.TP
 
146
.B \-u
 
147
.TP
 
148
.B \-\-unreasonable
 
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
 
154
expansions.
 
155
 
 
156
.TP
 
157
.B \-v
 
158
.TP
 
159
.B \-\-version
 
160
Display the GASP version number.
 
161
 
 
162
.TP
 
163
.IB INFILE \ .\.\.
 
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.
 
167
 
 
168
Mark the end of each input file with the preprocessor command
 
169
`.END'.
 
170
 
 
171
.SH SEE ALSO
 
172
.RB "`\|" gasp "\|'"
 
173
entry in
 
174
.B info\c
 
175
\&;
 
176
.I
 
177
The GNU Binary Utilities\c
 
178
\&, Roland H. Pesch (October 1991);
 
179
.BR gasp "(" 1 ")."