I seem to have trouble finding a good source of reference for writing LEX files. I understand that they will greatly speed calculations - possibly reducing the run time to 1/5 of the time required for a BASIC program that does the same thing. I also understand that the difficulty in writing a correct LEX file is many times that for a BASIC program. Does anyone know of good resources and examples of how these Language Extension Files are written?
HP 71 - LEX files
|
|
« Next Oldest | Next Newest »
|
▼
05-04-2005, 10:30 PM
▼
05-05-2005, 01:29 AM
They are written in Saturn assembly language. There are lots of online references for that, but you will also need documentation on the data structures and entry points of the HP-71. That information is in the HP-71B Software Internal Design Specifications (IDS), which came in three volumes. Volume I is general documentation, and Volume II describes each entry point in detail. Volume III is the complete source code of the HP-71B system ROMs, from which Volume II is extracted. Once upon a time HP sold these for $50 each for VI and VII, and $200 for VIII. Now the best way to get them is to buy the MoHPC DVD or CD-ROM set, which contains the scans I did a few years ago. Volumes II and III were released in versions for the 1BBBB and 2CCCC ROMs, but I've never seen the latter, so the scans are of the 1BBBB version. If anyone does have the 2CCCC docs, please let me know. There was a final 2CDCC ROM revision to fix bugs, but they didn't reissue the IDS. In addition to the HP-71B Software IDS, they published the HP-71B Hardware IDS, and the HP-71B HP-IL IDS, and they made an HP-71B FORTH/Assembler ROM IDS available through PPC. The HP-71B was the most thoroughly documented "calculator" HP ever produced. ▼
05-05-2005, 08:59 AM
Thanks Eric and Valentin, I have a lot of this information but was hoping for simple. I have IDS I, II, and III. I also have HP-IL I and II. I will have to dig these out regarding version but they are probably the same. If not then I will let you know. I do not have the FORTH/Assembler ROM IDS nor the FORTH/Assembler ROM, although I have tried to get one a number of times.
05-05-2005, 04:59 AM
Hi, Forrest: Eric Smith's reply points you to the right documentation you need, though I suggest that you also get a copy of "HP-71 BASIC Made Easy" by Joe Horn, which includes a number of LEX files and a program to enter them into RAM without requiring anything but a bare bones 71B as well as a number of commented system RAM locations that are good to practice creating LEX keywords to manipulate them (very easy), as well as "Get up and running in BASIC and Machine Code" by Harvery, which includes a description of LEX files as well as a number of system entry points and RAM locations. You might also find it profitable to have a look at a simple LEX file I wrote and submitted to the MoHP's Library, namely Packing Long Integers for the HP 71B (Assembler) Fully commented source code, examples, and timings are included, so apart from its intrinsic value, it will probably be useful to you as a non-trivial example of just what LEX files look like and how to structure them. You can even use it as an skeleton to write your very first LEX keywords. Best of lucks and best regards from V. ▼
05-05-2005, 09:05 AM
Valentin, I have the Horn book, and I have "The Basic HP-71" by Harvey which has a great deal of information. Do you know how much different "Get Up and Running in BASIC and Machine Code" is from the one I have? I will definitely look at your LEX file because good examples with comments seem to be probably the best way to learn. Thanks Forrest ▼
05-05-2005, 09:48 AM
Hi again, Forrest: I think that your Harvey book and mine are one and the same, probably titled "The Basic HP-71 - Get Up and Running in BASIC and Machine Code" or something like that, I don't have said book at hand right now. Anyway, if you're planning to delve into assembler programming to create LEX (and BIN) files for the HP-71B, I strongly advise you to refrain from making any development at all on the physical HP-71B proper, and use instead this awesome free emulator by Jean-Fraçois Garnier: Emu71
There's a number of important reasons why you'd do well to act thus, among them:
And it's free. Trust me and absolutely avoid like the plague any sort of assembler development on your physical HP-71B. Use Emu71 instead, create your LEX files at leisure, port them to your physical 71B when they're all polished and shiny, and you'll never, ever look back. Best regards from V. |