<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 15 Dec 2011 10:16:41 +0100
From   : rick@... (Rick Murray)
Subject: 32016 + 32082

By the way, it was not intended to be representative of how BASIC uses the  
stack, rather a look at where the stack sits when running the MOS (and  
BASIC), in other words, sort-of where it sits with a machine doing  
nothing...


Best wishes,

Rick

(sent from my mobile)

-----Original message-----
From: Sprow <info@...>
To: BBC MailList <bbc-micro@...>
Sent: 2011 Dec, Thu, 15 09:19:42 CET
Subject: Re: [BBC-Micro] 32016 + 32082

In article <4EE9910D.9030405@...>,
   Rick Murray <rick@...> wrote:
> I mean, you *could* just stack 
> everything on procedure entry, but how much space do you have? On a 
> Master (BeebEm), I threw together a program, namely:
>    [ OPT 2 : TSX : RTS ]
> and it told me the default location for the stack pointer when in BASIC 
> doing nothing is &ED. If we assume Acc is corruptable and functions take 
> five bytes (16 bit address, flags, X, Y) then that means we can 
> comfortably nest around 40 functions. 

6502 BASIC doesn't use the 6502's stack for very much at all precisely
because it's so tiny. It implements its own stack starting at HIMEM for
procedures and functions so your test isn't very representative,
Sprow.


_______________________________________________
bbc-micro mailing list
bbc-micro@...
http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>