1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
9 .\" (C) 2000 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
12 .\" man pages are NOT obsolete!
13 .\" <ragnar@ragnar-hojland.com>
15 .\" Japanese Version Copyright (c) 2000 Omo Kazuki
16 .\" all rights reserved.
17 .\" Translated Wed Aug 30 17:42:39 JST 2000
19 .\" Updated & Modified Fri Dec 24 06:00:11 JST 2004
20 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
22 .TH GASP 1 "November 2000" "gasp 1.2"
25 .\"O \fBgasp\fR \- GNU Assembler Preprocessor
26 \fBgasp\fR \- GNU アセンブラプリプロセッサ
32 .RB [ "\-o \fIOUTFILE" ]
33 .RB [ "\-D\fINAME\fB=\fIVALUE" ]
36 .RB [ "\-\-commentchar \fICHAR" ]
37 .RB [ \-\-copysource ]
40 .RB [ "\-output \fIOUTFILE" ]
42 .RB [ \-\-unreasonable ]
52 .\"O preprocesses each \fIINFILE\fR argument and concatenates the results to
53 .\"O standard output, for direct consumption by \fBas\fR(1).
55 は、\fIINFILE\fR 引数を処理して、\fBas\fR(1) に直接入力させるために
58 .\"O Since \fBas\fR is targeted to assemble the output generated by other
59 .\"O programs, it doesn't have common facilities such as macros or conditionals
60 .\"O that are generally useful when writing assembler by hand. \fBgasp\fR
61 .\"O provides this missing functionality.
62 \fBas\fR は、他のプログラムによって生成された出力をアセンブルすることを
63 目的としているので、アセンブラを手で書くときに便利なマクロや条件文といった
65 \fBgasp\fR は、これらの (as にはない) 機能を提供する。
70 .\"O Use alternative macro syntax.
73 .B \-c \fICHAR\fB, \-\-commentchar \fICHAR
74 .\"O Use \fICHAR\fR as the comment character. The default comment character
76 \fICHAR\fR をコメント文字として使う。デフォルトのコメント文字は
80 .\"O Show debugging statistics about the string buffers that \fBgasp\fR allocates
81 .\"O internally. For each defined buffersize \fIS\fR, it shows the number of
82 .\"O strings \fIN\fR that it allocated, in the format
84 文字列バッファについてのデバッグ統計情報を表示する。
85 それぞれ定められたバッファサイズ \fIS\fR について、
89 strings size \fIS\fR : \fIN\fR
92 .\"O These statistics are written to stderr, when done preprocessing.
94 これらの統計量はデータを前処理する時に標準エラー出力に書き出される。
96 .B \-o \fIOUTFILE\fB, \-\-output \fIOUTFILE
97 .\"O Write the output generated by \fBgasp\fR to \fIOUTFILE\fR. The default is
98 .\"O to write to standard output.
99 \fBgasp\fR によって生成された出力を \fIOUTFILE\fR に書き出す。
103 .\"O Print commented line numbers. Ignored unless \fB\-s\fR is specified.
105 \fB\-s\fR が指定されない限り、無視される。
107 .B \-s, \-\-copysource
108 .\"O Print commented source lines.
111 .B \-u, \-\-unreasonable
112 .\"O Allow unlimited ("unreasonable") nested expansions. Since you can define
113 .\"O \fBgasp\fR macros inside other macro definitions, the preprocessor normally
114 .\"O includes a sanity check. If you require more than 1000 nested expansions,
115 .\"O \fBgasp\fR normally exits with an error message. Use this option to turn
116 .\"O off this check, allowing unlimited nested expansions.
117 無制限の (「非現実的な」) ネスト展開を許可する。
118 他のマクロの定義の中に \fBgasp\fR のマクロを定義できる時、
119 プリプロセッサは通常、sanity チェックを含める。
120 プログラムが 1000 回以上のネストされた展開を必要とする時には、
121 \fBgasp\fR は通常、エラーメッセージを出して終了する。
122 このチェックをオフにして無制限のネストされた展開を許したい時には、
126 .\"O Enter MRI compatibility mode, required to use the Microtec Research ASM68K
127 .\"O assembler syntax and pseudo ops.
129 Microtec Research ASM68K アセンブラ文法と
130 疑似オペレーションを使うために必要である。
132 .B \-D\fINAME\fB=\fIVALUE
133 .\"O Define the preprocessor constant \fINAME\fR, with value \fIVALUE\fR.
134 プリプロセッサ定数 \fINAME\fR を値 \fIVALUE\fR で定義する。
137 .\"O Add \fIPATH\fR to the include path list.
138 \fIPATH\fR をインクルードパスのリストに追加する。
141 .\"O Print a usage message on standard output and exit successfully.
142 標準出力に使用方法を出力し、正常終了する。
144 .B "\-v, \-\-version"
145 .\"O Print version information on standard output then exit successfully.
146 バージョン情報を標準出力に出力し,正常終了する。
147 .\"O .SH PREPROCESSOR COMMANDS
149 .\"O Commands are case-insensitive, and each extends for a line divided in three
150 .\"O fields: an optional label, the command itself, and optional argument(s) to
152 コマンドは大文字と小文字を区別せず、1 行は 3 つの部分に分けられる:
153 (任意の) ラベル、コマンド自身、コマンドの引数である。
154 .\"O .SS Conditionals
156 .\"O These directives allow you to include or exclude portions of assembly
157 .\"O depending on how a pair of strings or absolute expressions compare. Max
158 .\"O conditional nesting is 100.
159 これらの指示子により、文字列や絶対式の組の比較方法に依存してアセンブリコードの
160 一部を含めたり除外したりすることが出来る。
163 .B .AIF \fIARG1 CMP ARG2
166 .B .AIF \fB"\fIARG1\fB"\fI CMP \fB"\fIARG2\fB"
168 .\"O Available \fICMP\fR comparision operators available with strings and absolute expressions:
169 有効な \fICMP\fR 比較演算子で、文字列と絶対式で表されるものは、
175 .\"O Are \fIARG1\fR and \fIARG2\fR equal?
176 \fIARG1\fR と \fIARG2\fR は等しいか?
179 .\"O Are \fIARG1\fR and \fIARG2\fR different?
180 \fIARG1\fR と \fIARG2\fR は異なっているか?
183 .\"O Available \fICMP\fR comparision operators available with absolute
184 .\"O expressions only:
185 有効な \fICMP\fR 比較演算子で、絶対式のみで表されるものは、
190 .\"O Is \fIARG1\fR less than \fIARG2?\fR
191 \fIARG1\fR は \fIARG2\fR より小さいか?
194 .\"O Is \fIARG1\fR less than or equal to \fIARG2\fR
195 \fIARG1\fR は \fIARG2\fR と等しいか、それより小さいか?
198 .\"O Is \fIARG1\fR greater than \fIARG2\fR?
199 \fIARG1\fR は \fIARG2\fR より大きいか?
202 .\"O Is \fIARG1\fR greater than or equal to \fIARG2\fR?
203 \fIARG1\fR は \fIARG2\fR と等しいか、それより大きいか?
208 .\"O Marks the start of assembly code to be included if the condition
209 .\"O fails. Optional, and only allowed within a conditional (between
210 .\"O \fB.AIF\fR and \fB.AENDI\fR)
211 条件文が失敗したときに実行されるアセンブリコードの最初の部分に含まれる印。
212 必須ではなく、(\fB.AIF\fR と \fB.AENDI\fR の間の) 条件ブロックの中でのみ
216 .\"O Marks the end of an \fB.AIF\fR conditional block.
217 \/\fB.AIF\fR 条件ブロックの終りを示す。
221 これらの指示子はコードの部分を繰り返すことを許可する。
222 .\"O These directives allow you repeat portions of code.
230 .\"O Repeats the assemby code between the \fB.AREPEAT\fR and \fB.AENDR\fR macros
231 .\"O as many times as specified by the absolute expression \fIEXPR\fR.
232 \/\fB.AREPEAT\fR と \fB.AENDR\fR の間のアセンブリコードを
233 絶対式 \fIEXPR\fR で指定された回数だけ繰り返す。
235 .B .AWHILE \fIARG1 CMP ARG2
241 .\"O Repeats the assembly code between the \fB.AWHILE\fR and \fB.AENDW\fR macros
242 .\"O as long as the \fICMP\fR conditional comparision holds true. The format for
243 .\"O \fICMP\fR is the same as for \fB.AIF\fR.
244 \/\fB.AWHILE\fR と \fB.AENDW\fR の間のアセンブリコードを
245 \fICMP\fR 比較演算子の結果が true である限り繰り返す。
246 \fICMP\fR のフォーマットは\fB.AIF\fR のものと同じである。
249 .\"O Break out of the loop.
253 .\"O Variables can represent strings, registers or the results of expressions.
254 .\"O There are two kinds of variables:
255 変数には文字列、レジスタ、式の結果が入る。
258 .\"O \fB\(bu\fR\ Variables defined with \fB.EQU\fR or \fB.ASSIGN\fR. To evaluate
259 .\"O this kind of variable in your assembly output, simply mention its name.
260 .\"O These variabes are only evaluated when writing the assembly output, so they
261 .\"O shouldn't be used in conditional expressions or \fB.AWHILE\fR loops.
262 \fB\(bu\fR\ \fB.EQU\fR か \fB.ASSIGN\fR により定義される変数。
263 アセンブラコードの出力においてこの種の変数の値を求めるには、
265 これらの変数はアセンブラコードの出力をしているときにのみ計算されるので、
266 条件式や \fB.AWHILE\fR ループの中に使うべきではない。
274 .\"O \fB\(bu\fR\ Variables for use during preprocessing, defined with
275 .\"O .BR ".ASSIGNC" " or " ".ASSIGNA" .
276 .\"O To evaluate this kind of variable, use the prefix `\fB\e&\fR'.
277 \fB\(bu\fR\ 前処理をしている間に使われる変数で、
278 \fB.ASSIGNC\fR か \fB.ASSIGNA\fR によって定義される。
279 この種の変数の値を求めるには、`\fB\e&\fR' を前に付ける。
283 .AWHILE \e&opcit GT 0
287 .\"O Macro arguments are treated almost the same way, but to evaluate them you
288 .\"O use the prefix `\fB\e\fR' instead.
289 マクロ変数はほとんど同じ方法で扱われるが、
290 それらの値を求めるには、代わりに `\fB\e\fR' を前に付ける。
292 .B \fIPVAR\fB .EQU \fIEXPR
293 .\"O Assign preprocessor variable PVAR the value of the expression
294 .\"O EXPR. No restrictions on redefinition.
295 プリプロセッサ変数 PVAR に式 EXPR の値を割り当てる。再定義には、制限はない。
297 .B \fIPVAR\fB .ASSIGN \fIEXPR
298 .\"O Like \fB.EQU\fR, but you may not redefine \fIPVAR\fB.
299 \/\fB.EQU\fR と似ているが、\fIPVAR\fR は再定義できない。
301 .B \fIPVAR\fB .ASSIGNA \fIAEXPR
302 .\"O Define a variable with a numeric value, for use during
303 .\"O preprocessing. \fIAEXPR\fR must be an absolute
304 .\"O expression. No restrictions on redefinition.
306 \fIAEXPR\fR は絶対式でなくてはならない。再定義には、制限は無い。
308 .B \fIPVAR\fB .ASSIGNC "\fISTR\fR"
309 .\"O Define a variable with a string value, for use during
310 .\"O preprocessing. No restrictions on redefinition.
311 前処理の間使用され、文字列の値を定義する。再定義には、制限はない。
313 .B \fIPVAR\fB .REG (\fIREGISTER\fB)
314 .\"O Define a variable that represents a register. In particular, \fIREGISTER\fR
315 .\"O is \fBnot evaluated\fR as an expression. No restrictions on redefinition.
317 特に、\fIREGISTER\fR は式としては計算されない。
320 .\"O position, that is at the left margin. You may specify a colon after
321 .\"O the variable name if you wish, as in `bar' above.
322 これら全ての指定は、変数名として左端にある "ラベル" を受け入れる。
323 必要なら、上の `bar' のように、変数名の後ろにコロンを付けてもよい。
324 .\"O All these directives accept the variable name in the "label"
325 .\"O .SS Macro Definition
327 .\"O The directives \fB.MACRO\fR and \fB.ENDM\fR allow you to define your own
328 .\"O macros that generate assembly output.
329 \fB.MACRO\fR と \fB.ENDM\fR の指示子により、
330 アセンブラコードの出力を生成する独自のマクロを定義出来る。
335 .B .MACRO \fINAME \fR[\fBARG\fR[\fB=\fIDEFAULT_VALUE\fR]\fB, ...\fR]
337 .\"O Begin the definition of a macro called \fINAME\fR. If your macro
338 .\"O definition requires arguments, specify their names after the macro
339 .\"O name, separated by commas or spaces.
340 \fINAME\fR というマクロの定義を開始する。もしマクロの定義で引数が必要なら、
341 コンマかスペースで区切ってマクロの名前のあとにそれらの名前を書く。
343 \/\fIARG\fB=\fIVALUE\fR というフォーマットで指定する。
345 .\"O When you call a macro, you can specify the argument
346 .\"O values either by position, or by keyword. For example, `SUM 9, 17' is
347 .\"O equivalent to `SUM TO=17, FROM=9'. Macro arguments are preprocessor
348 .\"O variables similar to the variables you define with
349 .\"O .BR .ASSIGNA " or " .ASSIGNC ", "
350 .\"O so you can use them in conditionals or loop control. The only
351 .\"O difference is the prefix you write to evaluate
352 .\"O the variable: for a macro argument use `\fB\eARG\fR', but for a
353 .\"O preprocessor variable use `\fB\e&VAR\fR'.
354 マクロを呼び出すとき、引数の値をポジションかキーワードで指定できる。
355 たとえば、`SUM 9, 17' は `SUM TO=17, FROM=9' と同じである。
361 それらをループのコントロールや条件式として使える。
362 異なっているのは、変数の値を求めるときに接頭語として付ける記号だけである :
363 マクロ引数には `\fB\eARG\fR' を使い、
364 プリプロセッサ変数には `\fB\e&VAR\fR' を使う。
369 .B \fINAME\fB .MACRO ( \fR[\fBARG\fR[\fB=\fIDEFAULT_VALUE\fR]\fB, ...\fR]\fB )
371 .\"O An alternative form of introducing a macro definition: specify the
372 .\"O macro name in the label position, and any arguments
373 .\"O between parentheses after the name.
374 マクロを定義する別の形式 : ラベル位置にマクロの名前を、
375 名前の後のかっこ内にすべての引数を指定する。
378 .\"O Mark the end of a macro definition.
382 .\"O Exit early from the current macro definition, or macro loop.
383 現在のマクロ定義や、マクロループから抜け出す。
386 .\"O This pseudo-variable represents the number of macros \fBgasp\fR has
387 .\"O executed. You may use this variable only within a macro definition.
388 この疑似変数は、\fBgasp\fR がマクロをいくつ実行したかを表す。
389 この変数はマクロ定義の中でのみ使うことができる。
391 .B LOCAL \fINAME\fR[\fB, \fINAME...\fR]
392 .\"O Generate an unique string for each \fINAME\fR argument, and replace any
393 .\"O instances of \fINAME\fR in macro expansions.
394 \fINAME\fR 毎に固有の文字列を生成し、
395 マクロ展開において \fINAME\fR のインスタンスを置き換える。
397 .\"O This allows you to write macros that define symbols without fear of conflict
398 .\"O between macro expansions, since the strings are different for each expansion.
399 文字列はマクロ展開毎に異なったものになるので、
401 シンボルを定義するマクロを書くことができる。
403 .\"O Only available if you specify \fB\-\-alternate\fB.
404 これは \fB\-\-alternate\fR を指定している時のみ有効である。
407 .\"O These directives allow you to specify working areas of memory.
408 .\"O The directives that initialize memory are:
409 これらの指示子は、メモリのワーキングエリアを指定する。
410 メモリを初期化する指示子は、以下の通りである:
412 .B .DATA \fIEXPR\fR[\fB, \fIEXPR...\fR]
415 .B .DATA.B \fIEXPR\fR[\fB, \fIEXPR...\fR]
417 .B .DATA.W \fIEXPR\fR[\fB, \fIEXPR...\fR]
419 .B .DATA.L \fIEXPR\fR[\fB, \fIEXPR...\fR]
421 .\"O Evaluate arithmetic \fIEXPR\fR expressions, and emit the corresponding
422 .\"O \fBas\fR directive (labelled with \fBLAB\fR). The unqualified \fB.DATA\fR
423 .\"O emits \fB.long\fR; \fB.DATA.B\fR emits \fB.byte\fR; \fB.DATA.W\fR emits
424 .\"O \fB.short\fR; and \fB.DATA.L\fR emits \fB.long\fR.
425 \fIEXPR\fR 式の数値を計算し、一致する \fBas\fR 指示子
426 (\fBLAB\fR でラベルされている) を発行する。
427 無指定の \fB.DATA\fR は\fB.long\fRを発行し、\fB.DATA.B\fR は \fB.byte\fR を、
428 \/\fB.DATA.W\fR は \fB.short\fR を、\fB.DATA.L\fR は \fB.long\fR を発行する。
430 .\"O For example, `foo .DATA 1,2,3' emits `foo: .long 1,2,3'.
431 例えば、`foo .DATA 1,2,3' は `foo: .long 1,2,3' を発行する。
433 .B .DATAB \fIREPEAT\fB, \fIEXPR
436 .B .DATAB.B \fIREPEAT\fB, \fIEXPR
438 .B .DATAB.W \fIREPEAT\fB, \fIEXPR
440 .B .DATAB.L \fIREPEAT\fB, \fIEXPR
442 .\"O Emit \fIREPEAT\fR copies of the value of the expression \fIEXPR\fR
443 .\"O (using the \fBas\fR directive \fB.fill\fR), being \fIREPEAT\fR an absolute
444 .\"O expression with an absolute value. \fB.DATAB.B\fR repeats one-byte
445 .\"O values; \fB.DATAB.W\fR repeats two-byte values; and \fB.DATAB.L\fR repeats
446 .\"O four-byte values. \fB.DATAB\fR without a suffix repeats four-byte
447 .\"O values, just like \fB.DATAB.L\fR.
448 (\fBas\fR 指示子 \fB.fill\fR を使って) 式 \fIEXPR\fR の値を
449 \/\fIREPEAT\fR 個作る。\fIREPEAT\fR は絶対値の絶対式である。
450 \/\fB.DATAB.B\fR は 1 byte の値を作り、
451 \/\fB.DATAB.W\fR は 2 byte の値を、\fB.DATAB.L\fR は 4 byte の値を作る。
452 サフィックス無しの \fB.DATAB\fR は、
453 ちょうど \fB.DATAB.L\fR と同じように 4 byte の値を作る。
455 .B .SDATA\ "\fISTR\fB"\fI...
456 .\"O String data. Emits a concatenation of bytes (no end of string marks are
457 .\"O added, unlike in \fB.SDATAZ\fR) of each \fISTR\fR argument given, and
458 .\"O optionally separated by commas.
460 (\fB.SDATAZ\fR と違い、文字列終わりの印はない)
461 コンマ区切りのそれぞれの \fISTR\fR 引数の連続するバイトを発行する。
463 .B .SDATAB \fIREPEAT\fB,\ "\fISTR\fB"\fI...
464 .\"O Repeated string data. \fIREPEAT\fR specifies how many
465 .\"O copies of the concatenation of every \fISTR\fR argument are emitted.
468 \fISTR\fR 引数を何回発行するかを、\fIREPEAT\fR で指定する。
470 .B .SDATAZ\ "\fISTR\fR"\fI...
471 .\"O Zero-terminated string data. Like \fB.SDATA\fR, except that
472 .\"O a zero byte is written at the end of the string.
473 NUL 文字で終端された文字列のデータ。\fB.SDATA\fR と同様だが、
474 最後に NUL 文字一つが書かれている点が異なる。
476 .B .SDATAC\ "\fISTR\fR"\fI...
477 .\"O Count-prefixed string data. Like \fB.SDATA\fR, but precede the string with
478 .\"O a leading one-byte count. For example, `.SDATAC "HI"' generates `.byte
479 .\"O 2,72,73'. Since the count field is only one byte, you can only use
480 .\"O \fB.SDATAC\fR for strings less than 256 bytes in length.
482 \fB.SDATA\fR と同様だが、文字列の前に 1 byte の数値がある。
483 例えば、`.SDATAC "HI"' は `.byte 2,72,73' を生成する。数値フィールドが
484 1 byte だけなので、\fB.SDATAC\fR は 256 byte 以下の長さの
487 .BR .RES ", " .SRES ", " .SRESC ", " .SRESZ
489 .\"O .BR .RES ", " .SRES ", " .SRESC ", and " .SRESZ
490 .\"O directives to reserve memory and leave it uninitialized. \fBgasp\fR
491 .\"O resolves these directives to appropriate calls of the GNU \fBas .space\fR
493 指示子はメモリを初期化せず予約しておくために使う。
494 \fBgasp\fR はこれらの指示子を、GNU \fBas .space\fR
506 .\"O Reserve room for \fICOUNT\fR uninitialized elements of data. The suffix
507 .\"O specifies the size of each element: \fB.RES.B\fR reserves \fICOUNT\fR bytes,
509 .\"O reserves \fBCOUNT\fR pairs of bytes, and
512 .\"O \fICOUNT\fR quartets.
513 \/\fICOUNT\fR 用の初期化されていないデータ要素のためのメモリを予約する。
514 サフィックスはそれぞれの要素の大きさを指定している :
515 \/\fB.RES.B\fR は \fICOUNT\fR byte を予約し、
517 は \fICOUNT\fR byte のペアを予約し、そして
519 は \fICOUNT\fR の 4 つ組を予約する。
521 .\"O without a suffix is equivalent to
539 .\"O is a synonym for
555 .\"O Like \fB.SRES\fR, but reserves space for `\fICOUNT\fR+1' elements.
556 \/\fB.SRES\fR と同じようなものだが、`\fICOUNT\fR+1' 要素のメモリを予約する。
568 .\"O is a synonym for
576 .\"O These directives control \fBas\fR listing directives.
577 これらの指示子は \fBas\fR の list 指示子をコントロールする。
584 .\"O Emits \fB.list\fR or \fB.nolist\fR, according to its argument.
585 \fB.list\fR か \fB.nolist\fR をその引数に従って発行する。
592 .B .FORM LIN=\fILN\fB COL=\fICOLS\fR
594 .\"O Specify the page size for assembly listings, of \fILN\fR lines and
595 .\"O \fICOLS\fR columns (default: 60x132). You may specify either, or both.
596 .\"O Any values you may have specified in previous instances of \fB.FORM\fR do
597 .\"O not carry over as defaults. Emits the
599 .\"O GNU \fBas\fR directive.
601 \fILN\fR 行 \fICOLS\fR 桁 (デフォルトは 60x132) を指定する。
603 \/\fB.FORM\fR の前の例で示されたどんな値でも、デフォルトとはならない。
605 は GNU \fBas\fR 指示子を発行する。
607 .B .HEADING \fISTRING
608 .\"O Specify \fISTRING\fR as the title of your assembly listings. Emits
609 .\"O `\fB.title "\fISTRING\fB"\fR'.
610 \fISTRING\fR は、アセンブリリストのタイトルになる。
611 `\fB.title "\fISTRING\fB"\fR' を発行する。
614 .\"O Force a new page in the listing. Emits \fB.eject\fR.
615 アセンブリリストで新しいページに強制する。\fB.eject\fR を発行する。
616 .\"O .SH MISCELLANEOUS COMMANDS
620 .\"O Use the alternate macro syntax henceforth in the assembly.
621 アセンブリの中で別のマクロ文法をこれ以降は使用する。
624 .\"O This command is recognized, but not yet implemented. \fBgasp\fR
625 .\"O generates an error message for programs that use \fB.ORG\fR.
626 このコマンドは認識されるが、まだ実装されていない。\fBgasp\fR は
627 \/\fB.ORG\fR を使用しているプログラムに対してエラーメッセージを出す。
630 .\"O Specify the default radix for numbers without an explicitly encoded base
631 .\"O (default: \fBD\fR). \fIS\fR is a case-insensitive letter:
632 明示的に符号化の進数が指定されていない数値について、
633 デフォルトの基数 (radix) を指定する (デフォルトは \fBD\fR である)。
634 \fIS\fR は大文字小文字を区別しない。
659 .\"O Declare \fINAME\fR global (emits \fB.global \fINAME\fR).
660 \fINAME\fR をグローバルに宣言する (\fB.global \fINAME\fR を発行する)。
667 .\"O Mark end of each preprocessor file. A warning is issued if the end of file
668 .\"O is reached without seeing this command.
669 それぞれのプリプロセッサファイルの最後の印。
670 ファイルの最後がこのコマンドなしで終っていた場合は、ワーニングが出る。
672 .B .INCLUDE "\fISTR\fB"
673 .\"O Preprocess the filename \fISTR\fR as if its contents appeared
674 .\"O where the \fB.INCLUDE\fR directive does. Maximum include depth is 30.
676 \/\fB.INCLUDE\fR 指示子で指定されている項目として処理する。
677 インクルードの最大の深さは 30 である。
680 .\"O Evaluate the absolute expression \fISIZE\fR, and emit
681 .\"O \fB.align \fIevaluated_expression\fR.
683 \fB.align \fIevaluated_expression\fR を発行する。
686 .\"O Whitespace (blanks or tabs; not newlines) is partially significant, in that
687 .\"O it delimits up to three fields in a line. The amount of whitespace does
689 (スペースかタブで、改行ではない) 空白で、
690 1 行が 3 つの部分に分かれている時は特に重要である。
693 .\"O \fB\(bu\fR\ First field, an optional "label", must be flush left in a line
694 .\"O (with no leading whitespace) if it appears at all, with an optional colon
695 .\"O after the label name.
697 必須ではない "ラベル" が必ず左寄せ (行頭には空白がない) で書かれる。
698 ラベルの後ろには、必須ではないコロンが付いている。
700 .\"O \fB\(bu\fR\ Second field, which must appear after some whitespace,
701 .\"O contains a \fBgasp\fR or \fBas\fR directive.
702 \fB\(bu\fR\ いくつかの空白の後に 2 番目の部分があって、
703 そこには \fBgasp\fR か \fBas\fR 指示子を含む。
705 .\"O \fB\(bu\fR\ Further fields on a line are arguments to the directive,
706 .\"O separated by either commas or whitespace.
707 \fB\(bu\fR\ 行中のそれ以降の部分は指示子の引数であり、
709 .\"O .SS Special syntactic markers
711 .\"O \fBgasp\fR recognizes a few special markers: to delimit comments, to
712 .\"O continue a statement on the next line, to separate symbols from other
713 .\"O characters, and to copy text to the output literally (One other
714 .\"O special marker, `\fB\@f\fR', works only within macro definitions)
715 \fBgasp\fR はいくつかの特別な印を認識する: コメントの境界を定めるもの、
716 次の行にステートメントを続けるもの、記号をその他のキャラクタと区別するもの、
717 テキストを出力に直接コピーするもの (一つの特別な印としては、`\fB\@f\fR'
720 .\"O The trailing part of any source line may be a comment. A
721 .\"O comment begins with the first unquoted comment character (`\fB!\fR' by
722 .\"O default), or an escaped or doubled comment character (`\fB\e!\fR' or
723 .\"O `\fB!!\fR' by default), and extends to the end of a line. The two kinds of
724 .\"O comment markers lead to slightly different treatment:
725 どんなソースの行でも、その後ろに付いているものはコメントかもしれない。
726 コメントはクォートされないコメント文字 (デフォルトでは `\fB!\fR')
727 から始まるか、エスケープされたコメント文字や 2 文字のコメント文字
728 (デフォルトでは、`\fB\e!\fR' か `\fB!!\fR') で始まり、行末まで続く。
729 この 2 種類のコメント印は、取り扱いがわずかに違う :
733 .\"O A single, un-escaped comment character generates an assembly
734 .\"O comment in the \fBgasp\fR output. \fBgasp\fR evaluates any preprocessor
735 .\"O variables (macro arguments, or variables defined with
736 .\"O .BR .ASSIGNA " or " .ASSIGNC )
737 .\"O present. For example, a macro that begins like this
738 1 文字のエスケープされてないコメント文字は
739 \fBgasp\fR の出力の中にアセンブラコードのコメントを生成する。
740 \fBgasp\fR はどの様なプリプロセッサの変数
749 .MACRO SUM FROM=0, TO=9
753 .\"O issues as the first line of output a comment that records the values you
754 .\"O used to call the macro.
755 は、第 1 行で呼んだマクロの値の出力を記録して、コメントとして吐き出す。
762 .\"O Either an escaped comment character, or a double comment character,
763 .\"O marks a \fBgasp\fR source comment. \fBgasp\fR does not copy such comments to
764 .\"O the assembly output.
765 エスケープされたコメント文字か、2 文字のコメント文字は、
766 \fBgasp\fR のソースコメントの印である。
767 \fBgasp\fR はアセンブラコードの出力にこのようなコメントをコピーしない。
770 .\"O To continue a statement on the next line of the file, begin the
771 .\"O second line with the character `\fB+\fR'.
772 ファイルの次の行に記述を続けるには、2 行目の先頭に `\fB+\fR' を付ける。
773 .\"O Occasionally you may want to prevent \fBgasp\fR from preprocessing some
774 .\"O particular bit of text. To \fBcopy literally\fR from the \fBgasp\fR source to
775 .\"O its output, place `\fB\e(\fR' before the string to copy, and `\fB)\fR' at the end.
776 時々、ある特定の文字列を \fBgasp\fR に処理させたくないことがある。
777 \fBgasp\fR のソースから、その出力に
778 \fB文字通りにコピーする\fRには、`\fB\e(\fR' をコピーしたい文字列の前に置き、
780 .\"O For example, write `\e(\e!)' if you need the characters `\fB\e!\fR' in your
781 .\"O assembly output.
782 例えば、アセンブラコードの出力に `\fB\e!\fR' 文字が欲しい時は、
785 .\"O To separate a preprocessor variable from text to appear
786 .\"O immediately after its value, write a single quote ('\fB'\fR').
787 プリプロセッサ変数と、その直後に続く数値の文字を分離するには、
788 シングルクォート ('\fB'\fR') を書く。
789 .\"O For example, `.SDATA "\P'1"' writes a string built by concatenating the value of `P'
790 .\"O and the digit `1' (You cannot achieve this by writing just `\eP1',
791 .\"O since `P1' is itself a valid name for a preprocessor variable)
792 例えば、`.SDATA "\P'1"' は変数 P の値と数値の 1 とを連結した文字列になる。
793 (`P1' 自身がプリプロセッサ変数の有効な名前なので、
794 `\eP1' と書いただけではこの結果は得られないだろう)
795 .\"O .SS String and numeric constants
797 .\"O There are two ways of writing string constants: as literal
798 .\"O text, and by numeric byte value. Specify a string literal between
799 .\"O double quotes (\fB"\fISTR\fB"\fR). Specify an individual numeric byte value as
800 .\"O an absolute expression between angle brackets (\fB<\fIEXPR\fB>\fR). Directives
801 .\"O that output strings allow you to specify any number of either kind of
802 .\"O value, in whatever order is convenient, and concatenate the result.
803 文字列定数を書くには、2 通りの方法がある:
804 全くのテキストと数で示されたバイトの値である。
805 二重引用符 (\fB"\fISTR\fB"\fR) の間で完全な文字列は指定される。
806 不等号記号 (\fB<\fIEXPR\fB>\fR) の間で絶対式として、
807 個々の NumericByte 値が指定される。
808 文字列を出力する指示子は、どんな種類のどんな命令でも、
811 .\"O You can write numeric constants either in a specific base, or in
812 .\"O whatever base is currently selected by the last \fB.RADIX\fR directive.
813 特定の進数での、あるいは最後の \fB.RADIX\fR 指示子によって現在選ばれる
816 .\"O To write a number in a specific base, use the pattern `\fIS\fB'\fIDDD\fR': a
817 .\"O base specifier character \fIS\fR, followed by a single quote followed by
818 .\"O digits \fIDDD\fR. The base specifier character matches those you can specify
819 .\"O with \fB.RADIX\fR.
820 特定の進数で数を書くためには、パターン `\fIS\fB'\fIDDD\fR' を使う:
821 進数指定文字 \fIS\fR の次にシングルクォートがあり、数字 \fIDDD\fR が続く。
822 進数指定文字は、\fB.RADIX\fRで指定できるものと一致する。
825 \fBgasp\fR は英字または、`\fB_\fR' 、`\fB$\fR' から始まり、
826 同様に文字または数字が続いているようなシンボルやラベル名を認識できる。
828 .\"O Valid symbols start with any alphabetic character, `\fB_\fR' or `\fB$\fR',
829 .\"O and continue with any of them or with digits.
830 有効なシンボルは、アルファベット・`\fB_\fR'・`\fB$\fR' から始まり、
832 .\"O .SS Arithmetic Expressions
834 .\"O There are two kinds of expressions, depending on their result:
835 .\"O absolute expressions, which resolve to a constant (that is, they do
836 .\"O not involve any values unknown to \fBgasp\fR), and relocatable expressions,
837 .\"O which must reduce to the form
839 結果が定数 (つまり、それらは \fBgasp\fR が知らない値を含まない) となる
843 \fIADDSYM\fB+\fICONST\fB-\fISUBSYM
846 .\"O where \fIADDSYM\fR and \fISUBSYM\fR are assembly symbols of unknown value, and
847 .\"O \fICONST\fR is a constant.
848 に変換できなければならない再配置可能式がある。
849 ここで \fIADDSYM\fR と \fISUBSYM\fR は、不明な値のアセンブラシンボルであり
852 .\"O Arithmetic for \fBgasp\fR expressions follows very similar rules to C.
853 \fBgasp\fR の数値式は、C のルールにとても良く似ている。
854 .\"O You can use parentheses to change precedence; otherwise, arithmetic
855 .\"O primitives have decreasing precedence in the order of the following
858 そうでなければ、数値的な基本としては、次に記すような優先順位になる:
860 .\"O \fB\(bu\fR\ 1. Single-argument `+' (identity), `-' (arithmetic opposite), or `~'
861 .\"O (bitwise negation). The argument must be an absolute expression.
862 \fB\(bu\fR\ 1. 一つの引数 `+' (同一の場合), `-' (算術的に反対の場合),
865 .\"O \fB\(bu\fR\ 2. `*' (multiplication) and `/' (division). Both
866 .\"O arguments must be absolute expressions.
867 \fB\(bu\fR\ 2. `*' (乗算) と `/' (除算)。
870 .\"O \fB\(bu\fR\ 3. `+' (addition) and `-' (subtraction). At least one argument must
872 \fB\(bu\fR\ 3. `+' (加算) と `-' (減算)。
873 少なくとも一つの項は絶対式でなくてはならない。
875 .\"O \fB\(bu\fR\ 4. `&' (bitwise and). Both arguments must be absolute.
876 \fB\(bu\fR\ 4. `&' (ビットの AND)。両方の項は、絶対式でなくてはならない。
878 .\"O \fB\(bu\fR\ 5. `|' (bitwise or) and `~' (bitwise exclusive or; `^' in C).
879 .\"O Both arguments must be absolute.
880 \fB\(bu\fR\ 5. `|' (ビットの OR) と、`~' (ビットの XOR。C における `^')。
882 .\"O .SS String Primitives
884 .\"O You can use these primitives to manipulate strings (in the argument
885 .\"O field of \fBgasp\fR statements):
887 文字列 (\fBgasp\fR ステートメントの項にある) を計算できる:
890 .\"O Calculate the length of string \fB"\fISTR\fB"\fR, as an absolute expression.
891 .\"O For example, `.RES.B .LEN("sample")' reserves six bytes of memory.
892 文字列 \fB"\fISTR\fB"\fR の長さを絶対式として計算する。
893 例えば、`.RES.B .LEN("sample")' は、
896 .B .INSTR("\fISTR\fB", "\fISEG\fB", \fIIX\fB)
897 .\"O Search for the first occurrence of \fISEG\fR after position \fIIX\fR of
898 .\"O \fISTR\fR. The result is -1 if \fISEG\fR does not occur in \fISTR\fR after
899 .\"O position \fIIX\fR.
900 \fISTR\fR の中で、位置 \fIIX\fR より後ろの最初に出現する \fISEG\fR を探す。
901 もし、\fISEG\fR が \fISTR\fR 中で、位置 \fIIX\fR より後ろになければ、
904 .\"O The substring of \fISTR\fR beginning at byte number \fISTART\fR and
905 .\"O extending for \fILEN\fR bytes.
906 .B .SUBSTR("\fISTR\fB", \fISTART\fB, \fILEN\fB)
907 \fISTR\fR の \fISTART\fR から始まって \fILEN\fR byte まで伸びている部分文字列。
908 .\"O .SH ALTERNATE MACRO SYNTAX
910 .\"O When the \fB\-\-alternate\fR option is specified, an alternate macro sytax
911 .\"O is used by \fBgasp\fR. This syntax reminiscent of the syntax of Phar Lap
912 .\"O macro assembler, but it is not meant to be a full emulation of Phar Lap or
913 .\"O similar assemblers. In particular, \fBgasp\fR does not support directives
914 .\"O such as DB and IRP.
915 \fB\-\-alternate\fR オプションが指定されている時、
916 別のマクロ文法が \fBgasp\fR によって使われる。
917 この文法は、Phar Lap マクロアセンブラを想い出させるが、
918 これは、Phar Lap マクロのエミュレーションや、
919 それと似ているアセンブラであるという事を意味してはいない。
920 特に、\fBgasp\fR は DB や IRP のような指示子をサポートしていない。
922 .\"O \fB\(bu\fR\ You can use preprocessor directives without a leading `\fB.\fR'
923 .\"O dot. For example, you can write `SDATA' with the same effect as .SDATA'.
924 \fB\(bu\fR\ プリプロセッサ指示子を `\fB.\fR' ドットを前に置かずに使える。
925 例えば、`SDATA' と .SDATA' を同じ効果のものとして書ける。
927 .\"O \fB\(bu\fR\ LOCAL is available.
928 \fB\(bu\fR\ LOCAL が有効になっている。
930 .\"O \fB\(bu\fR\ You can write strings delimited like "STRING", 'STRING', or <STRING>
932 "STRING", 'STRING', <STRING> のように書ける。
934 .\"O \fB\(bu\fR\ To include any single character literally in a string (even if the
935 .\"O character would otherwise have some special meaning), you can
936 .\"O prefix the character with `\fB!\fR'. For example, `"hello !"world!"".
937 \fB\(bu\fR\ 文字列の中のどんな文字も文字通りに取り込むために、
938 (たとえその文字が他に特別な意味を持っていたとしても)
939 `\fB!\fR' を文字の前につけられる。例えば、`"hello !"world!""
941 .\"O \fB\(bu\fR\ You can write \fB%\fIEXPR\fR to evaluate the expression
942 .\"O \fIEXPR\fR and use the result as a string.
943 \fB\(bu\fR\ \fB%\fIEXPR\fR を \fIEXPR\fR 式の数値を求めるために書くことが出来、
948 .\"O If we feed \fBgasp\fR with this
952 .MACRO saveregs from=8 to=14
953 count .ASSIGNA \efrom
954 ! save r\efrom..r\eto
955 .AWHILE \e&count LE \eto
957 count .ASSIGNA \e&count + 1
963 bar: mov #H'dead+10,r0
964 foo .SDATAC "hello"<10>
968 .\"O it generates this GNU \fBas\fR code:
969 を与えると、下の GNU \fBas\fR のコードを生成する:
978 bar: mov #57005+10,r0
979 foo: .byte 6,104,101,108,108,111,10
986 .\"O Report bugs to <bug-gnu-utils@gnu.org> and <hjl@lucon.org>
987 バグは <bug-gnu-utils@gnu.org> と <hjl@lucon.org> にレポートして欲しい。
989 .\"O Man page by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
990 man ページは Ragnar Hojland Espinosa
991 <ragnar@ragnar-hojland.com> によって書かれた。