The Museum of HP Calculators

HP Forum Archive 02

[ Return to Index | Top of Index ]

HP-42S Lewis Processor Instruction Set
Message #1 Posted by José Manuel Pérez on 14 Feb 2000, 2:34 p.m.

Hi! I was playing around with the HP-42S built-in memory scanner trying to find out its ROM structure. I've found very usefull a 10 years old post by Jay B. Harlow but I've a couple of questions, maybe some of you can help me:

1) At the functions table (beggining at 1DB61) the whole set of functions of the calc is listed. Each 'register' has a 1 nibble field with the length of the name of the function, followed by the name itself (1 byte per character) and a 5 nibbles field witch should be an address... has anyone got more info about this point? It looks like an index or a relative address, right?

2) The Instruction Set seems to be radical different from the 28 and 48 series one. Does it exist any list with the processor instructions (like the Gariepy's one for the 28/48)?


Re: HP-42S Lewis Processor Instruction Set
Message #2 Posted by Reinhard Hawel on 14 Feb 2000, 6:21 p.m.,
in response to message #1 by José Manuel Pérez

Would be nice, if you'd post this article here

1) A 5 nibble address is almost certainly an absolute address. Please note, the addresses lie in the memory in the reverse direction.

If your address is "ABCDE" after loading, the register will contain "EDCBA"

That's the method, I would jump to such a pointer (if I were HP):

LC(5) Pointradr Load address of pointer

CD1EX swap into Data pointer 1

C=DAT1 A Load pointer

RSTK=C onto Return Stack

RETURN Jump there

(The CGI script for the forum filters my formatting spaces out, so this might get unreadable afterwards - grrrr) In the "newer" CPUs (after the 71B's CPU) there was a PC=C or PC=A command, so the last two commands could be substituted with:

PC=C Jump there

2) I guess you've found the "official" HP mnemonics. Gariepy's nemonics are not the official Mnemonics and the HP Guys didn't correspond about them in the past, because they didn't "understand" them. They were simply used to their own mnemonics. (And so am I)

If there are commands like A=A+A C or LCHEX ... or like the ones I used above then these are definitely the official mnemonics.

Re: HP-42S Lewis Processor Instruction Set
Message #3 Posted by José Manuel Pérez on 15 Feb 2000, 1:54 a.m.,
in response to message #2 by Reinhard Hawel

My fault, the point is that I don't have a mnemonics list, I'm looking for one. I don't care if they're official or not as long as they are readable, for me "236B9308DCE..." means nothing if I cannot translate it to move.a a,c; add.a 6,d1 ;... or whatever.

I've found out that most of Jay B. Harlow's post is at Craig A. Finseth HPDATABase. There's also a post by Joe K. Horn explaining that the address field represents a library ID and a function ID (just as in the HP-41C, like 48's XLIBs?). But I don't know where to find the actual code of the functions.

By the way, I was wrong and the address field is the first one, so the "function's table" begins at 1DB5C.

[ Return to Index | Top of Index ]

Go back to the main exhibit hall