----------------------------------------
> Date: Tue, 22 Jan 2008 18:03:56 -0800
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Is Scheme/Lisp somehow more "fundamental" than other languages?
> 
> On Tue, Jan 22, 2008 at 03:24:01PM -0800, SJS wrote:
>> When did x86 and ARM CPUs get a stack on the CPU?
> 
> The assembly includes instructions for a stack.  I don't know details of where
> or how the stack is implemented.
> 
The stack is in memory.  The sp (stack pointer) register points to the top of 
the stack.  The push instruction pushes 1,2, or 4 bytes onto the stack, 
decrementing the sp register.  Pop reads and increments it.  The stack grows 
downward, the usual way to use it is to put it at the top of unused memory and 
let it grow down, while you let your heap grow up.  That maximizes memory.

Gabe


_________________________________________________________________
Need to know the score, the latest news, or you need your HotmailĀ®-get your 
"fix".
http://www.msnmobilefix.com/Default.aspx
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to