[comp.sys.handhelds] EDIR V1.01

akcs.kevin@hpcvbbs.UUCP (Kevin Jessup) (02/21/91)

******* Documentation and program listings for the HP48SX EDIR utility
*******

EDIR Version 1.01

This version handles ALL HP48SX object types including
those not described in the manual.  The display is
the same as in the original version.  This version also
uses Bill Wickes PRESERVE program which is inluded here.

EDIR is a program that provides an extended directory
listing of all variables within the directory from
which it is run.  The variable name is displayed,
followed by the variable type and it's size in bytes.

The program output is a graphics object that is then
made available using the graphics application viewer.

Use the UP and DOWN arrows to move through the list.
Use right shift (blue) followed by the UP or DOWN
arrows to rapidly reach the top or bottom of the
display as needed.  The last item displayed is a total
byte count for all objects in the current directory.
Hit ON when you are finished viewing to exit the
graphics application and clear the graphic object from
memory.

It may take a couple of minutes to build the graphics
object if you have a large directory.

You should have about 6000 bytes of free memory for
this program to run with a relatively large directory.
The larger the directory, the more memory required to
build the graphics object.  If you don't have enough
memory, you'll find out about it as the program builds
the graphic.  No damage will occur.  Just delete any
garbage on the stack.

I wrote this program as an enhancement to the REVIEW
key when used to review a user directory.  I wish the
review key did what this program does.  Too bad the
EDIR program is such a run-time memory hog!  Those
lucky enough to have a RAM expansion card will probably
use it occaisionally.  If you don't, please note that
the 48SX PURGE command has always been a solid performer!

Note that the program listings were generated with the
48SX translate code set equal to 3.

EDIR REV 1.01
18-Feb-1991
Kevin Jessup
Milwaukee, WI
(414) 355-9752

*****************************************************
Program name: TYPSTRS (a list of object type strings)
Checksum:     47B4 hex
Size:         360.5
Function:     This is a list used by EDIR to get a
              textual description of the object type.
Listing:

%%HP: T(3)A(R)F(.);
{ "real" "complex"
"string"
"real array"
"complex array"
"list" "global"
"local" "program"
"algebraic"
"binary" "graphic"
"tagged" "unit"
"xlib" "directory"
"library" "backup"
"function"
"command" "address"
"long real"
"long cmplx"
"linked ary"
"character" "code"
"LIBRARY DATA"
"external" }

*****************************************************
Program name: EDIR (extended directory listing)
Checksum:     7D64 hex
Size:         642
Function:     The EDIR utility.  Place EDIR, TYPSTRS
              and PRESERVE (described below) in your
              "HOME" directory.
Listing:

%%HP: T(3)A(R)F(.);
\<<
  \<< STD PICT PURGE
CLLCD "Checking:" 1
DISP { { # 0h
    \<< 0 SWAP \->TAG
OBJ\-> SWAP DROP DUP
" " SWAP + 3 DISP
    \>> } { # 37h
    \<< VTYPE 1 +
TYPSTRS SWAP GET
    \>> } { # 6Ah
    \<< BYTES SWAP
DROP DUP 5 ROLL + 4
ROLLD
    \>> } } VARS DUP
SIZE 6 * 12 + R\->B
# 83h SWAP BLANK
# 83h # 6h BLANK \->
pro var dg bl
    \<< 0 1 var SIZE
      FOR i bl 1 3
        FOR j 'pro'
j GET 1 GETI # 0h 2
\->LIST 3 ROLLD GET
'var' i GET SWAP
EVAL 1 \->GROB REPL
        NEXT # 0h i
1 - 6 * R\->B 2 \->LIST
dg SWAP ROT REPL
'dg' STO
      NEXT dg
    \>> CLLCD DUP
SIZE # 6h - SWAP
DROP # 0h SWAP 2
\->LIST ROT
"TOTAL BYTES USED: "
SWAP \->STR + 1 \->GROB
REPL PICT STO { }
PVIEW PICT PURGE
  \>> PRESERVE
\>>

*****************************************************
Program name: PRESERVE
Checksum:     5418 hex
Size:         46.6
Function:     Utility that saves the 48SX flags,
              evaluates an expression and restores
              the flags.
Author:       Bill Wickes
Listing:

%%HP: T(3)A(R)F(.);
\<< RCLF \-> f
  \<< EVAL f STOF
  \>>
\>>

********************[END]******************

Milwaukee HP48SX BBS
(414)362-2020
2400/1200/600/300 baud
8 bits, no parity
6PM to 7AM CST Mon-Sat
24 Hours Sunday

Fast logins!  All files compressed using PKZIP.
Save on your phone bills.  Give us a try!