Re: [cc65] Any interest in GameCartVic?

From: Andre Majorel <amajorel1teaser.fr>
Date: 2009-01-20 22:41:47
On 2009-01-20 15:35 +0100, Jonathan MASUR wrote:

> I guess a way to have optimised code even with C is to use
> globals and  fastcalls as much as possible (and use locals only
> if you can't come  with any global variable to do the work). But
> in the end you'd end up  with less portable code and would still
> run under variable conflicts  which are the main drawbacks of
> assembly.

A way to have global variables without the possibility of some
other part of the code using them would be to declare them
static and split the code into more source files than you would
normally.

If foo.c only contains one function, any static globals in foo.c
are effectively local to that function. (Assuming you don't need
recursion or re-entrancy.)

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jan 20 22:41:52 2009

This archive was generated by hypermail 2.1.8 : 2009-01-20 22:41:54 CET