The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

HP41 Translator Pac for the 71
Message #1 Posted by GE on 4 Oct 2006, 4:11 a.m.

Hello, in the 41 pac for the 71 I see the EDTEXT text editor, but there also exist a standalone text editor module. Are these the same ?
Another question, there is a very HP41-specific floating point stack in this version of FORTH, which mimics the 4-level RPN stack. Is there such a floating point stack in the Forth/Assembler version ?
Have you done interesting things with either version of FORTH ?
Thanks, I'll read some Forth language reference now, very exciting ! The 40-bit integer capability is interesting for number theory applications.

      
Re: HP41 Translator Pac for the 71
Message #2 Posted by Eric Smith on 4 Oct 2006, 12:58 p.m.,
in response to message #1 by GE

It's been a long time, but I vaguely recall that you can copy the editor lex file from either the Forth/Assembler or 41 Translator pac into RAM and use it without the ROM module present. Assuming, of course, that you have the spare RAM.

            
Re: HP41 Translator Pac for the 71
Message #3 Posted by GE on 5 Oct 2006, 3:56 a.m.,
in response to message #2 by Eric Smith

Yes, the EDTEXT program is only about 6K, but as it comes included in the Translator Pac, I'll leave it in ROM.
I'll check the file sizes of the versions of EDTEXT in the Translator and in the Text Editor Pac, them may be identical.
I have started typing stuff and got my first crashes... *Hard* crashes !! There is no such thing as a safety belt in Forth it seems, "bare to the metal" - and "the pedal to the metal" too.
A strange language, I can understand why it never caught up with RPN fans.

                  
Re: HP41 Translator Pac for the 71
Message #4 Posted by Garth Wilson on 6 Oct 2006, 5:00 p.m.,
in response to message #3 by GE

Quote:
Is there such a floating point stack in the Forth/Assembler version ?
Yes.
Quote:
I have started typing stuff and got my first crashes... *Hard* crashes !!
As you gain experience, you'll get to where you seldom crash it. But to recover more quickly, write yourself a BASIC program that re-loads your files from mass storage and re-configures everything the way you like it. When you get a crash just load and run that one program which does everything else for you.
Quote:
A strange language, I can understand why it never caught up with RPN fans.
I was skeptical at first; and even after initially learning it, I still had a lot of things in mind that I thought it would be clumsy at or unable to do. But as I gained more experience, I found it was not only able to do things that didn't initially meet the eye, but offered very elegant solutions, much more so than any other language I had tried.

Unfortunately, although the HP-71's BASIC is fantastic (due in part to LEX file contributions from the users' groups), its Forth implementation is really poor. It is Forth though, which means you can get under the hood and modify and extend it. I wrote a lot of my own improvements and extensions without even resorting to assembly. I was able to speed up a lot of Forth words just by redefining them in Forth. The results ranged from 4 to 13 times as fast.

Quote:
Have you done interesting things with either version of FORTH ?
For the HP-71, I wrote graphics programs to do things like simultaneously display two tiny lines of text on its LCD, and I wrote a cross-assembler for another processor. I haven't done anything in Forth on the HP-71 in many years, but I use Forth on another computer on the workbench a lot in my work. Nothing else can compare for quickly developing bug-free code for a lot of applications.

E-mail: wilsonmineszdslextremezcom (replace the z's with @ and . )

Edited: 6 Oct 2006, 6:24 p.m.

                        
Re: HP41 Translator Pac for the 71
Message #5 Posted by GE on 10 Oct 2006, 4:59 a.m.,
in response to message #4 by Garth Wilson

Thank you for your comments.
Can you elaborate a little on the Floating Point stack ? I don't have the documentation. Is it X, Y, Z, T + L or an 'infinite' depth ?
Sure I should use some mass storage medium, but have none past a 32K RAM module, whose contents I believe will be wiped by 'bad' crashes, so I could remove the module and plus a card reader but that is less handy.
I'm convinced great things can be done with Forth. My next attempts will be factoring 'big' (less than 40 bits) integers, should run very fast.

                              
Re: HP41 Translator Pac for the 71
Message #6 Posted by Garth Wilson on 10 Oct 2006, 1:38 p.m.,
in response to message #5 by GE

Quote:
Is it X, Y, Z, T + L
Yes, not unlimited depth. FP numbers are stored the same as they are in BASIC, with 64 bits each. L is at address 2FBC0, X at 2FBD0, Y at 2FBE0, Z at 2FBF0, and T at 2FC00. Just using the name puts the address on the data stack, like normal Forth variables. There's a set of FP words including a few for FP stack manipulation, like RDN, RUP, X<>Y, and RCL.

Quote:
I'm convinced great things can be done with Forth. My next attempts will be factoring 'big' (less than 40 bits) integers, should run very fast.
In general, this is true of Forth; but remember that the HP-71's processor with its 64-bit registers was optimized for the big floating-point numbers, and going down to the shorter integers won't yield as much speed increase as you might expect. In BASIC, the HP-71 with the math module in 1983 could do a floating-point 1024-point complex FFT twice as fast as the IBM PC running GWBASIC, in spite of doing it with more digits than the PC, but the 71's speed at running an empty FOR-NEXT loop was not impressive. It's clear however that if someone wanted to make a new HP-71 Forth module and really optimize it, they could make it a much, much hotter performer than HP's Forth/Assembler module. Of course the user could get some of that advantage by re-writing a bunch of secondaries as primitives and maybe even re-writing some primitives himself too, but I myself didn't go to the extent of getting into the 71's assembly language.

wilsonmineszdslextremez (replace the z's with @ and .com )

Edited: 10 Oct 2006, 1:43 p.m.

                                    
Re: HP41 Translator Pac for the 71
Message #7 Posted by GE on 11 Oct 2006, 7:00 a.m.,
in response to message #6 by Garth Wilson

Thank you, that's enough information to use the FP "stack".
Is there any advantage in using the Forth/Assembler or the Translator Pac ?
As for speed, I will use only 20 bit multiplication and 40/20 bit division, that should be quite fast (not a native instruction, but must be good HP assembly code). I expect almost no performance hit from being in Forth instead of Assembler, is that realistic ?


[ Return to Index | Top of Index ]

Go back to the main exhibit hall