Post Reply 
4K HP 67 Games rom attached for testing
10-31-2016, 05:51 PM
Post: #39
RE: 4K HP 67 Games rom attached for testing
A few findings for the '67 version: Flag 1 marks an implied multiplication. If an open parenthesis isn't preceded with an operator, a multiplication is assumed. So "5(3+7)" or "(1+2)(3^5)" will both work.

Flag 2 is to prevent a operand stack drop after negation (i.e. a unary operator only takes one operand, not two, so the operand stack doesn't get smaller). The LBL 0 before the SF 2 (original line 204) was if other unary operators needed that but was never used - no room for square root, inversion, etc.

The arcsine and square roots are to throw errors if a stack tries to shrink below having no entries. Crude but they work.

When this was written, there was a sometimes heated exchange going about the relative merits of RPN versus inferior (oops, excuse me) alternative entry systems. In coding the textbook algorithm, I decided to add implicit multiplication, automatic parenthesis closure and such to make the resulting system as efficient as possible. That RPN was still significantly more efficient still was not surprising. I'm still so used to it that alternatives are painful for me to use (though Mathematica is pretty nifty!).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-67 AOS program to debug - Gene - 10-30-2016, 02:11 AM
RE: 4K HP 67 Games rom attached for testing - Jim Horn - 10-31-2016 05:51 PM



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