Re: [cc65] To Atari platform coordinator

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-07-17 01:18:44
On Sat, Jul 16, 2005 at 11:00:07PM +0200, Christian Groessler wrote:
> Of course, in general, a linker config could handle this. I was not
> talking in general, but Atari specific. :-)
> I think the fact that the Atari doesn't use the value from the linker
> config, but the memory size found at runtime, is not a bug, but a
> feature(tm).

I didn't write "the value", but "a value" for a reason. For example, there
could be a symbol

SYMBOLS {
    __GRAPHICS_MEMORY__ = 7123;
}

that is subtracted from high memory before setting the available memory for
the cc65 program. This would remove the most code needed in the initscrmem
constructor together with the table. And it would be usable for other things
besides graphics memory (in this case, the symbol should probably get another
name). It would cost 5 bytes in crt0.s but save about 80 for initscrmem.
Another two bytes could be saved if initsp is not made a constructor but
inlined in the startup code. Since it's always called, there's no need to make
it a constructor.

This symbol can also be used if a graphics driver is loaded. Of course, the
necessary values for a driver must go into the docs, but once this is done,
it's almost as convenient to use this method instead of _graphmode_used.

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 Sun Jul 17 01:19:20 2005

This archive was generated by hypermail 2.1.8 : 2005-07-17 01:19:30 CEST