Post Reply 
[34S] Proposal for Entry RPN mode with dynamic stack
02-19-2015, 02:50 AM
Post: #42
RE: [34S] Proposal for Entry RPN mode with dynamic stack
Matthias, some thoughts about the dynamic stack:

You wrote that stack-relative addressing would use the [R/S] key. But that's already assigned to the letter Y. [RCL] [R/S] currently means RCL Y. If you wanted to use [R/S] for this purpose, then Y could be entered only as [RCL] [ENTER] [R/S], similarly to X, Z and T. It may not be easy to get used to entering RCL Y differently depending on whether or not dynamic stack is enabled. Alternatively, you could use [XEQ] instead of [R/S] for this purpose.

How would this new addressing mode be encoded in programs? It'd mean very many new instructions if you'd like to make it available with every command. Maybe it would be sufficient to only allow stack-relative addressing with some commands: e.g. RCL, STO, x<->, RCL/STO combined with basic operations, and their complex variants, but even then, it's very many new code points.

As someone who has little experience with an 'infinite' stack, I also wonder if there's any real need for such an addressing mode. I can imagine that one might like to work with the 9th or 10th number in the stack, but it seems unlikely that anyone would be able to keep track of a long stack with such precision that they'd want to take the 38th number. (The stack potentially changes all the time, it isn't as easy as keeping track of what's in the 38th register.) Perhaps making the contents of the dynamic stack available in the register browser would be good enough?

You're making extensive use of the [CPX] key in your proposals. Why is that? Is it simply that more key combinations are needed and [CPX] is available, or is there some logical reason behind it?

There's no unallocated persistent RAM available, so what should be sacrificed to store the stack depth?

Marcus hinted that restoring the stack after an error could be a challenge. Have you had a look at the code (xeq() in trunk/xeq.c) already? That part may need to be completely rewritten if the stack is allowed to become very large.

I understand that these ideas are a work in progress but once the dust has settled down a bit, could you provide a single list of all proposed stack rotate and similar operations, each with a short explanation of what they do, how they'd be entered from the keyboard, and why they're useful? I have to admit I've lost track of them, and it isn't clear to me how each fits into the big picture and why they make sense as a coherent set.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [34S] Proposal for Entry RPN mode with dynamic stack - Bit - 02-19-2015 02:50 AM



User(s) browsing this thread: 11 Guest(s)