(71B) Basic RPN Program
|
08-30-2016, 03:46 AM
Post: #1
|
|||
|
|||
(71B) Basic RPN Program
The program RPNBASIC puts the HP 71B into RPN mode with arithmetic functions, power, square root, and π. The program contains room for one independent memory and a four level stack that works like the classic Hewlett Packard RPN calculators.
I have the array S set up for six slots: Slot 1: X stack (display) Slot 2: Y stack Slot 3: Z stack Slot 4: T stack Slot 5: Independent memory stack Slot 6: (temporary memory) For an idea of how RPN works, check out this tutorial: http://edspi31415.blogspot.com/2011/09/rpn-basics.html As a note, this program requires you to press the equals key [ = ] before you enter a number to the stack. Example: 2 + 3 + 9 = 14 Keys: [ = ], 2, [END LINE] [ = ], 3, [END LINE], [ + ], [ = ], 9, [END LINE], [ + ] The keys available during RPNBASIC: [ = ] Input [ + ] Add: Y + X [ - ] Subtract: Y - X [ * ] Multiplication: Y * X [ / ] Divide: Y/X [ g ] [ / ] (^) Exponent: Y^X [ Q ] Square Root √X [ P ] Enter π to the stack [ M ] Store X in independent memory [ R ] Recall memory [ C ] Clear X stack to 0 Stack operations: [ S ] Swap with X and Y [ D ] Roll stack down, result { Y, T, Z, X } Exit the program: press [ E ] HP 71B Program: RPNBASIC (828 bytes) Code: 5 ! SIMPLE RPN, EWS 8/29/2016 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)