Re: [cc65] Customization of cc65 for new targets

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-02-15 00:27:56
Hi Uz,

> I get a handful of requests a year from people planing to port cc65 to new
> systems and asking for more information. There is currently no document that
> describes how to do a port. Bruce offered to write such a document using his
> target as an example. It was my request to have the text be as generic as
> possible, so it is useful for a larger audience.

I see. Thanks for this background info :-)

If the text is not only intended for the bare-metal scenario then an
additional remark from my side would be to make clearer that the
zeropage memory segment typically has a size of $1A and not $100
because (just like with the RAM memory segment) it's not about what's
physically there but about what's to be used by cc65.

> I don't know if a note like this is really a good idea, because not having
> variables initialized with zero violates an important part of the C standard.

For every of the three lines there are good reasons to have them in.

>> On the other hand I'd have expected a section saying that a 'JSR
>> donelib' right before a 'BRK' could most likely be deleted, but there
>> wasn't.

> Yes, maybe. But as it is documented now, it covers the general case and that's
> good for the reasons named above. Having calls to zerobss and initlib/donelib
> is always correct and does always work. Leaving them off, may work for a
> specific system and for a specific version of the library.

Certainly true for the general case. Just think about dangling
interrupt sources not shut down in donelib! I was only trying to point
out that _IF_ there's something to "optimize" away then it's the
donelib right before the brk.

Best, 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 Mon Feb 15 00:28:05 2010

This archive was generated by hypermail 2.1.8 : 2010-02-15 00:28:07 CET