Post Reply 
4K HP 67 Games rom attached for testing
10-30-2016, 11:33 PM
Post: #34
RE: 4K HP 67 Games rom attached for testing
Wow, Gene, you were able to translate the code from the original Neanterthal...

The '67/97 AOS program was an early attempt to squeeze a flowcharted algorithm for algebraic entry parsing from a Fortran class I took in the spring of 1972, just to see if I could do it. The same issue includes an article describing it. And a later one should have a correction as the textbook I got the flowchart from was in error which I dutifully embodied in the code. Sigh - some things don't change.

The program was terribly useless as it was really, terribly slow. Of course, a '41CL would be lightning fast, eliminating that problem. As mentioned by others, the '67/97 flag functions differed compared to the '41 so that needs to be dealt with.

Some of the oddities (why EEX 1 instead of 10, etc.) were due to tricks in the '67's timing. They were done as they were faster, not more readable(!). Since the '67 had a fixed number of registers, I put the index registers at the (known) top worked a stack down from there. The '41's reconfigurable memory would allow a stack to work up with the SIZE value being the only limit.

As I recall, each function was encoded into a function stack as a two digit number. The INT(value/10) was the function value (each function had a distinct value to allow branching later); the units digit was a priority level - the higher the value, the higher priority which took precedence over the lower values. Thus addition would be held until multiplication was done, etc. If I recall, the book/flowchart/algorithm/'67 program bug was that once a higher priority operation could be done, it was popped from the stack and evaluation continued. Instead, it should have looked to see if the next item down the stack was due for evaluation and, if so, do so until either the stack was empty or priorities indicated otherwise. The later version corrected this.

Dedicating an entire register to hold an operator stack value is terribly inefficient but that's all I was able to squeeze into 224 steps. A '41 ROM that has more room for code could consider doing binary packing a whole lot more efficiency. But then again, who needs hundreds of levels of parentheses? Even the most enthusiastic AOS fan would pale at the prospect!

Ah, the days of spending hours and hours to save a millisecond or byte. It wasn't practical but was terrific mental exercise! Best wishes to all who wish to dig into such paleosoftware! Since my rather modified '67 went to a good home decades ago, I have nothing to run this on. Will have to check out the various simulations out there.
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-30-2016 11:33 PM

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