GBDKライブラリドキュメント
GBDK libraries documentation |
||
---|---|---|
前
Prev |
次
Next |
このセクションは、
Pascalのホームページ
にある指示のようにGBDKを適切にインストールして、ライブラリを構築していると仮定します。
This section assumes that you have installed GBDK properly and build the libraries as per the instructions on Pascal's homepage.
プログラム「lcc」は実際のコンパイラ、アセンブラ、リンカのためのフロントエンドです。
これは、コマンドラインオプションとファイルの拡張子に基づいて、行いたいものを作り出し、様々なプログラムが呼ばれる順序を計算し、次に、順番にそれらを実行します。
いくつかの例があります:
The program 'lcc' is a front end for the actual compiler, assembler and linker.It works out what you want to do based on command line options and the extensions of the files you give it, computes the order in which the various programs must be called and then executes them in order.Some examples are:
lcc -o image.gb source.c - Cソース「source.c」をコンパイル、アセンブル、リンクして、Gameboyイメージ「image.gb」を生成します。
lcc -o image.gb source.c - compile the C source 'source.c', assemble and link it producing the Gameboy image 'image.gb'
lcc -o image.gb source.s - ファイル「source.s」をアセンブル、リンクして、Gameboyイメージ「image.gb」を生成します。
lcc -o image.gb source.s - assemble the file 'source.s' and link it producing the Gameboy image 'image.gb'
lcc -c -o object1.o source1.c - Cプログラム「source1.c」をコンパイルし、後のリンクのためにオブジェクトファイル「object1.o」を生成して、それをアセンブルします。
lcc -c -o object1.o source1.c - compile the C program 'source1.c' and assemble it producing the object file 'object1.o' for later linking.
lcc -c -o object2.o source2.s - リンクして、後のためにオブジェクトファイル「object2.o」を生成するファイル「source2.s」をアセンブルします。
lcc -c -o object2.o source2.s - assemble the file 'source2.s' producing the object file 'object2.o' for later linking
lcc -o image.gb object1.o object2.o - 2つのオブジェクトファイル「object1.o」と「object2.o」をリンクし、Gameboyイメージ「image.gb」を生成します。
lcc -o image.gb object1.o object2.o - link the two object files 'object1.o' and 'object2.o' and produce the Gameboy image 'image.gb'
lcc-o image.gb source1.c source2.s - source2.sをアセンブルしてかつ、その後、image.gbを生成するためにそれらをともにリンクして、source1.cをアセンブルして、そのときコンパイルすることにより利口な材料の種類をすべて行います。
lcc -o image.gb source1.c source2.s - do all sorts of clever stuff by compiling then assembling source1.c, assembling source2.s and then linking them together to produce image.gb.
アセンブラなどへの引数はlccを使用する-Wpによって渡すことができます、
-Wp..., -Wf..., -Wa...and -Wl...
オプションをプリプロセッサ、コンパイラ、アセンブラとリンカへそれぞれに渡すこと。
いくつかの共通のオプションがあります:
Arguments to the assembler etc can be passed via lcc using -Wp..., -Wf..., -Wa...and -Wl...to pass options to the pre-processor, compiler, assembler and linker respectivly.Some common options are:
-Wa-l アセンブラリストファイルを生成します。
-Wa-l to generate an assembler listing file.
-Wl-m
- その後、デバッグするために
no$gmb
.symファイルに変えることができるリンカマップファイルを生成します。
maptosym
の使用。
-Wl-m to generate a linker map file which can then be turned into a no$gmb .sym file for debugging using maptosym.
-Wl-gvar=addr リンク時にvarをアドレス「addr」に結合します。
-Wl-gvar=addr to bind var to address 'addr' at link time.
lcc -Wa-l -Wl-m -Wl-g_snd_stat=0xff26 -o image.gb hardware.cCがシンボル名に加える先頭のアンダースコアに注意してください。
Unfortunatly
maccer
不幸にも、Michael Hopeのアセンブラマクロプリプロセッサーmaccerをlcc dosntとしてseperatlyに実行しなければなりません、そのことを知っている。
マクロ「source.ms」を備えたアセンブラファイルをアセンブラファイル「source.s」、使用に変えること
Unfortunatly maccer, Michael Hope's macro preprocessor for the assembler has to be run seperatly as lcc dosnt know about it.To turn the assembler file with macros 'source.ms' into the assembler file 'source.s', use
maccer -o source.s source.ms-o source.sオプションを指定しない場合、maccerはstdoutに書きます。 source.msを指定ない場合、maccerはstdinから読みます。
前
Prev |
ホーム
Home |
次
Next |
序文
Preface |
Makefilesの使用
Using Makefiles |