Re: LZ: Stacks


[Prev][Next][Index][Thread]

Re: LZ: Stacks



Ed Plese, Jr. wrote:
> 
> I finally got my interrupt program to run ZShell by the press of two
> keys without having it keep displaying the cursor.  Now I have run
> into another problem.  Is it possible to entirely clear the stack??
> How many words can be stored to the stack before the calc does wierd
> stuff (crash, etc.)??  Right now I have made it so that if you are in
> ZShell and just hold down the two keys, the calc will crash after
> about a minute or so and I think the stack is the cause.  So, if you
> have any information regarding the stacks, please send it my way.
> 
> Thanks
> 
> -Ed


Well, sp is the satack pointer, and I think how it works is that when you 
push, it decrements sp and adds the byte in a to that address, or vice 
versa.  When you pop, it does the opposite.  Try looking at the stack 
pointer and seeing what it points to, then push something, and check 
again.  I'm pretty sure something bad would happen when you try popping 
stuff off, and you do too much.  Oh wait...maybe it moves so much it 
moves into rom, and then you can't push anything onto the stack.  Just 
some fluttering thoughts...


<pre>
-- 
Compliments of:
_-_-_-_-_-_-_-_
  Alan Bailey
  mailto:bailala@mw.sisna.com
  IRC:Abalone
  Web:http://www.mw.sisna.com/users/bailala/home.htm
</pre>


References: