GBDKライブラリドキュメント
GBDK libraries documentation

Prev

Next

1章 GBDKとmaccerの使用
Chapter 1.Using GBDK and maccer

目次
Table of Contents
プログラムのコンパイル
Compiling programs
Makefilesの使用
Using Makefiles

プログラムのコンパイル
Compiling programs

このセクションは、 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を使用する-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:

例えば、 メモリ セクション中の例をコンパイルし、かつリストとマップファイルを生成するために、次のものを使用します:
For example, to compile the example in the memory section and to generate a listing and map file you would use:
lcc -Wa-l -Wl-m -Wl-g_snd_stat=0xff26 -o image.gb hardware.c
Cがシンボル名に加える先頭のアンダースコアに注意してください。
Note the leading underscore that C adds to symbol names.

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から読みます。
If the -o source.s option isnt specified then maccer writes to stdout.If source.ms isnt specified then maccer reads from stdin.



Prev
ホーム
Home

Next
序文
Preface
Makefilesの使用
Using Makefiles
1