From d89-mlt@sm.luth.se Thu Oct 4 14:05:27 1990 From: d89-mlt@sm.luth.se (Morgan Lindqvist) Newsgroups: comp.sys.handhelds Subject: Program HIDE for HP48sx Keywords: HP48,HIDE Date: 28 Sep 90 23:50:46 GMT Distribution: comp Organization: University of Lulea, Sweden Here comes a hide program for subdirectories and other object names, from M&M Mattias Dahl & Morgan Lindvqist d89-mdl@sm.luht.se d89-mlt@sm.luth.se University of Lulea, SWEDEN ------------------------------------------------------------------------- _ _ _ _ _ _ / \ / \ / \ / \ / \ | | | | | | | | | | | \ _ / | | | | \ _ / | | |_| | \ / | |_| | | | \ / | | | | / \ | | | | / \ | | | | | \ / | | / | | | X / | | \ _ / \_ \ _ _ _ / \ \ _ / \ _ ------------------------------------------------------------------------- Excuse for any grammar mistakes. First we would like to thank Rick Grevelle for the SYSEVAL's ---------------------------------------------------------------- You can hide all objectnames and use the "programs, directories, variables, ..." as usual. NOTE! These programs will not work on HOME directory. To hide a name(s) in a directory you must evaluate these programs like this. ex. { HOME APPL HIDE } RCL EVAL There "HOME APPL" is the path to the "HIDE"-programs directory. -------------------------------------------------------------- EXAMPLE. 4: 3: 2: 1:_ _ MAT EXCO U137 X _ To hide EXCO and the directory MAT. 4: 3: 2: { EXCO MAT } 1:_\<< { HOME_APPL HIDE } RCL EVAL \>> MAT EXCO U137 X Then press EVAL. 4: 3: 2: 1:_ U137 X _ You can still use EXCO or MAT by typeing in EXCO or MAT . --------------------------------------------------------- To unhide EXCO. 4: 3: 2: EXCO 1:_ \<< { HOME APPL UNHIDE } RCL EVAL \>> U137 X Then press EVAL 4: 3: 2: 1:_ U137 X EXCO --------------------------------------- To wake up all hided names. 4: 3: 2: 1:_ \<< { HOME APPL WAKEUP } RCL EVAL \>> U137 X EXCO Then press EVAL 4: 3: 2: 1:_ _ U137 X EXCO MAT --------------------------------------------------- USAGE: HIDE 1: { 'names' } -> none OR 1: 'name' -> none UNHIDE 1: { 'names' } -> none OR 1: 'name' -> none WAKEUP 1: none -> none -------------------------------------------------------------------- DIR HIDE \<< 0 VARS "" # 05B15h SYSEVAL PURGE VARS \-> hideobj hsize dirobj allobj \<< hideobj allobj dirobj SIZE 1 + allobj SIZE SUB + DUP 'hideobj' STO SIZE 'hsize' STO \<< \>> "" # 05B15h SYSEVAL STO dirobj SIZE IF DUP THEN 1 FOR x 0 'dirobj' x GET 1 hsize FOR y DUP 'hideobj' y GET SAME ROT OR SWAP NEXT SWAP IF NOT THEN {} + ORDER ELSE DROP END -1 STEP ELSE DROP END \>> \>> UNHIDE \<< VARS SWAP + ORDER \>> WAKEUP \<< "" # 05B15h SYSEVAL PURGE \>> END From n233dk@tamuts.tamu.edu Thu Oct 4 14:08:22 1990 From: n233dk@tamuts.tamu.edu (Rick Grevelle) Newsgroups: comp.sys.handhelds Subject: More SYSEVALS Date: 30 Sep 90 12:00:23 GMT Organization: Texas A&M University 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