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

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-11-03 21:52:35
Hi!

On Wed, Nov 03, 2010 at 11:57:34AM +0100, Oliver Schmidt wrote:
> a) There could be a new (per target) secondary linker config making
> only minimal assumptions on the program.

I agree with this one. Having c64-asm.cfg, c128-asm.cfg or whatever could be
helpful.

> 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.

With a) this is not really necessary.

> 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.

This is true, but probably not of real use given the projects we're talking
about. If we have a small c64 project with just one file and without segments
(thus anything goes into CODE), all one needs is

        .addr   *+2

at the beginning of the file. This is exactly the solution for the problem,
AgentFriday talked about, and it's not overly complex. If the line above is in
an object file, people will have to care about linking a specific object file,
which is probably more work than just adding the line above.

This may be different for the other headers, but supporting not only the load
address but also a SYS header adds quite some complexity: One has to decide if
he wants the load address plus the SYS header or just one of them and must
somehow add an entry point, so the SYS jumps to the correct address.

Of course I may be proved wrong with this:-) Fortunately it's easy to start up
with some stuff in the wiki that has the necessary code lines plus an
explanation on how to do it. Having some -asm.cfg files may also be helpful,
but my suggestion would be to start with the docs and see if this will lower
the number of desperate ca65 users:-)

Regards


        Uz


--
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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 21:52:44 2010

This archive was generated by hypermail 2.1.8 : 2010-11-03 21:52:47 CET