Re: [cc65] Using CA65 as a stand-alone assembler

From: Stefan <stefan-physik1gmx.net>
Date: 2007-10-30 12:00:35
Thats right, using a linker config is normally a better idea instead of 
using the .org directive.
But using no .org and no linker config is also possible with the -S switch.
Then you have to supply the two start adress bytes by yourself with a .addr 
*+2 at the
beginning of your code.
You can also use the original linker config file from the libsrc/cfg 
directory.
The need for a main() routine also doesn't come from the linker config file.

What you should do depends on how big your project is, if you want to
incoporate the code into some other, if you want to write yourself a library 
and
so on... The best idea, i think is to give all variants a try and then 
decide
with which to continue.
If you want to try something out fast, then you perhaps don't want to
use all the full blown features of ca65 and so a quick hack is sometimes
just right.

Greetz

Monti

> Like gpz says you should use a custom linker config. Using -tnone is a
> hack that has side effects. With a custom config, there's no need for
> a main routine - that's a side effect from linking with the C runtime.
> For a few practical examples check out my projects, e.g. udpslave.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Oct 30 12:00:35 2007

This archive was generated by hypermail 2.1.8 : 2007-10-30 12:00:39 CET