Post Reply 
4K HP 67 Games rom attached for testing
11-03-2016, 07:23 PM (This post was last modified: 11-03-2016 07:51 PM by RobertM.)
Post: #88
RE: 4K HP 67 Games rom attached for testing
Hi Guys. Sorry for my absence.

About the LBL 00 behavior in Spacewar:

The routine is supposed to calculate the number of Alglogs that are in the quadrant specified in X. I changed the way it worked (from the 67 version) to save bytes and registers, but it the end result is the same, and the reason for the CLX is the same.

In my version, you will notice the two branch instructions back to back (X=Y? followed by ISG). Thus if X does not equal Y (Alglog is not in this quadrant) then the CLX will happen. The reason for the CLX is to disable stack lift, so the next RCL (or number entry E1) doesn't lift the stack, thus the "target quadrant" stays in Y. If X does equal Y, the CLX doesn't happen, but both X and Y are the same "target quadrant" so the next RCL does a stack lift, but it doesn't matter ... target quadrant is still in Y for the next compare.

The original 67 routine used the CLX for the same reason (disable stack lift), but it used it for both cases (X!=Y, clears the bad Alglog quadrant, or X==Y clears the 10 left over from LBL 1).

Pretty sure this works correctly, but I could be wrong.

Hope that clears up the confusion. (Clear as mud, right?).

Also ... there was an earlier comment by Dieter that the secondary registers aren't used, but they are (indirectly) for short range scan results. Might be able to change the logic to display as generated and thus not need those registers, but that's not the way the 67 version works so I left it alone.
Visit this user's website 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 - RobertM - 11-03-2016 07:23 PM



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