I've been playing with the 71B a lot lately. It's a neat machine that was beyond my budget "back in the day." Although I had seen the 71B on the local calculator dealer's shelf, I had been scared off by the price. By the time I got my first-ever loan to purchase an Apple //e, the 71B wasn't on my list of alternatives. Truth be told, I had no alternatives on that list; all my friends were using Apple ][s.
Fast forward to the 21st century. I set out to write a non-trivial program in BASIC on the 71, and ended up with YATZ71, a Yahtzee clone using the primitive graphics and sound capabilities of the machine. (By "non-trivial" I don't mean "important," as a silly little game certainly isn't, but rather one that I can't write with only fifteen seconds thought.)
After I finished YATZ71, an idea struck me. After I had reflexively punched it back, I considered it: why not write non-trivial programs in as many different languages and on as many different (programmable) platforms as you have in your collection? Now, most people, if they asked themselves a question like that at all, would omit the "not" after the "why." But not me. I enjoy programming. My current work as a systems architect doesn't demand that I do much of it though. So here was a way to keep my oar in programming, as it were, and continue to play with the old toys I love so well. Perfect!
Well, maybe not. The next two languages on the HP-71B are FORTH and Assembler. I haven't coded in either for years and years, so getting this done is going to be a challenge. Of the two, Assembly has the most appeal at the moment, for a variety of reasons.
First, I want to use the 71B as a LIF disk duplication platform. Trouble is, the 71B won't copy files whose types are unknown to it. There's a LEX file called EXTFILES that the author quoted in Joe Horn's LEX list claims "makes just about every file type known to the handheld community recognizable to the HP-71". Unfortunately, that doesn't include anything as exotic as the types used by HP Pascal on the 9816. This may be due to that type being defined after the LEX was written, or perhaps the 9816 wasn't "known to the handheld community." Either way, I'm not going to be able to use the 71B to copy HP Pascal files without providing something like EXTFILES for the particular file types in question. In fact, what I'd like to do is add to the EXTFILES lex. There isn't any source I can find, but the assembled routine is only 502 bytes. It should be easy to disassemble given the right tools.
Second, The 71B was the first machine to feature the Saturn processor. HP kept shipping high-end calculators with this processor through the HP-49, released in 1999. Learning Saturn assembly language, in an archaic form, will give me a leg up in understanding how that CPU's architecture evolved over time. I've decided that is another major reason why I want to own and study the old machines: to trace the devlopment of their architectures down to the present day.
But back to the tools. The tool used to do assember development by many users of the HP-71B (but not HP, it seems) was the FORTH/Assembler module, which is a rarity these days. (One went for $280.00 the other day on eBay, attached to a non-working 71.) It's true, I could use JF Garnier's emu71 and an image of the FORTH/assembler module to build code, which I could then download to a real 71B to run. But I did a search for HP-71B assemblers and came up with areuh which was the assembler used to build the great French JPC ROM. Areuh was originally written for HP-UX on an Integral PC before being ported to DOS. I downloaded it and ran "make" on my 64-bit RHEL4 Linux system. The darned thing compiled without a single warning or error! (Whether code generation works on the 64-bit platform remains to be seen.) The README file is in anglais, but the man pages and main doc file are in French.
Google to the rescue! Honestly, automatic natural language translation has gotten much, much better in recent years. Using my knowledge of Spanish, I can usually puzzle out the meaning of French texts, given a few key vocabulary words. Add the fact that Google will often get really close to the actual literal translation, and I'm usually able to close the gap. et, voila! the result!
French speakers (or anyone else for that matter) are welcome to roll on the floor laughing at my translation. But if you are inclined to do that, please let me know about it so I can fix whatever strikes you as funny. However, there are two caveats about that.
- I may have intended something to be funny
- The translation is not literal. I tried to convey the meaning of the original, sometimes by altering the original content.
To be continued ..