Post Reply 
[newRPL] interested in RPN mode?
10-21-2019, 08:12 PM
Post: #11
RE: [newRPL] interested in RPN mode?
(10-19-2019 06:45 PM)Claudio L. Wrote:  
(10-18-2019 10:17 PM)rprosperi Wrote:  As long as the stack is 'trimmed' to 4 levels after processing, it sounds interesting.

And by 'check after executing each command' does this mean each newRPL-native command, or would it include previously-defined newRPL prograns/commands already in the user's path? If the latter, then I suppose one could mix newRPL commands into newRPN commands and programs, so extended-stack manipulation components can be used (Matrices, Lists, etc.) as needed, returning simpler results to be consumed in the newRPN program.

Is that what you're thinking?

When I say each command, I mean each step in a program.
<< 1 2 3 4 5 >> would push a 1, then check, then push 2, check, 3, check, 4, check, then when pushing 5 there will be 5 elements on the stack, and the next check will trim the stack back to 4 elements. This allows all commands to work the same way in RPN or RPL mode.
User programs would always have the stack trimmed after each step, internal commands (which take a single step) have access to the infinite RPL stack internally,and they may return more than 4 elements in the stack, but there will be a stack check and trim happening.
So if a command returns more than 4 elements, you can simply switch to RPL or 8 level stack to get the full results.
In the background it's RPL commands doing the job, so you can work with large matrices, lists, etc.

Wouldn't that slow it down considerably? I'd like to see an eight level stack machine that works just like a 4-level machine other than the number of levels. Back in the '70s, just before introducing the Altair 8800, MITS had a 7-level stack desktop calculator that you could add an external octal programmer to. I was about to buy one when the Altair came out and my plans changed. With 8 levels, you should be able program almost any practical engineering equation without using intermediate storage registers.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [newRPL] interested in RPN mode? - toml_12953 - 10-21-2019 08:12 PM



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