HP42S directories?



#2

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.

-Christof


#3

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.


#4

Hi;

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.

Cheers.


#5

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

LABEL "LIBX"
(misc stuff here, I use a tone for an audio clue as to which of the 3 curren tlibraries I'm entering)
LABEL 00
CLMENU
"PRO1"
KEY 1 GTO 03
"PRO2"
KEY 2 GTO 04
"PRO3"
KEY 3 GTO 05
"QUIT"
KEY 6 GTO 99
KEY 7 GTO 02
KEY 8 GTO 01
MENU
STOP
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)

LABEL 03
CLMENU
"N"
KEY 1 XEQ "a"
"X"
KEY 2 XEQ "b"
...
"CONT"
KEY 5 GTO 10
"LIB"
KEY 6 GTO "LIBX"
(this option takes you back to the beginning of the library. GTO 00 does the same thing without the pre-00 stuff like tones)
MENU
STOP
GTO 03

LABEL "a"
INPUT "N"
RTN
... 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

LABEL 10
CLMENU
"PROB"
KEY 1 XEQ "A"
"MEAN"
KEY 2 XEQ "B"
... etc.
"RTN"
KEY 5 GTO 03 (the previous level)
"TOP"
KEY 6 GTO "LIBX" (return to beginning)
MENU STOP
GTO 10

LABEL "A"
--DO
STUFF--
RTN

etc.


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.


#6

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

#7

Hi;

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.


#8

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!

-C


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

Forum Jump: