RPN vs AOS: a new look into the past?
|
01-03-2016, 12:08 PM
Post: #1
|
|||
|
|||
RPN vs AOS: a new look into the past?
New year first weekend, time to reorganize some downloaded documents on calculators.
I found this Texas datasheet where there is a comparison between RPN to AOS systems, downloaded from DATAMATH. Now, have a look to some of the Texas reasons to have chosen Algebraic instead of RPN: "You don't have to rearrange the equation, or remember what's in the stack as with RPN" "AOS remembers both numbers and operators, so you key-in your equation left-to-right. RPN only remembers numbers, you have to remember operations and the order" "A calculator with full AOS remembers both the numbers and functions in its register stack. And performs them according to algebraic hierarchy." And the best pearl to be used as an elevator pitch should be: "TI's unique Algebraic Operating System makes the calculator part of the solution. Not part of the problem" Jose Mesquita RadioMuseum.org member |
|||
01-03-2016, 12:23 PM
Post: #2
|
|||
|
|||
RE: RPN vs AOS: a new look into the past?
New Year, old threads... and how about an HP-41C program that RUNS AOS code?
"To live or die by your own sword one must first learn to wield it aptly." |
|||
01-03-2016, 03:28 PM
Post: #3
|
|||
|
|||
RE: RPN vs AOS: a new look into the past?
(01-03-2016 12:23 PM)Ángel Martin Wrote: New Year, old threads... and how about an HP-41C program that RUNS AOS code? You had to bring that up again: HP-41 AOS Emulator ROM |
|||
01-03-2016, 06:20 PM
Post: #4
|
|||
|
|||
RE: RPN vs AOS: a new look into the past?
(01-03-2016 03:28 PM)Dave Frederickson Wrote:(01-03-2016 12:23 PM)Ángel Martin Wrote: New Year, old threads... and how about an HP-41C program that RUNS AOS code? A fresh, new challenge for Ángel's MCODE abilities! The last, missing ROM! David Brunell Houston, Texas |
|||
01-03-2016, 06:48 PM
Post: #5
|
|||
|
|||
RE: RPN vs AOS: a new look into the past?
(01-03-2016 12:23 PM)Ángel Martin Wrote: how about an HP-41C program that RUNS AOS code? You can implement the shunting-yard algorithm manually using a programmable HP-calculator. We can use the ordinary stack for the data and the program to register the operations. To simulate the operation-stack we must make sure that new entries are added at the top. Let's have a look at two examples to see how this works. Example: 1+2*3 We start with a clear program memory (or just an END in case of the HP-41C). Then we enter 1. To enter + we switch to program-mode, enter the operation, switch back and use RTN to make sure, that we're at the begin. Next step is to enter 2. We switch back to program-mode, enter * at the begin and switch back. Always make sure to return to begin of the program after you left program-mode. Last thing is to enter 3. We end up with this stack: 1 2 3 and this program: Code: * Now you can run the program to get: 7 To illustrate the use of parentheses let's have a look at the next example: 3*(4+5) When we encounter a left parenthesis ( we add a RTN instruction. However for the a right parenthesis ) we run the program. Then we remove the steps until the first RTN. Thus we end up with this stack: 3 4 5 and this program: Code: + When we run the program and remove the executed steps we end up with this stack: 3 9 and this program: Code: * If we run the program we end up with: 27 It get's a little more complicated when dealing with operator-precedence and calling functions. I recommend to read the details in the wikipedia article. The last example is taken from the mentioned TI-brochure: (5/(7-2/9)+4)*3+1 There's nothing new until the first closing parentheses. We end up with this stack: 5 7 2 9 and this program: Code: / We can now run the program and remove the steps to the first RTN statement. This is the stack: 5 7-2/9 And this is the program: Code: / Now since the precedence of the next operator + is lower than that of / we run the program before adding + to the program. Thus we get this stack: 5/(7-2/9) and this program: Code: + The next step is to enter 4 to the stack and run the program when we encounter ). This is what we have now on the stack: 5/(7-2/9)+4 The program register is empty. We add * and 3 and run the program since the precedence of + is lower than that of *. As a last step we add +, enter 1 and run the program to get: (5/(7-2/9)+4)*3+1 You may have noticed that I've rearranged the expression a little. Otherwise we would have run into a stack-overflow. Cheers Thomas |
|||
01-03-2016, 07:08 PM
Post: #6
|
|||
|
|||
RE: RPN vs AOS: a new look into the past?
(01-03-2016 06:20 PM)quantalume Wrote:(01-03-2016 03:28 PM)Dave Frederickson Wrote: You had to bring that up again: HP-41 AOS Emulator ROM Suer, I'll get to that as soon as I finish the CP/M emulation Module... a matter of days... not! "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)