Re: [cc65] ca65 for stand-alone asm projects

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-11-03 11:57:34
Hi,

> I think that to
> reasonably expect folks to be able to adopt ca65 for anything other
> than augmenting cc65 C code requires that a new user could easily
> figure out how to do what is one of the simplest things on all the other
> assemblers he's used.  Am I alone in this thought?

So here's my take:

As Per already pointed out it seams natural that using the cc65
toolchain for an asm-only project requires at least two files: The
input to the assembler and the input to the linker.

Having that said things could very well made be more friendly without
much effort:

1. The information in a linker config can roughly be classified as
either being related to the environment or being related to the
program. This combination of these information in one file makes them
hard to understand for any newbie. There could be two approaches for
improvement:
a) There could be a new (per target) secondary linker config making
only minimal assumptions on the program.
b) The exsisting primary linker configs could be made more asm-only
friendly by declaring DATA, RODATA, ZPSAVE, BSS and ZEROPAGE as
optional. Then they could be used with any asm-only program consisting
of the three sections EXEHDR, STARTUP and CODE.
I understand that making the sections mentioned above optional removes
some consistency check for C porgrams but this loss might be
considered small enough to justify the benefit described.

2. It was already discussed on this list, if it would make sense to
separate the stuff that goes into EXEHDR out of the crt0.s files. I
personally think that would be a good idea, however this wasn't the
result of the discussion... But it would be at least possible to have
a copy of that code in a file exehdr.o placed in the 'extra'
directory. That 'extra' directory infrastructure is already in place.
It allows cc65 targets to deliver standalone .o files which can be
refered by the user on the ld65 cmdline without providing a path to
them. It is currently used for apple2-iobuf-0800.o - see here:
http://www.cc65.org/snapshot-doc/apple2-5.html#ss5.3

1.) and 2.) together with a small tutorial provided by the OP that
basically says
- why there is a STARTUP segment and how to use it
- how the ld65 cmdline has to look like to get the wanted config and
the exehdr.o linked.
could make ca65 much more approachable for asm-only usage.

Just my (lengthy) two cents,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Nov 3 11:57:40 2010

This archive was generated by hypermail 2.1.8 : 2010-11-03 11:57:43 CET