Re: [cc65] Atari stack pointer?

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-09-16 00:38:44


On Mon, Sep 15, 2003 at 03:26:42PM -0700, Shawn Jefferson wrote:
> How is the atari stack pointer (sp) calculated, I took a look in the
> source and I can't really figure it out.  Shouldn't it somehow be
> calculating the end of RAM ?
                   
APPMHI is set to MEMTOP. The library constructors may decrease the value in
APPMHI, if they need more memory. One of the last constructors is initsp,
which initializes the stack from the value in APPMHI. So sp is set to MEMTOP
minus "what is needed by the library".

At least this is what I read from the sources - I'm no Atari specialist.

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-09-16 00:38:55 CEST