[comp.sys.handhelds] Three little HP48 utilities

jurjen@cwi.nl (Jurjen NE Bos) (09/21/90)

Here are three very simple programs.  I find them not very interesting, but
together they're just good enough to be postable.
Have fun!
	Jurjen


PFF is a file finder.
Put in your HOME directory under the name PFF.
Input: a name. Call from the HOME directory.
Output: the list of all PATHs where name resides.

%%HP: T(3)A(R)F(,); @checksum #6DFFh
\<<
  IF VARS OVER POS
  THEN PATH 1 \->LIST
  ELSE { }
  END SWAP 15 TVARS \-> name dir
  \<<
    IF dir { } \=/
    THEN 1 dir SIZE
      FOR var dir var GET EVAL name PFF + UPDIR
      NEXT
    END
  \>>
\>>

FF is a file finder that is meant for interactive use.
Put it in your HOME directory under the name FF.
Input: a name. Call from the HOME directory.
Output: if the name is found: nothing, but the current directory will
contain the name, and the menu will be the row of the VAR menu containing
the name.  Otherwise, the name will be on the stack and the menu and
directory unchanged.
%%HP: T(3)A(R)F(,); @Checksum: #86CAh
\<<
  IF DUP VTYPE 0 \>=
  THEN VARS SWAP POS 1205 + 6 / IP 100 / MENU 0 DOERR
  END 15  \-> dir
  \<<
    IF dir { } \=/
    THEN 1 dir SIZE
      FOR var dir var GET EVAL FF UPDIR
      NEXT
    END
  \>>
\>>

FRE is a program that gives the number of free bytes, just like MEM,
but does not do the garbage collection.  Gives you a good idea how often a
garbage collection takes place.  Tip: put 'FRE' in EQ and plot it.  Scale Y
from 0 to 30000.  (Autoscale get terribly confused).
(To be converted with ASC\->)
"D9D2016F50FBD81ED2A2EF9A2B21308D43"

--
|                 | "Never imagine yourself not to be otherwise than what |
| Jurjen N.E. Bos | it might appear to others that what you were or might |
|                 | have been was not otherwise than what you had been    |
|  jurjen@cwi.nl  | would have appeared to them to be otherwise."         |