CRLIB, what next? - 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: CRLIB, what next? (/thread-1277.html) |
CRLIB, what next? - HP67 - 05-09-2014 10:44 AM I tried to create a library today on a 50g. CRLIB appears to work, the library goes on the stack. I saved it in port 0. The library shows up in port 0. I warmstart and the library shows up in the LIB menu. I also did libno ATTACH just for fun, in the HOME directory. Alas, I cannot access any of the commands in the library. I hope I missed something minor. Any suggestions where I messed up or what to check? Thanks. RE: CRLIB, what next? - pdo - 05-09-2014 12:40 PM (05-09-2014 10:44 AM)HP67 Wrote: Alas, I cannot access any of the commands in the library. I hope I missed something minor. Not sure what you mean by "cannot access" the commands. Do the $VISIBLE commands show up in your library menu? I've been using CRLIB myself recently and haven't (yet) come across any problems. Paul RE: CRLIB, what next? - HP67 - 05-09-2014 01:26 PM (05-09-2014 12:40 PM)pdo Wrote: Not sure what you mean by "cannot access" the commands. Hi, None of the programs in the library are recognized. When I type in the name of a program that should be in the library it remains quoted on the stack and EVAL does nothing. All the commands in the library don't appear to be recognized at all. (05-09-2014 12:40 PM)pdo Wrote: Do the $VISIBLE commands show up in your library menu? No, I have no visible commands. I understood from the doc $VISIBLE is only for variables you want to show up in the VAR menu. This library is only supposed to contain commands (programs). They are all in the $HIDDEN list. Thanks. RE: CRLIB, what next? - DavidM - 05-09-2014 04:22 PM (05-09-2014 01:26 PM)HP67 Wrote: No, I have no visible commands. I understood from the doc $VISIBLE is only for variables you want to show up in the VAR menu. This library is only supposed to contain commands (programs). They are all in the $HIDDEN list. I believe you've indicated the source of the problem. The names of objects in the $HIDDEN list are only available to other objects in the library itself (or SysRPL objects when coded in a special way). To make the names be recognized outside of the library, you have to put them in the $VISIBLE list. RE: CRLIB, what next? - rprosperi - 05-09-2014 10:37 PM Also, add the variable $CONFIG containing "<< LIB# ATTACH >>" (without the quotes, i.e. an RPL program) in the folder you convert to the library where LIB# is the Library number you've chosen to create. This short routine is run during system init after [ON]-[F3] or power-up, and the above simple code makes the library automatically attach itself, so you don't have to. Assume you also have $TITLE (a string), $ROMID (hex BINT), and possibly $HIDDEN as discussed above. These are described in usrlib.txt on Goodies Disk #1, avail on hpcalc.org as well as many other collections of the initial HP docs on RPL tools RE: CRLIB, what next? - HP67 - 05-10-2014 06:15 PM Guys, thank you very much. I will try this shortly. I would like to avoid having the command names show up in the VAR list. The doc isn't very clear on this. I understood if you specify a number real or integer in $CONFIG then CRLIB creates a "default config" that attaches the library. It seems that part works, so perhaps I don't have to actually create the ATTACH command? Thank you both. RE: CRLIB, what next? - DavidM - 05-10-2014 08:12 PM (05-10-2014 06:15 PM)HP67 Wrote: Guys, thank you very much. I will try this shortly. I would like to avoid having the command names show up in the VAR list. The doc isn't very clear on this. The commands should only show up in the list of your library's commands when you navigate to it via LIB (right-shift-2). Attaching a library doesn't inherently change the VAR menu objects in any way. There is also the concept of scope at play here, and that might be causing some confusion. Normally, you want to attach a library while the HOME directory is active (sometimes referred to as "attaching to the HOME directory"). This makes all of the commands/objects in your library available to all objects (regardless of which directory they are in), but that's not the same thing as copying them to the actual HOME directory. Does that help clarify things? RE: CRLIB, what next? - HP67 - 05-11-2014 05:49 AM Thanks, David. Your suggestions were right on the money. The programs show up in the LIB menu and don't clutter the variables. I understood the scope issue from reading the manual earlier but thank you for mentioning it. The library doesn't seem to attach automagically on the 48s, so Bob's suggestion obviously applies there. On to the next problem now On my 50g the library self-attaches and works fine. I can't get the library to work on an HP 48SX or G. The code is all User RPL and the code itself runs on the SX and G. But the library doesn't seem to work there. Is this expected, or should it work? RE: CRLIB, what next? - RMollov - 05-11-2014 10:16 AM (05-11-2014 05:49 AM)HP67 Wrote: On my 50g the library self-attaches and works fine. I can't get the library to work on an HP 48SX or G. The code is all User RPL and the code itself runs on the SX and G. But the library doesn't seem to work there. Is this expected, or should it work? You need to create the library on each platform. HACK library is your friend here. At least for 48G, not sure for S. HTH, RE: CRLIB, what next? - HP67 - 05-11-2014 10:23 AM Thanks. First I'll try editing the header briefly. If that doesn't work, I'll try your suggestion. RE: CRLIB, what next? - HP67 - 05-12-2014 03:18 PM I used D->LIB by Detlef Mueller from hpcalc.org. It is very simple and works great on the SX and Gs I have. I would recommend it highly to anyone wanting a simple and intuitive device-hosted library creator for the HP 48. |