HP42S directories?


I'm trying to figure out if there is some way to hack in some form of directory structure in the 42S. Since my daqily use machine now has 31553 bytes of usable RAM (thanks, Randy!) I am gathering a really messy collection of stuff in a flat variable/program space.

Even a library system that used some form of labelling local variables (so they would appear to me as multi character varnames such as "var1" and "*plto" etc.)and ran subprograms inside a master program would work okay, I think.

I'm exploring the possibilities, just wondering if anyone has looked into this.



Well, I've developed a scheme for doing libraries. nothing earth shaking- all quite simple. Just arranging local variables and menu names.

But it does reduce the sheer quantity of programs in the menu. I can't figure out any hack for local variables, so I can't do much to reduce the population in flatland there.

I will clean and post code eventually, I'm still getting the first library finished enough to optimize.



I thought about it and I did not get to any particular, efficient solution. As I post in this forum a lot more than I believe I should (sometimes I think people will complain...), I decided to wait for some other posts.

Anyway, I tried something like building the first line of the CUSTOM menu, but to get to full functionality, you should have an updated label list. ASSIGN is programmable in the HP42, but does not accept indirect specification. PASN (HP41CX or Extended Funtions module) is an extended version of ASN available in the HP41 basic; it is programmable and may be controlled by the program, and has no equivalent in the HP42S' repertoire.

I'm curious to know what did you do. I have an HP42S+ (32KRAM, upgraded) and I was not aware of this possibility.



Luiz- I'd hardly worry about posting too much. I've never found any of your posts annoying. Far from it, they are generally helpful or thought provoking.

For the directories, I haven't been directly using the custom menu, since I'm using a library approach. the "library" is an executable program, such as

(misc stuff here, I use a tone for an audio clue as to which of the 3 curren tlibraries I'm entering)
KEY 1 GTO 03
KEY 2 GTO 04
KEY 3 GTO 05
KEY 6 GTO 99
KEY 7 GTO 02
KEY 8 GTO 01
GTO 00

So each entry will GTO a locally labelled program instead of a globally labelled one, no big deal there.

for the next level, I start with a "variable menu" where you can input all the values for any of the programs in this level. directly executing a program works fine instead, but in my case, I have a need for a lot of variables that will get reused (like binomial distrobution, mean, and sdev)

KEY 1 XEQ "a"
KEY 2 XEQ "b"
KEY 5 GTO 10
(this option takes you back to the beginning of the library. GTO 00 does the same thing without the pre-00 stuff like tones)
GTO 03

... etc.

(note that I *do* reuse these local variable names for each sublibrary function set! Paying attention to the search order is what makes that work for me. I've got 6k of programs in one library right now, and standardizing these calls is the only way I have been able to keep track)

Next comes the menu for the actual programs

... etc.
KEY 5 GTO 03 (the previous level)
KEY 6 GTO "LIBX" (return to beginning)
GTO 10



this drasitcally reduces the number of programs to scroll through in the program menu, but doesn't do a thing for the variable menu. those still pile up.

I haven't pulled off any super tricks in this yet, but I'm looking for something that will work better and take less space. Even 32K can go fast this way.


uh, something went badly wrong with the formatting. I'll fix it this evening



Clever solution, this one of yours. Easy to understand and efficient. That's the kind of solution I encourage my students to try to go for.

You know what I believe the HP42 should have? An indexed catalog. Say, NCAT (or NCATP, for programs, NCATV, for variables, and so) with N in the X-register; the name of the N-th program would go into ALPHA, and ASTO X, XEQ IND ST X would run it. Just a thought, a teasing thought.

Anyway, as you mentioned, the "super tricks" would be welcome... but how to get to them?

Best regards... and thank you.


Well, since it seems useful, I think I'll pretty it all up and submit an article or somesuch. *after* the tests this week. :)

I'm glad that it could be deciphered, at least by one person!


Possibly Related Threads...
Thread Author Replies Views Last Post
  Prime user directories kris223 2 1,028 09-21-2013, 09:57 AM
Last Post: iconmaster
  HP42S John Mosand 5 2,074 07-22-2012, 03:13 AM
Last Post: Les Koller
  HP42S graphics Han 2 1,295 07-20-2012, 12:23 AM
Last Post: Raymond Del Tondo
  HP42s ROM aurelio 18 7,051 06-26-2012, 09:36 AM
Last Post: Thomas Klemm
  x root y on hp42s David Griffith 14 3,970 04-08-2012, 12:43 PM
Last Post: Walter B
  Directories on the 50G Matt Agajanian 4 1,378 03-09-2012, 10:23 PM
Last Post: Matt Agajanian
  HP42s - deal? Cristian Arezzini 26 6,362 02-19-2012, 10:05 AM
Last Post: Cristian Arezzini
  HP42S Dwight Sturrock 4 1,634 03-31-2011, 11:21 PM
Last Post: svisvanatha
  Sick HP42S Chuck Galloway 2 1,135 03-17-2010, 11:46 PM
Last Post: Geoff Quickfall
  Sick HP42S Chuck Galloway 4 1,389 03-17-2010, 04:58 AM
Last Post: Nicholas Cole

Forum Jump: