Next
Previous
Contents
ca65はJohn R. Dunning氏によって開発された"cc65"の1部分、ra65アセンブラーの代替になります。
氏のra65には多くの問題があること及び、著作権の許諾が取れなかったので、cc65用の完全な新しいアセンブラー、リンカー、アーカイバーを書く事を決意しました。
ca65は、その1部分です。
アセンブラーの多くの部分(コード生成と、シンボルテーブルハンドリング用のいくらかのルーチン)
は、過去に書いたa816と名づけたクロスアセンブラーから流用しています。
開発にあたって重要と考えた設計思想のリストを、ここに示す。
- アセンブラーはマクロに対応するべきである。
マクロは絶対必要というわけではないが、多くの事がやり易くなる。
これは、特にコンパイラーの最終段階でアセンブラーを使うときに。
- アセンブラーは、新しいCPU"65C02"と"65816"に対応するべきである。
I have been thinking about a 65816 backend for the C compiler,
and even my old a816 assembler had support for these CPUs,
so this wasn't really a problem.
- アセンブラーは、再配置可能なコードを作るべきである。
これは、コンパイラーをサポートするために必須であり、これはとても都合が良い。
- 条件アセンブリは対応されるべきである。
これは、アセンブラーで書かれた(Elite128のような)巨大なプロジェクトのために必須。
- アセンブラーは、セグメントに対応するべきであり、3セグメント以上対応するべきである。
(this is the count, most other assemblers support).
1つ以上のコードセグメントは、(C64のような)分割されたROM領域をもつシステムのコードの開発を助ける。
-
リンカーは、任意の式の解決を可能にするべき。
It should be able to get things like
.import S1, S2
.export Special
Special = 2*S1 + S2/7
right.
-
True lexical nesting for symbols.
This is very convenient for larger assembly projects.
-
"Cheap" local symbols without lexical nesting for those quick,
late night hacks.
-
I liked the idea of "options" as Anre Fachats .o65 format has it,
so I introduced the concept into the object file format use by the new cc65 binutils.
-
The assembler will be a one pass assembler.
There was no real need for this decision,
but I've written several multipass assemblers, and it started to get boring.
A one pass assembler needs much more elaborated data structures,
and because of that it's much more fun:-)
-
Non-GPLed code that may be used in any project without restrictions or fear of "GPL infecting" other code.
Next
Previous
Contents