version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
gasp |
|
|
2 |
!!!gasp |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
gasp - a preprocessor for assembly programs |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__gasp__ |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
[[__-a__|__--alternate__] [[__-c__ ''CHAR'' | |
|
|
20 |
__--commentchar__ ''CHAR''] [[__-d__|__--debug__] |
|
|
21 |
[[__-h__|__--help__] [[__-M__|__--mri__] |
|
|
22 |
[[__-o__ ''OUTFILE'' | __--output__ ''OUTFILE''] |
|
|
23 |
[[__-p__|__--print__] [[__-s__|__--copysource__] |
|
|
24 |
[[__-u__|__--unreasonable__] |
|
|
25 |
[[__-v__|__--version__] ''INFILE'' ... |
|
|
26 |
!!DESCRIPTION |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
The primary purpose of the GNU assembler is to assemble the |
|
|
30 |
output of other programs--notably compilers. When you have |
|
|
31 |
to hand-code specialized routines in assembly, that means |
|
|
32 |
the GNU assembler is an unfriendly processor: it has no |
|
|
33 |
directives for macros, conditionals, or many other con- |
|
|
34 |
veniences that you might expect. |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
In some cases you can simply use the C preprocessor, or a |
|
|
38 |
generalized preprocessor like M4; but this can be awkward, |
|
|
39 |
since none of these things are designed with assembly in |
|
|
40 |
mind. |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
__gasp__ fills this need. It is expressly designed to |
|
|
44 |
provide the facilities you need with hand-coded assembly |
|
|
45 |
code. Implementing it as a preprocessor, rather than part of |
|
|
46 |
the assembler, allows the maximum flexibility: you can use |
|
|
47 |
it with hand-coded assembly, without paying a penalty of |
|
|
48 |
added complexity in the assembler you use for compiler |
|
|
49 |
output. |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
''INFILE''... are the files to be |
|
|
53 |
preprocessed. |
|
|
54 |
!!OPTIONS |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
The simplest way to use GASP is to run it as a filter and |
|
|
58 |
assemble its output. In Unix and its ilk, you can do this, |
|
|
59 |
for example: |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
$ gasp prog.asm | as -o prog.o |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
Naturally, there are also a few command-line options to |
|
|
66 |
allow you to request variations on this basic theme. Here is |
|
|
67 |
the full set of possibilities for the GASP command |
|
|
68 |
line. |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
__-a__ |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
__--alternate__ |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
Use alternative macro syntax. *Note Alternate macro syntax: |
|
|
78 |
Alternate, for a discussion of how this syntax differs from |
|
|
79 |
the default GASP syntax. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
__-c__ ''CHAR'' |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
__--commentchar__ ''CHAR'' |
|
|
86 |
|
|
|
87 |
|
|
|
88 |
Use CHAR as the comment character. The default comment |
|
|
89 |
character is `!'. For example, to use a semicolon as the |
|
|
90 |
comment character, specify `-c ';'' on the GASP command |
|
|
91 |
line. Since assembler command characters often have special |
|
|
92 |
significance to command shells, it is a good idea to quote |
|
|
93 |
or escape CHAR when you specify a comment |
|
|
94 |
character. |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
For the sake of simplicity, all examples in this manual use |
|
|
98 |
the default comment character `!'. |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
__-d__ |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
__--debug__ |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
Show debugging statistics. In this version of GASP, this |
|
|
108 |
option produces statistics about the string buffers that |
|
|
109 |
GASP allocates internally. For each defined buffersize S, |
|
|
110 |
GASP shows the number of strings N that it allocated, with a |
|
|
111 |
line like this: |
|
|
112 |
|
|
|
113 |
|
|
|
114 |
strings size S : N |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
GASP displays these statistics on the standard er- ror |
|
|
118 |
stream, when done preprocessing. |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
__-h__ |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
__--help__ |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
Display a summary of the GASP command line |
|
|
128 |
options. |
|
|
129 |
|
|
|
130 |
|
|
|
131 |
__-M__ |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
__--mri__ |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
Use MRI compatibility mode. Using this option causes GASP to |
|
|
138 |
accept the syntax and pseudo-ops used by the Microtec |
|
|
139 |
Research `ASM68K' assembler. |
|
|
140 |
|
|
|
141 |
|
|
|
142 |
__-o__ ''OUTFILE'' |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
__--output__ ''OUTFILE'' |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
`-o OUTFILE' `--output OUTFILE' Write the output in a file |
|
|
149 |
called OUTFILE. If you do not use the `-o' option, GASP |
|
|
150 |
writes its output on the standard out- put |
|
|
151 |
stream. |
|
|
152 |
|
|
|
153 |
|
|
|
154 |
__-p__ |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
__--print__ |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
Print line numbers. GASP obeys this option _only_ if you |
|
|
161 |
also specify `-s' to copy source lines to its output. With |
|
|
162 |
`-s -p', GASP displays the line number of each source line |
|
|
163 |
copied (immediately af- ter the comment character at the |
|
|
164 |
beginning of the line). |
|
|
165 |
|
|
|
166 |
|
|
|
167 |
__-s__ |
|
|
168 |
|
|
|
169 |
|
|
|
170 |
__--copysource__ |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
Copy the source lines to the output file. Use this option to |
|
|
174 |
see the effect of each preprocessor line on the GASP output. |
|
|
175 |
GASP places a comment charac- ter (`!' by default) at the |
|
|
176 |
beginning of each source line it copies, so that you can use |
|
|
177 |
this op- tion and still assemble the result. |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
__-u__ |
|
|
181 |
|
|
|
182 |
|
|
|
183 |
__--unreasonable__ |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
Bypass |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
__-v__ |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
__--version__ |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
Display the GASP version number. |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
''INFILE'' __...__ |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
The input file names. You must specify at least one input |
|
|
202 |
file; if you specify more, GASP prepro- cesses them all, |
|
|
203 |
concatenating the output in the order you list the INFILE |
|
|
204 |
arguments. |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
Mark the end of each input file with the preproces- sor |
|
|
208 |
command `.END'. |
|
|
209 |
!!SEE ALSO |
|
|
210 |
|
|
|
211 |
|
|
|
212 |
`__gasp__' entry in __info__; ''The GNU Binary |
|
|
213 |
Utilities'', Roland H. Pesch (October 1991); |
|
|
214 |
__gasp__(__1__). |
|
|
215 |
---- |