[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc65 / ca65: how to interface C and assembly?



On Wed, 7 Dec 2005, Michael J. Mahon wrote:

A volatile type is a necessity in any optimized language used to
access addresses when the access has side effects.  As noted, the
Apple (and indeed, any 6502 machine) is loaded with such side effects.

One must also make some "policy" decisions about indirect accesses
(through pointers).  Without explicit information to the contrary,
it is best to assume that a pointer *cannot* point to a volatile,
since to do otherwise would eliminate almost all optimizations.

I for one don't like my code computer-optimized because I lose control over it.

-uso.