[comp.sys.handhelds] HP48 Tempory Directories

ftg0673@tamsun.TAMU.EDU (Rick Grevelle) (06/22/91)

Using directories in the 48 has it's share of disadvantages.  My personal
preference is not to use them at all.  Overall, directories access their
variables slower than libraries, and since they must be stored in the RAM
in order to be effectively used, there is less memory available for the
48 to operate, increasing the frequency of memory packing, and resulting
in even slower execution timings.

In a recent discussion with one of the most knowledgeable individuals of
whom I know outside of HP regarding the 48, I realized that there must be
many users who have yet to see how easy it is to incorporate a directory
type format into libraries, and altogether dump the directory habit :-).

Unfortunately, one very convenient feature for doing this was not provided
by HP on the user language level.  So some time ago I developed a program
to deal with this deficiency.  Very similar to the TMENU command, TDIR has
an analogous role for directories.  Temporary directories are used in the
the 48 quite often; such keys as MTH, and PRG invoke such directories, and
are no different from the the TDIR command being introduced here.
 
Any list that can be used as a valid argument for the TMENU command can be
easily modified to be used as a valid argument for the TDIR command.  All
that is necessary to do is to put the name of the temporary directory in a
string in level two, and then the argument list which is normally used by
TMENU in level one.  Combine the two arguments into a single list by using
the 2 ->LIST sequence.  This is the form in which the argument list must
be in order for TDIR to properly function.  Here's an example argument:


{ { "UC" { AND OR XOR NOT 
{ "dup" \<< # 3188h SYSEVAL \>> }
{ "drop" \<< # 3244h SYSEVAL \>> }
} } }


Multiple directories can be used with TDIR, and when more than six are used,
the NXT key will display the next page of directories just like TMENU does
when more than six menus are used.  Probably the quickest example that I can
think of is to combine the MTH, and PRG keys into a one temporary directory.


\<<  # 3B551h SYSEVAL # 3B293h SYSEVEL + TDIR \>>


Executing the above will immediately result in the combination of the two keys
MTH, and PRG, so each time the NXT key is pressed the next page of temporary
directories will appear.  There is no limit, other than memory constraints, to
the number of temporary directories than can be used together in this manner.

Below is a directory that contains the TDIR command along with the sample list
from the earlier example.  Users already familiar with the use of TMENUs will
have a slight advantage here, but I feel this material is sufficiently straight
forward enough for everyone.


Rick Grevelle


o  /
 \/
 /\  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
o  \


%%HP: T(1)A(D)F(.);
"69A20FF7FF00000000804656D6F6E24696278047A2047A20C2A2090000553447
A20387E1908E16F8E1F88E147A20C2A20B0000465707D9D20E1632E4A2051000
8813000000000000E25A193632B2130B213047A20C2A20D00004627F607D9D20
E1632E4A20510004423000000000000E25A193632B2130B2130B2130B2130B21
300F000404544942540D9D202BA812BF8112040D9D2079E60BF70479E60630F3
79E606EFE3BBF06D00405445079E600CD04D004054450E8F60DAB93B2130B213
0F207"