HP Forums
71B FORTH/Assembler and the 41 Translator - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: 71B FORTH/Assembler and the 41 Translator (/thread-6954.html)



71B FORTH/Assembler and the 41 Translator - Dave Frederickson - 10-01-2016 04:02 PM

I discovered, recently, a flaw in my understanding of bank switching with FRAM71/B. The result is that I configured the FORTH/Assembler soft-configured ROM with the 41 Translator hard-configured ROM. The funny thing is, the FORTH/Assembler appears to work.

Emu71 can be configured like this so a FRAM71 isn't needed for verification.

Can anyone confirm that this works? It would make bank switching the two ROM's much simpler.

Dave


RE: 71B FORTH/Assembler and the 41 Translator - rprosperi - 10-01-2016 08:24 PM

(10-01-2016 04:02 PM)Dave Frederickson Wrote:  I discovered, recently, a flaw in my understanding of bank switching with FRAM71/B. The result is that I configured the FORTH/Assembler soft-configured ROM with the 41 Translator hard-configured ROM. The funny thing is, the FORTH/Assembler appears to work.

Emu71 can be configured like this so a FRAM71 isn't needed for verification.

Can anyone confirm that this works? It would make bank switching the two ROM's much simpler.

Dave

Using the F41-HC ROM with FTH-SC ROM probably will let you start FORTH, and maybe do simple command line calcs, but once you start doing more serious stuff, it will crash as the internal (headerless) commands are *not* the same between the 2 ROMs. Also, the internal buffers are different and all the internal addresses are shifted. HP had to change quite a number of the original Forth/Assem internal commands to get the F41 Translator to work; this is written-up somewhere... probably an issue of PPC-CJ or CHHU, Datafile, etc.

Try defining any non-trivial program and then run it and you will probably find MEM LOST pretty quickly.


RE: 71B FORTH/Assembler and the 41 Translator - Dave Frederickson - 10-01-2016 08:40 PM

(10-01-2016 08:24 PM)rprosperi Wrote:  Using the F41-HC ROM with FTH-SC ROM probably will let you start FORTH, and maybe do simple command line calcs, but once you start doing more serious stuff, it will crash as the internal (headerless) commands are *not* the same between the 2 ROMs. Also, the internal buffers are different and all the internal addresses are shifted. HP had to change quite a number of the original Forth/Assem internal commands to get the F41 Translator to work; this is written-up somewhere... probably an issue of PPC-CJ or CHHU, Datafile, etc.

Try defining any non-trivial program and then run it and you will probably find MEM LOST pretty quickly.

Yeah, I didn't think so. Well, there's always Plan "B".


RE: 71B FORTH/Assembler and the 41 Translator - Sylvain Cote - 10-02-2016 12:24 AM

(10-01-2016 04:02 PM)Dave Frederickson Wrote:  Can anyone confirm that this works? It would make bank switching the two ROM's much simpler.

Hello Dave,

As Robert pointed it out, it will not work.

Same language but different word dictionary, RAM organization, etc.

Here is an extract from Bill Wickes module introduction in CHHU Chronicle V2N1P11 January/February 1985

RELATION TO THE FORTH/ASSEMBLER ROM

The Translator Pac FORTH system is very similar to that contained in the HP 82441A Forth/Assembler ROM. At first approximation, the Translator Pao just is the FORTH/Assembler ROM, with the HP41 vocabulary substituted for the Assembler (the KEYBOARD IS lex file Is also not present in the Translator Pac). This has the drawback noted previously that both modules can not be plugged into the HP-71 simultaneously. But further, the two FORTH systems cannot share the same RAM files. This is due to the differing organizations of the system portions of the RAM files, and to the fact that the ROM-based FORTH dictionaries are different, so that the compilation addresses of the ROM words are not the same for the two systems. The FORTH/Assembler ROM's RAM file is named FORTHRAM; the Translator Pac's is named FTH41RAM. The different names should help programmers keep the two types of files sorted out.

Here is a brief summary of the primary differences between the two FORTH systems:
  • The Translator Pac does not contain the Assembler, the associated words ASSEMBLE, RAGESIZE, LISTING, and (ARID, and the Assembler user variables.
  • With the exception of the Assembler words, the Translator Pac ROM dictionary is 6 superset of that of the FORTH/Assembler ROM. The Translator dictionary is organized into two vocabularies: FORTH and HP41V. The former is the parent vocabulary of the latter, so that FORTH words are available when the context vocabulary is HP41CV, but not vice-versa.
  • The Translator Pac FORTH vocabulary is augmented by numerous HP-41 floating-point words that are not included in the FORTH/Assembler ROM.
  • Translator Pac floating-point words follow the HP-41 convention that errors leave the floating-point stack intact. The FORTH/Assembler words drop the stack, update LASTX, etc., before
    error-checking.
  • The Translator Pac HP41CV vocabulary contains HP-41 words that depend on HP-41 data structures or use post-fix notation.
  • The user variable area in the FTH41RAM file contains the HP-41 flags, program pointer, return stack, alpha register, size and sigma register variables, and other HP4I system variables.
  • The FTH41RAM user dictionary begins with the FORTH word, but also contains the HP41CV vocabulary word, and a null word used to link the various RAM and ROM dictionaries together.
  • The outer interpreter loop in the Translator Pac checks an emulator-active flag following interpretation of the input buffer. If the flag is clear, the OK n message is displayed. If set, a vectored HP-41 display word is executed (typically, to display the X-register).
  • HP-41 error messages (Alpha Data, Data Error, etc.) are added to the system error table in the Translator Pac.
  • The [ATTN] key and poll check carried out during execution of semicolon and branching has been rewritten for the Translator Pac, resulting in somewhat faster FORTH execution.

Sylvain

edit: typo


RE: 71B FORTH/Assembler and the 41 Translator - Dave Frederickson - 10-02-2016 12:33 AM

Hi Sylvain,

I got it, not compatible. So bank switching HC ROM's is still a mystery.

Dave