Date : Thu, 15 Dec 2011 08:19:42 +0000 (GMT)
From : info@... (Sprow)
Subject: 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.