Re: [cc65] The Contiki Desktop OS for cc65

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-03-14 17:44:39


On Fri, Mar 14, 2003 at 08:29:13AM -0800, Shawn Jefferson wrote:
> Does the C64 really have that much more RAM than the Atari?  We may have to
> get a little more creative in using space from the OS... although I don't know
> how much more there is to take?  The C: routines?

I think the reason is that the C64 is a very simple device when it comes to
the builtin software. It has full 64K of memory. 8K are shadowed by the kernal
ROM and not usable from the current cc65 setup. Another 4K are shadowed by the
I/O area and also unusable (this memory will get used by the C64 tgi driver).
The kernal needs 1K for variables and another 1K for screen memory - that's
it. So you have 64 - 8 - 4 - 1 - 1 = 50K of memory available. Since there's no
need to load any OS, drivers or whatever, the compiled code can use all of
this memory.

It is interesting that the C128 (a somewhat more advanced machine) has less
memory available. For one, because the builtin kernal needs more space, and
second, because the ROM reserves another 8K for variables and screen memory.
           
On many Commodore machines it is possible to bank out the ROMs to get access
to the underlying RAM. So with some overhead in space and runtime effiency
(wrappers are needed when calling ROM functions), even more memory can be made
available. This is what the Plus/4 library currently does, leading to a
whooping 60K of memory usable for C programs.

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-03-14 17:44:49 CET