Raw files for these HP 67 program listings ?
|
09-06-2016, 10:35 PM
(This post was last modified: 09-06-2016 11:05 PM by RobertM.)
Post: #40
|
|||
|
|||
RE: Raw files for these HP 67 program listings ?
(09-05-2016 07:33 PM)Dieter Wrote: 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. #-)I agree with all of your comments here. I removed the use of the I reg, and changed the random number generator to generate between 1 and 9. Quote: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.Agreed. I also found only clearing 00 and 02 were needed, and I left it in the init routine (LBL e) instead of the "preamble". I changed RegA-E into R10-14. Technically, we could shave off a couple more registers, since R03 and R05 aren't used, but I left it as is, so only SIZE 015 is required. Quote:Maybe we can compare our versions later. ;-)Love to! I've included my fully commented version in the zip. Love to see what you did the same/differently. Here are my two versions of One-armed bandit: "OB67" requires SIZE 026 and a card reader. "OB" requires SIZE 015 and no card reader. Both seem to give a similar feel to the 67 version. Here is a list of my changes for the "OB" version: Code:
For Gene: Note that there appears to be a bug in the original HP67 listing (your listing as well as the one in PPCJ V4N9P13). It is a missing "multiply" around line 68 ... the program recalls a constant 100 but fails to mulitply it by the digit, so rather than multiply the new digit by 100, you just get the number 100. Kindof annoying - you press B and C to HOLD them hoping to regenerate the first digit, but you always get a "1" as the new digit. I have fixed this is both the OB67 and OB versions. Both of these versions take 285 bytes |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 12 Guest(s)