[comp.sys.handhelds] More SYSEVALS

n233dk@tamuts.tamu.edu (Rick Grevelle) (09/30/90)

There is perhaps a slight possiblity some confusion might develope over 
this hidden object/directory business.  It seems that Eric Toonen was the
first to discover that the HOME directory contained a directory which is
normally hidden, and unavailable for use.

This usually hidden directory is always present in the HOME directory, and
can not be deleted by a reset.  As a matter of fact, if your knowledge is
such that you're able to purge this directory, either a system halt, or a
reset, will actually reinstall it.  In other words, the hidden directory is
there by default.  And also by default, the directory has been named by HP,
using the NULL NAME '' (no spaces).

This could constitute a potential problem in that either the user, or the 
calculator could become confused by multiple NULL NAMES of the same length.  
Generally, it is not a good idea to use names, local or global, which are 
already being used by the calculator.  But, as everyone in this news group
is already aware, whatever can be used, can be abused.

The actual SYSEVAL address for the NULL NAME is #15781h.  This returns the 
NULL NAME without quotes so that it would be immediatly evaluated if the
current directory were the HOME.  There exist an RPL SYSEVAL that contains
a prefixed machine routine which allows the NULL NAME to be place on the 
stack unevaluated.  Its address is #15777h.

As Toonen has already pointed out, aside from the fact that it is hidden,
you CAN use this directory as if it were any other.  It is a true directory
just as the HOME directory.  If this seems a bit unbelievable, it can be
proven simply by using a prefixed machine routine from the ROM to recall
the entire contents of the HOME directory as a directory.  This also is
something you can't do without the use of SYSEVALs, or user written machine
code.  

While in the HOME directory, SYSEVAL this address: #8D5Ah.  Essentially this
routine recalls the contents of the current directory to the stack just as if
the name of the directory had been RCLed.  The only difference is that the
routine already knows what directory to recall, and, unlike RCL, it works in
HOME.  Once the HOME directory is on the stack you should be able to see the
hidden directory and the file names it contains.  This is particularly evident
in a 48 whose memory has been cleared.  

One final note, which has nothing to do with the above; for reasons unknown,
I was recently asked about a programmable OFF.  Perhaps someone else also has
a use for this as well.  It seems as if there should be another way to do this;
the only one of which I know is to use the SYSEVAL for the [blue shift] [ON] 
key, #3A9CE.

Here is a quick summary of the four SYSEVALs covered above:

#15781h      recalls the null name '' unquoted
#15777h      recalls the null name '' quoted
#08D5Ah      recalls the current directory
#3A9CEh      turns the 48 off

Rick Grevelle

jpser@cup.portal.com (John Paul Serafin) (10/01/90)

Why would a SYSEVAL to turn the HP48SX off be of interest?   The OFF command 
is already programmable.
.
A SYSEVAL to turn the HP28 off would be most welcome, however.
John Serafin
jpser@cup.portal.com

sjthomas@cup.portal.com (Stephen J Thomas) (10/01/90)

Use #18E58 SYSEVAL to turn the HP 28S OFF.....when turned back on, execution
continues with the next step, if it was executed from a program.
   steve thomas
  
sjthomas@cup.portal.com     sun!portal!cup.portal.com!sjthomas

TDSTRONG@MTUS5.BITNET (10/02/90)

> ... I was recently asked about a programmable OFF ...

What's wrong with the command OFF in the 3rd page of the PRG CONTROL menu??

jpser@cup.portal.com (John Paul Serafin) (10/02/90)

>Use #18E58 to turn the HP28S off...
Thanks.  I just tried it and it worked!
Is there a similar SYSEVAL for the HP28C also?
John Serafin
jpser@cup.portal.com

sjthomas@cup.portal.com (Stephen J Thomas) (10/03/90)

Here are the SYSEVAL addresses for the programmable OFF command for all
versions of the HP 28.  If executed from a program, execution continues at
the next program operation when the 28 is turned back on.  WARNING:  Of
course, use SYSEVAL at your own risk!
  
  version  1BB  ---  #07FBA
           1CC  ---  #07FEF
           2BB  ---  #18E58h
  
steve thomas
  
sjthomas@cup.portal.com     or
sun!portal!cup.portal.com!sjthomas

akcs.dsl@hpcvbbs.UUCP (David Lowenstein) (12/04/90)

  The built-in OFF command for the 48sx does exactly
the same thing as the SYSEVAL version, no? It'll
continue with the next command, just like the SYSEVAL,
when the 48sx is turned back on. If you don't believe
me, run the following program and try to turn your
calculator on :
                       << OFF OFF OFF OFF >>