Re: [cc65] Atari stack pointer?

Date view Thread view Subject view

From: Christian Groessler (chris_at_groessler.org)
Date: 2003-09-16 11:30:18


On Tue, 16 Sep 2003, Ullrich von Bassewitz wrote:

>
> On Mon, Sep 15, 2003 at 04:30:08PM -0700, Shawn Jefferson wrote:
> > Should I be avoiding the memory used by the stack, or should the stack
> > be placed differently (at the end of the RAM from the config file?)
>
> As I see it, the stack should be placed differently. But this was done by
> Christian, and I'm sure there's a reason for the way it is, so we will have to
> wait for him to comment. If I remember correctly, the Atari startup tries to
> be smart about a graphics mode being in effect.

The values in the config file are the maximum possible values. The startup
code then tries to adapt to the graphics mode used by the program and to
the installed memory size. (Original 800s could have anything in 8k steps
from 8k to 48k, and there are 400 and 600xl with 16k). So the spack
pointer is determined from the MEMTOP ($2e5) system variable.

There is currently no easy way to reserve memory from use by cc65, short
of setting MEMTOP to a lower value before running the program. Or bumping
up the load address and use low memory.

What do you want to do with the memory? Maybe a malloc() could work too?

regards,
chris


----------------------------------------------------------------------
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-09-16 11:32:16 CEST