Post Reply 
Are HP 48 library structures documented?
03-06-2014, 03:50 PM
Post: #1
Are HP 48 library structures documented?
Are the library data structures and checksum or hashing algorithms documented anywhere or does everybody who write tools figure this out each time?

I'm going over a ton of doc and I have seen brief discussions of various bits and pieces but have not found any document that lays this all out from A to Z.

Thanks.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-06-2014, 04:02 PM
Post: #2
RE: Are HP 48 library structures documented?
Have you tried http://www.hpcalc.org ?

There should be several docs related to library structure.
The doc for RPL48 (which includes the original <-LIB->) , and the doc for JAZZ could be of help.

-- Ray
Find all posts by this user
Quote this message in a reply
03-06-2014, 04:16 PM
Post: #3
RE: Are HP 48 library structures documented?
(03-06-2014 04:02 PM)Raymond Del Tondo Wrote:  Have you tried http://www.hpcalc.org ?

Is that kind of like saying "have you tried google?"

Yes, I have tried it. I am even trying it now. I don't expect anybody to spend hours typing in a post that explains this. I am just trying to find doc. Since you guys have been around maybe somebody knows if such a document exists and how to find it.

The problem is there are a few million files on hpcalc and elsewhere and it's kind of hard to find what I'm looking for. And everything is a ZIP so I am downloading anything suspicious and then later I unzip and go over it. This takes time. I'm sure I will know more a year from now Wink

(03-06-2014 04:02 PM)Raymond Del Tondo Wrote:  There should be several docs related to library structure. The doc for RPL48 (which includes the original <-LIB->) , and the doc for JAZZ could be of help.

Ok, well, I did download one or more of Detlef's library utility zips but they're in the pile of things to be unzipped and reviewed. I have the Jazz doc also but didn't think to look there.

Has HP documented this? The first place I looked was in RPLMAN.DOC and then in MAKEROM.DOC. There are hints in there, but I have not seen the info I'm asking about.

Thank you.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-06-2014, 04:26 PM
Post: #4
RE: Are HP 48 library structures documented?
I'm halfway down my page of search results and this looks promising:

Library format info post from James H. Cloos on comp.sys.handhelds

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-06-2014, 05:43 PM
Post: #5
RE: Are HP 48 library structures documented?
(03-06-2014 04:26 PM)HP67 Wrote:  I'm halfway down my page of search results and this looks promising
It is:-)

-- Ray
Find all posts by this user
Quote this message in a reply
03-06-2014, 08:29 PM
Post: #6
RE: Are HP 48 library structures documented?
Get Joe Horn's Goodies disk #4 (in fact, get all 11 disks) from hpcalc.org, and look at the file usrlib.doc (which is actually a text file, not a word doc). This is the official doc from HP on this.

As Ray mentioned though, there are many enhanced tools/docs since this original, almost all of which are on hpcalc.org (thanks Eric!).

Two essential docs you will need, if you plan to touch SysRPL are Jim Donnelly's "Grey BooK" aka "Introduction to System RPL and Assembly Language" (48 series) and "Programming in System RPL" by Kalinowski (2nd Edition covers 48/49g/49g+/50g).

Not light reading, but they cover all you will need (and more...)

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-06-2014, 10:45 PM
Post: #7
RE: Are HP 48 library structures documented?
(03-06-2014 08:29 PM)rprosperi Wrote:  Get Joe Horn's Goodies disk #4 (in fact, get all 11 disks) from hpcalc.org, and look at the file usrlib.doc (which is actually a text file, not a word doc). This is the official doc from HP on this.

As Ray mentioned though, there are many enhanced tools/docs since this original, almost all of which are on hpcalc.org (thanks Eric!).

Two essential docs you will need, if you plan to touch SysRPL are Jim Donnelly's "Grey BooK" aka "Introduction to System RPL and Assembly Language" (48 series) and "Programming in System RPL" by Kalinowski (2nd Edition covers 48/49g/49g+/50g).

Not light reading, but they cover all you will need (and more...)

The CRC source code can be found in the gnu tools. Just view the source for the libcrc.c file

Useless trivia about libraries:

None of those documents mention much (if anything) about the format for library commands (in particular the internal ones found in the ROM). You need to also look at Mika Heiskanen's entries.srt file if you want to create commands that are also usable in algebraic expressions.

Despite what all the documents above might suggest (that libraries follow some sort of structure), this is not entirely true. Libraries are quite un-structured -- any apparent structure is due to the few requirements placed on the first few nibbles of a library object and commonly accepted schemes (e.g. how library commands are organized, name hashing, etc.). A library could contain virtually anything. This is why there will never be a library "breaker" that handles all possible ways one can disassemble a library into its components.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-07-2014, 09:33 AM (This post was last modified: 03-07-2014 09:41 AM by HP67.)
Post: #8
RE: Are HP 48 library structures documented?
(03-06-2014 08:29 PM)rprosperi Wrote:  Get Joe Horn's Goodies disk #4 (in fact, get all 11 disks) from hpcalc.org, and look at the file usrlib.doc (which is actually a text file, not a word doc). This is the official doc from HP on this.

Thanks. I did get all that stuff. Unzipping and organizing it all is just slow going right now. I believe I already looked at USERLIB.DOC but I don't remember it contained the low-level info I'm looking for. I'll look again.

(03-06-2014 08:29 PM)rprosperi Wrote:  As Ray mentioned though, there are many enhanced tools/docs since this original, almost all of which are on hpcalc.org (thanks Eric!).

