(Comp.sys.handhelds) Item: 823 by n233dk at tamuts.tamu.edu Author: [Rick Grevelle] Subj: More SYSEVALS Date: Sun Sep 30 1990 08:54 There is perhaps a slight possiblity some confusion might develop 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 ---------- Resp: 1 of 2 by jpser at cup.portal.com Author: [John Paul Serafin] Date: Sun Sep 30 1990 14:54 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 ---------- Resp: 2 of 2 by sjthomas at cup.portal.com Author: [Stephen J Thomas] Date: Mon Oct 01 1990 07:54 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 (Comp.sys.handhelds) Item: 826 by frechett at boulder.Colorado.EDU Author: [-=Runaway Daemon=-] Subj: More hidden directory stuff Date: Mon Oct 01 1990 07:54 Ok, the info from Rick is very interesting. Thanks. You had mentioned that it could be used like any other directory and sure enough I can easily enter and exit it via numerous methods now. One little problem I have now is that I would like to be able to put the "HIDE" routines in that directory. The hide routines need to be RCLd though, and I can't seem to find any way to put '' in a list or string or anything. What I need is a user-key assignment that looks like this. << {HOME '' HIDE } RCL EVAL >> 11.1 etc.... but as you will find, there seems to be no way to get '' into the list. It just disappears. I have other stuff in my '' directory that I can get to with key assignments but then I am there... Anyone know how I can RCL an object from ''? ian -- -=Runaway Daemon=- ---------- Resp: 1 of 1 by n233dk at tamuts.tamu.edu Author: [Rick Grevelle] Date: Mon Oct 01 1990 14:54 >... I would like to be able to put the "HIDE" routines in that directory. > The hide routines need to be RCLd though, and I can't seem to find any > way to put '' in a list or string or anything. What I need is a user > key assingment that looks like this. > << {HOME '' HIDE } RCL EVAL >> > 11.1 > .... but as you will find, there seems to be no way to get '' into the list. It just disappears. I have other stuff in my '' directory that I can get to with key assignments but then I am there... Anyone know how I can RCL an object from ''? > > ian It's not a problem. There are probably more than a dozen ways to do what you want to do. The most straight foward approach is to use PUT in the OBJ MENU. You already know how to get the NULL NAME on the stack using #15777h, so the rest is easy. Set up the stack arguments as shown below and execute PUT to obtain the result. Arguments Result 4: 4: 3: { HOME A HIDE } 3: 2: 2 2: 1: '' 1: { HOME HIDE } Note that the NULL NAME does not appear in the list, but none the less it is there. You can check this several ways; the best would be to execute OBJ->. This is a good example of just how deceptive NULL NAMES can be. Personally I'd rather PEEK to see how the actual code is stored when playing around in the 48. You shouldn't trust the display routines to always be truthful when fooling with such things as unallowed names and unsupported objects. Absolutely the easiest way to get the NULL NAME into the list is not to do it at all. All of the above effort was unnecessary because simply by executing PATH when in the NULL DIRECTORY the same list, without the HIDE, is returned to the stack. To put HIDE into the list, simply use the [+] key with the list in level two, and the desired name to add is in level one. Remember, you will not see the NULL NAME in the list PATH returns, but it will be there. The next step is to get the the result list into the program you described. A minor sticking point is that you cannot EDIT the list. If you felt that the display routines were lacking in support, the EDIT routines are useless when it comes to hacking as they provide no support for queer objects. EDIT the result list, and the NULL NAME will disappear for real this time. Verify this by DUPlicating the level one result and executing the keystrokes [orange shift] [+/-] [ENTER]. Check it using OBJ-> again. A modified PUT that utilizes three SYSEVALs to get the result list into the desired program is the solution. Set up the stack arguments as shown below; SYSEVAL these three addresses in order: #1D524h, #54AFh, #5445h; the result will be as follows. Arguments Result 4: 4: 3: << A RCL EVAL >> 3: 2: 2 2: 1: { HOME HIDE } 1: << { HOME HIDE } RCL EVAL >> Providing each of the above steps were performed correctly, the NULL NAME should be in the list within the program. By now it is probably obvious that to hide directories and variables it is only necessary to first store them in the NULL DIRECTORY, and make the necessary userkey assignments. Automating the above process requires a only the use of a relatively short routine. To use this program level one should contain the result returned by the execution of PATH while in the desired directory, and any variable from that directory you choose to add to it. All that's left is to make the necessary user key assignment. ->KEY BYTES: #6704h 94 \<< \<< A RCL EVAL \>> 2 ROT # 1D524h SYSEVAL # 54AFh SYSEVAL # 5445h SYSEVAL \>> Note that this routine could be further shortened as well as the result it returns. i.e. { HOME HIDE } RCL EVAL (no program dilimiters) Rick Grevelle