Post Reply 
Raw files for these HP 67 program listings ?
09-07-2016, 04:11 AM
Post: #43
RE: Raw files for these HP 67 program listings ?
(09-06-2016 10:59 PM)Dieter Wrote:  I did some similar changes and added some others (e.g. removing register A...E completely since the are only called once). But you seem to have analyzed the code more thoroughly so that even a bugfix was applied.

Maybe we can make an optimized version from the two individual ones. ;-)
Great idea! See below...

Quote:- The init routine at LBL e sets the constants 0.11, 111 and 123. On the other hand at LBL 9 where these constants are used the comment says 0.111 and 0.123. ?!?
Bad comments. Typos with extra heavy on the '.' key. Smile

Quote:BTW the "1000" in R10 is never recalled, so it can be removed completely.
Had that in the back of my mind, but forgot to do anything about it. Good idea.

Quote:- The CF 3 at LBL D resets flag 3 simply because it has been set automatically when the user entered the payment (flag 3 on the 67 does the same as flag 22 on the 41, it's the data entry flag).
Thanks, I'd forgotten that. Which means that the CF 03 can be removed, because on the 41, it doesn't get set with data entry (and it isn't being tested, so don't need to change it to a flag 22 test).

Quote:- Clearing all flags on startup at LBL"OB" is fine, but not required since the init routine at LBL e already does this: it calls LBL b which clears all flags.
Nice catch. Didn't notice.

So I've incorporated an "optimized" version of your comments/changes and mine. I moved the "constants" what were only being used once from register to direct in the program. I changed the constant 100 to use R05 instead of R10, and I moved R09 into R03, so now SIZE 009 is all that is required. Also, incorporated all of your other suggestions and things I noticed from your code (*4 instead of /.25, etc.). I think I captured everything.

Enclosed in this OB.zip is the optimized version (.RAW, .txt, and _commented.txt).

This version requires only 9 registers, and is down to 260 bytes, but still "feels" the same. Thanks for all the help. Let me know if you see something else.


Attached File(s)
.zip  OB.zip (Size: 3.54 KB / Downloads: 5)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Raw files for these HP 67 program listings ? - RobertM - 09-07-2016 04:11 AM



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