I'm looking for doc at this point. I'm not looking for tools and certainly not to try to see what the tools are doing. If they come with doc then that could help. If not, I would rather figure out what's going on in the HP executables and libraries than figure out what's going on in 3rd party tools.

(03-06-2014 08:29 PM)rprosperi Wrote:  Two essential docs you will need, if you plan to touch SysRPL are Jim Donnelly's "Grey BooK" aka "Introduction to System RPL and Assembly Language" (48 series) and "Programming in System RPL" by Kalinowski (2nd Edition covers 48/49g/49g+/50g).

Thanks, I have those and it was from the Donnelly book that I started looking to see what tools were available. It appears there is no User RPL compiler and no USERLIB program in the Linux tools and the MAKEROM tool that makes libraries seems pretty complicated and not all that clearly documented. I realize part of this is just that it's all new to me, but stuff seems more complicated than it should be. When things are complicated that is a red flag to me that something is wrong.

(03-06-2014 08:29 PM)rprosperi Wrote:  Not light reading, but they cover all you will need (and more...)

Well, I hope so but I don't know.

My first thought since I do have some User RPL written was to make a library out of it. The usrlib tool only exists on DOS and Windows, AFAIK there is no Linux version. The Linux rplcomp also doesn't seem to handle User RPL.

It will take a while to unravel all this.

Thanks.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-07-2014, 09:40 AM
Post: #9
RE: Are HP 48 library structures documented?
(03-06-2014 10:45 PM)Han Wrote:  The CRC source code can be found in the gnu tools. Just view the source for the libcrc.c file

Thanks. I'm not a C guy but if I have to look at C I'll use Kermit's code rather than a derivative. Right now I plan to go based on the Kermit doc rather than looking at code.

(03-06-2014 10:45 PM)Han Wrote:  None of those documents mention much (if anything) about the format for library commands (in particular the internal ones found in the ROM). You need to also look at Mika Heiskanen's entries.srt file if you want to create commands that are also usable in algebraic expressions.

Thanks. I've downloaded almost everything in site/sight. This one's on the list.

(03-06-2014 10:45 PM)Han Wrote:  Despite what all the documents above might suggest (that libraries follow some sort of structure), this is not entirely true. Libraries are quite un-structured -- any apparent structure is due to the few requirements placed on the first few nibbles of a library object and commonly accepted schemes (e.g. how library commands are organized, name hashing, etc.). A library could contain virtually anything. This is why there will never be a library "breaker" that handles all possible ways one can disassemble a library into its components.

Thanks, this is good to know. But specifically, I don't have any interest in breaking apart libraries. I do want to be able to make my own without the complications that the Linux tools seem to require and possibly automate the process ala USERLIB which is not available in Linux.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-07-2014, 02:16 PM
Post: #10
RE: Are HP 48 library structures documented?
You may want to learn and use the Hack set of (what else?) hacking tools (I think its called "AS Hack") and also Jazz 6.8. Both found on hpcalc.org. These tools run on the 48 itself and make small edits/recompile/etc. quite easy once you have the major portions coded.

They also include simple to use tools for making and breaking libraries. For example you can create a folder with a number of individual routines, then with a single command, build/transform that into a library. While it's not intended for commercial scale library building, it works fine for hacking together stuff to learn 48 SysRPL and internals.

I strongly suggest you get some 48 RAM Cards. At least a 128KB is needed, but I also suggest a 1MB card (which acts like 8 ports of 128MB cards). They are not cheap, but readily available at TAS.

Enjoy!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-07-2014, 02:25 PM
Post: #11
RE: Are HP 48 library structures documented?
(03-07-2014 09:40 AM)HP67 Wrote:  But specifically, I don't have any interest in breaking apart libraries. I do want to be able to make my own without the complications that the Linux tools seem to require and possibly automate the process ala USERLIB which is not available in Linux.
If that's the main task, just run USRLIB under DOSBox, DOSEmu or wine;-)

-- Ray
Find all posts by this user
Quote this message in a reply
03-07-2014, 05:51 PM
Post: #12
RE: Are HP 48 library structures documented?
The original MessDOS TOOLS.exe file from Joe Horn's Goodies disk #4 contain among compler, linker and documentations also examples.

When you now unpack the exe with:

TOOLS -d

you get a subdirectory

.\EXAMPLES\GEO\

with the GEO example. This example illustrate how to make a library from scratch on the PC without using USRLIB.

I personally use hptools-3.0.9-win32.zip.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-09-2014, 04:33 PM
Post: #13
RE: Are HP 48 library structures documented?
Guys, thank you all VERY MUCH for the helpful advice, comments, pointers, and humor Smile

I am going over a bunch of doc and trying to put things together.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
03-10-2014, 02:06 AM
Post: #14
RE: Are HP 48 library structures documented?
Page 126 (PDF page 138) in this document:

http://www.hpcalc.org/hp48/docs/programming/asm-pdf.zip
Visit this user's website Find all posts by this user
Quote this message in a reply
03-10-2014, 07:38 AM
Post: #15
RE: Are HP 48 library structures documented?
(03-10-2014 02:06 AM)Eric Rechlin Wrote:  Page 126 (PDF page 138) in this document:

http://www.hpcalc.org/hp48/docs/programming/asm-pdf.zip

Awesome! Thank you! And thanks a million for HP Calc.org. Incrediblly useful site...

I had already downloaded this document and it is my pile of files to be unzipped and read but would not have found it until much later without your post.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)