Re: [cc65] Atari Memory Layout

From: Christian Grössler <chris1groessler.org>
Date: 2010-09-26 13:53:18
Hi,

On 26.09.10 12:58, Oliver Schmidt wrote:
> The cc65 Atari docs say:
>
> "... This gives a usable memory range from $2E00 - $BC1F. ... The load
> address of $2E00 was chosen to accommodate having a DOS loaded and a
> driver that resides in low memory such as the 850 R: handler. ..."
>
> I saw a (seemingly working) linker config defining $1F00 - $FFFF:
> http://ataricc65lib.svn.sourceforge.net/viewvc/ataricc65lib/contiki-2.1/platform/atari/linker.cfg?view=markup
>
> Is it possible to explain with a reasonable effort, when it is
> plausible to lower the start address from $2E00? Is $1F00 a meaningful
> value? If yes, for which scenario?

In the Atari memory map DOS (if present) and the RS232 driver (if present) load into
low memory.
So depending on the DOS version used, the lowest available memory address for the
program may vary. The $2E00 value is chosen very chosen conservatively to work in
(hopefully) all scenarios.

If you know the DOS version used (since you prepare a whole boot disk where the
program is supposed to be started from), you can adjust the lower memory accordingly.

For example in my Contiki 1 port I used MyPicoDOS, since it was the one with the
lowest memory footprint I could find.

I don't know right now how to find the lowest free memory address after DOS has
loaded. I've moved and all my Ataris and documentation is in storage.
I can check later online but I have to go now...


> I presume the RAM end $FFFF was choosen to not restrict the linker
> "unnecesarily" in the case MEMTOP turns out to be very "high". I
> presume $BC1F was choosen as a reasonable default. If MEMTOP actually
> is somewhere different is it expected to be lower and/or higher than
> the default? Which scenarios / values are plausible?

I don't know why $FFFF was chosen in the cited config file. I chose $BC1F since
it's the value for a 48k+ Atari. For Ataris with less than 48k the startup code
adjusts stack and heap accordlingly.

regards,
chris
----------------------------------------------------------------------
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 Sep 26 13:53:39 2010

This archive was generated by hypermail 2.1.8 : 2010-09-26 13:53:41 CEST