Post Reply 
Raw files for these HP 67 program listings ?
09-05-2016, 07:33 PM
Post: #33
RE: Raw files for these HP 67 program listings ?
(09-05-2016 04:26 PM)RobertM Wrote:  I'm going to take a swing at the One Armed Bandit next. It's a holiday today, so I may not get to it until tomorrow. Smile

I have been looking at the same program. It has some specialties that should (or even have to) be handled differently on the 41. For instance there is a GTO(i) command, while the I-register holds a –2 (set in the startup routine). This uses the "fast reverse branching" feature of the 67/97 which cannot be duplicated on the 41. On the other hand it does not have to – the GTO(i) jumps to the instruction directly after LBL 2, so a simple GTO 02 works just as well. The whole thing (test and jump back) is not even required at all since it simply tests if the last random number is zero. This could be avoided by directly generating a number between 1 and 9 instead of one between 0 and 9. #-)

The initialization routine (LBL e) clears all (!) data registers. On a 41 this is not a good idea. As far as I can see clearing only R00 and R02 is sufficient. The registers from A to E hold some constants that are used later. Instead of R20...R24 the HP41 version should use R10...R14.

Maybe we can compare our versions later. ;-)

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 ? - Dieter - 09-05-2016 07:33 PM

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