Re: [cc65] c64 autostart code

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-10-30 10:14:18


On Wed, Oct 29, 2003 at 10:47:30PM -0800, David Holz wrote:
> Aren't -C and -t supposed to be incompatible?

Not really. You cannot give both options to the linker, and as far as I
remember, very old versions of cl65 also refused to work when both options
where given. But the current behaviour for cl65 is to use the target specified
with "-t" for the compiler and assembler, and the config file given with "-C"
for the linker, if both are given. So

        cl65 -t none -C autostart.cfg autostart.s

means to call the assembler with "-t none" and the linker with "-C
autostart.cfg". Maybe something like "--nostdlibs" would be needed to suppress
linking the startup file and standard library to the executable. This would
allow to specifiy the correct target for the assembler (and maybe, compiler):

        cl65 -t c64 --nostdlibs -C autostart.cfg autostart.s

> I got around that kludgy start address stuff by modifying the ld65 source to
> give a "sa" flag in the MEMORY section, that will simply output the start
> address before the memory chunk.  Is this something you'd want patched into
> the sources, Uz?

I don't think adding ".addr *+2" is a kludge. And my usual argument against
such stuff does also apply here: If I build knowledge about the CBM load
address, and the capability to add it on request into the linker, I will also
have to add the capability to generate and supply

    - the Atari executable header,
    - the TAP header for the Oric Atmos,
    - the DOS3.3 file header for the Apple ][,
    - the INES header for the NES,
    - and every other header that is needed by future systems.

The nice thing about the linker is that it is almost completely system
independent, and I think this is good. Maybe that there will be a point, where
it is necessary to add some system specific knowledge to the linker, but I
don't think that just replacing ".addr *+2" in one file by "sa = yes" in
another is a reason to do so.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-10-30 10:14:42 CET