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

Hi,

Fair point, but then, how much baggage does BASIC carry that simply wouldn't  
exist in a compiled program? Surely BASIC makes use of the (CPU) stack  
itself, if not necessarily in the course of running the loaded program?


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 >>