# # # FFFFF FFFFF # # FF FF II N N DDD The HP48G/GX file find application # # FFFF FFFF II NN N D D ---------------------------------- # # FF FF II N NN D D # # FF FF II N N DDD Version 2.1a # # ^^^^^^^^^^^^ # written by Jorge Costa in November 1996 CONTENTS: o OVERVIEW o DISCLAIMER o COMPATIBILITY & SUPPORT o INSTALLING FFind library o DELETING FFind library o INSTRUCTIONS - FFind library commands - The [EDIT] function and the custom file editor - The [VIEW] function, auto-customized viewer and the custom file viewer - Performance o GOOD REASONS TO USE FFind o KNOWN LIMITATIONS & BUGS o COMMENTS ON THIS VERSION o ACKNOWLEDGEMENTS o CHANGES OVERVIEW -------- The FFind library is the sucessor of FF programs which pioneered the implementation of a new HP48 software idea, a file finder. This application is ideal for users who have complex directory structures, which sometimes leads them to loose detailed knowledge about the contents of their calculator, or simply causes some variables to be cumbersome to access. It accepts a string or a global name, searching HP48 directories for maches. The search mechanism is recursive and relatively fast. Also, it is prepared for searching in a reserved area of the HP48 directory structure - the hidden directory - where alarms and user defined keys information is stored. By consequence, all hidden files or directories will also be detected, allowing the user to have full knowledge of what is stored in the calculator. In addition this new version provides the ability to search through port memory, expanding even more the user's control over the machine. After finishing the search, several tools are available to manage the list of files found ( optional ) - all this is offered in a familiar HP48G/GX environment ( similar to the equation library ), turning this application into a powerful, yet simple to use, HP48 tool for any advanced user. Available functions are recall, edit, view, evaluate, display path, display properties and recall list of files. It is also reported the number of matches found. Together with a good file managing application, this piece of software can prove to be of great usefulness ! DISCLAIMER ---------- THERE ARE NO GUARANTIES AS TO THE PERFORMANCE OF THIS PACKAGE. THE AUTHOR IS NOT RESPONSIBLE FOR *ANY* KIND OF DAMAGE CAUSED BY THE DOCUMENTATION OR SOFTWARE PROVIDED. THE AUTHOR RECOMMENDS THE USER TO BACKUP THE MACHINE'S MEMORY BEFORE USING THE SOFTWARE. PERMISSION TO COPY THE WHOLE UNMODIFIED PACKAGE IS GRANTED, PROVIDED THAT THE COPIES ARE NOT MADE FOR RESALE ( EXCEPTING NOMINAL COPYING FEES ). THIS PRODUCT MAY NOT BE USED FOR COMERCIAL PURPOSES, WITHOUT WRITTEN PERMISSION FROM THE AUTHOR. SPECIAL NOTE TO HACKERS: IF YOU PLAN TO USE PARTS OF FFind CODE, YOU _MUST_ REQUEST THE AUTHORS PERMISSION. AFTERWARDS, CREDIT MUST BE GIVEN ! COMPATIBILITY & SUPPORT ----------------------- FFind was written to the _HP48G series only_. However, it is possible to get a HP48S series compatible version on my HP48 page ( see bottom of this document ). That is the official FFind Web page, my own page. There, you can get the latest version of FFind ( as well as read some more about FFind ), plus all my available programs and many information about the HP48. This program uses non-documented features of the ROM ( unsupported entries ) and was tested in HP48 ROM revision P. It should work on all HP48G/GX. Any questions about FFind application may be sent to the author's email address ( at the top and bottom of this document ) and will be answered as soon as possible. However, there are no guaranties that every question will get an answer ! PLEASE NOTE: * If you have a HP48G or GX with a different ROM revision than P, please be kind enough to send a small report about FFind's performance on your calculator - in particular, if you think the program is acting strangely ! * In case you have a problem with FFind, or have comments, suggestions, improvements, don't hesitate in comunicating it to the author ! * Again, any modifications to the code _must_ be reported to the author. INSTALLING FFind library ------------------------ 1) Download the HP48 library ( lib extension ) using binary transfer. 2) Put two copies of the library object on the stack and execute BYTES. You may now purge the variable with the library ( recommended ). 3) Confirm that you have the following numbers on the stack: level 2 : # 2511h ( or # 9489d ) level 1 : 3397 IF YOUR NUMBERS DON'T MACH WITH THE ABOVE, IT'S POSSIBLE THAT THE CODE WAS CHANGED - CONTACT THE AUTHOR OR GET THE CORRECT FILE AT THE AUTHOR'S WWW PAGE. 4) Discard these numbers and type the port number where you want to store the library ( anything from 0 to 32 - if you don't know what this is all about just press 0 ENTER ). 5) Press STO. 6) Turn the calculator off and back on again - the display will stay cleared for some seconds ( configuring ports ) - just wait. 7) FFind is installed. You may now use it, follow the instructions below. DELETING FFind library ---------------------- 1) Be sure you don't have any copies of the library on the stack. 2) Jump to HOME directory. 3) Type :0: 1140 and press ENTER _twice_ . 4) Type DETACH and press ENTER. 5) Type PURGE and press ENTER. The screen will flick a little... 6) The library is deleted. If you got an error message, try again. Read the HP48G series User's Guide for more information on purging library objects. INSTRUCTIONS ------------ - FFind library commands There are two commands available in the FFind library menu: FF and FFinfo. FFinfo is nothing more than an about screen, with my email address. FF command accepts a name or a string as input. However, if the stack is empty or wrong arguments are in level 1, an input line will be launched. From the input line menu, we have the following switches: [CASE] ........................... case-insensitive/case-sensitive searh [PORT] ........................... enable/disable port memory search [LIST] ........................... enable/disable browser and recall list [] [TED] ............................ use TED as custom object editor(see below) [EDIT] ........................... use EDIT as custom object editor(see below) The first four options may be controled by the following user flags: FLAG SWITCH DEFAULT ( flag cleared ) 50 CASE insensitive 51 PORT enabled 52 LIST use browser 58 TED disabled 59 EDIT disabled Please note that this input line accepts anything - e.g., a real number will be 'converted' to a global name and used by FF without any problem. After giving FF correct input ( or using the input line ), the program status will be displayed on the HP48 status area. This is the search mechanism : the program will look for a variable that maches to the input - first in all the directory structure and then through all available ports ( if enabled ). During the port memory search, the program will only analize backup objects ( their names ), not libraries. After the search mechanism is finnished, if flag 52 is set, the program will simply return a list of files found of the form { { name { path } } ... } . Otherwise ( default ), a full screen choose box will be started, listing all files found and reporting the number of matches on the top of the screen. The choose box has the following available keys: ( LS = left-shift RS = right-shift ) [UP], [DOWN] ..................... move up, move down. [LS] + [UP], [LS] + [DOWN] ....... page up, page down. [RS] + [UP], [RS] + [DOWN] ....... jump to top, jump to bottom. [RS] + [ON] ...................... turn off the HP48. [ON] ............................. exit the choose box. [ENTER] .......................... evaluate highlighted item & exit. [ALFA] + letter .................. jumps to next name beginning by the letter. Menu keys - first page: [RCL] ............................ copy highlighted item to the stack. [EDIT] ........................... edit highlighted item (read below). [VIEW] ........................... view the object stored in the name. [EVAL] ........................... the same as [ENTER]. [PATH] ........................... display highlighted item's path. [PROP] ........................... show highlighted item properties, such as name, path, type, bytes and checksum. Menu keys - second page: [LIST] ........................... recall the list of all files found + path. [CNFG] ........................... instructions for the custom viewer (below). [EXIT] ........................... the same as [ON]. Available key in 'searching' mode: [ON] ............................. aborts scanning, losing the original path. - The [EDIT] function and the custom file editor If you edit a file and change it, you'll be prompted for overwriting the file. If you press ENTER, the object will be saved and the program exits at the original path. If you press any other key, the program exits at the original path and leaves the modified object at level 1 of stack. Remember you can customize this function by installing TED ( from JAZZ library or TED library ) or EDIT. You can use the EDIT function from StringWriter library or store another editor under the name 'EDIT', _only_ in the HOME directory. Please note: the custom editor must accept _any_ object, not only strings. - The [VIEW] function, auto-customized viewer and the custom file viewer The VIEWER has the capability of detecting the commands AGROB and VV ( from JAZZ(*) and JAVA(**) or EQSTK(***) ), so it can use their functionalities. The auto-customized viewer is like: { << IF DUP TYPE 2 == THEN ELSE 2 AGROB END VV DROP >> } If these commands aren't available, FFind will use the internal viewer. You can however configure a viewer function for FFind, instead of using the internal viewer ( ViewLevel1 ) or the auto-customized viewer. It must be stored under the name 'FFpar' in the HOME directory and the object must be something like: { << viewer >> } and the program must accept *any* object for input ( one argument only ). It's also recommended the program will leave the stack empty, though this is optional. With the auto-customized viewer active, you'll find FFind very powerful ! Now FF can really view almost any type of objects like grobs, symbolics, text, programs, complex numbers, arrays of *any* type, etc. Objects are viewed in a convenient way, using the power of AGROB and VV, having the possibility to return to the file browser. (*) JAZZ is a SysRPL & ML compiler written by Mika Heiskanen & Jan Brittenson. (**) JAVA is a powerful alternate stack display, written by Andre Schoorl & Richard Steventon. (***) EQSTK is an equation writer stack display written by Mika Heiskanen & Claude-Nicolas Fiechter. PLEASE NOTE: - FF command is very handy in the case of large capacity RAM cards installed. - There can be "insufficient memory" problems if you give ambiguous inputs ( such as 'A' ), because the number of listed files can increase to several hundreds (!), leading the HP48 to run out of memory or making FF almost freeze. Cancelling with ON will exit safely. - Case-insentive mode is slower. Avoid using it whennever you can. GOOD REASONS TO USE FFind ------------------------- I can list some situations in which using FFind has advantages: #1 - Your machine as so many files that every time you need to execute a program you have to search for it in your ( many ) directories. Once you know some letter(s) of the name, the problem is solved just by executing FF. As you probably won't remember that program's input, you can view it first. #2 - Sometimes you need to execute a program, but you don't want to move to the program's directory, because you have to push many keys to go there, execute it and return to the original directory. FF will search for it in some seconds, execute it ( by pressing [ENTER] or [EVAL] ) and then restore the original path. #3 - If you give extensions to your files, FF is useful to list specific types of files ( *.EQ for equations, *.GR for GROBs, *.ARR for arrays, etc ). Remember that you are able to know the type of a file by pressing [PROP] in the choose box menu of FF. #4 - If reserved variables ( such as IOPAR, PRTPAR, PPAR, etc ) aren't useful to you and you want to know if you have any of them in your HP48. #5 - You were making some STAT calculations, but you don't remember where you left the data stored. Type 'DAT' FF and you'll find every statistic data stored in the HP48. Tip : Press [PATH] or [VIEW] to distinguish files with the same name. #6 - After you have a bad crash on your HP48, it's usual to get a directory structure like D.01, D.02 ... and FF is useful to detect where your most important data or programs went - it's a good way of starting a system diagnosis. Now FF is an HP48 doctor ! #7 - If you need to search for a variable in a program of yours, you can now use FFind ( disabling the browser, it returns a list with the files found ). In case you find other ( good ) uses to FFind library, please report them to me. KNOWN LIMITATIONS & BUGS ------------------------ If you give FF command a null name as input ( it can be obtained by typing #15777h SYSEVAL in the command line ), the file browser seems to be empty - but it isn't. Look at the top of the screen to get to know how many files were found - FF handles these files without any problem. FF command suffers a major decrease in performance in case of low memory conditions. If you give inputs such as sole letters, it's very probable that FF will work slowly, due to a great amount of files being found - the problem resides on all the necessary list appends which are slow operations when long lists are involved. No bugs are known in this version. All bugs found in v 2.1 are now fixed. ACKNOWLEDGEMENTS ---------------- I want to thank to ( in alphabetical order ) : - Andre Schoorl, for continously proving that he's FF's most significant contributor ! Several features in FFind were created with his help ( and some times, from his ideas ! ). - Carsten Traebing, for sending great comments and suggestions. He cares ! - Christian Meland, for his excelent code objects ( case-insensitive mode ) and for the new item on the 'good reasons to use FFind' list. - Hewlett-Packard, for their TOOLS and RPLMAN.DOC . - Jim Donnelly, for the great book "An Introduction to HP48 System RPL and Assembly Language Programming" - Mario Fiadeiro, for our exciting talks and exchange of ideas. - Mika Heiskanen, for his JAZZ, his HACK library and ENTRIES.SRT excellent document. Also, for his page. And for being such a hacker... - Nathanael Morriss, for reporting another port search bug in FFind21, for suggesting the input line start-up for FFind and for using FF since v 1.3 ! - Ross Campbell, for reporting a bug in version 1.0 and his interest in FF. I would also thank to everybody at the 'RULES' screen ! :-) PROGRAMMING COMMENTS -------------------- Thanks to Nathanael, I noticed the port search bug still exist ! He also gave the idea of making FF return the list of files found, instead of launching the browser ( configurable ). Some code was changed, the ROMPTR structure was slightly optimized. I'm waiting to see when will my ideas ( and those of the contributors ! ) for FFind stop coming. This program became something that I never imagined... Andre Schoorl has been recently hacking FFind21, but he didn't send me the code yet - this means that we'll have at least an FFind22 ! Here are some possibilities for next version of FF : - Make FFind use the Universal Font Library ( UFL ). - A [PUSH] key, begins a new stack shell ( like CALC in some input forms ). - If anyone cares and sends email, I'll start writing an S/SX compatible version of FF. CHANGES SINCE V1.0 ARE: -> Terrible bug fixed : didn't work properly (*crashed*) with directories in which the only variable was hidden ( stored in a null name ). -> Removed code in excess. -> Improved some operations. -> 13-14 % faster in my directory structure ( 18 directories ). -> A little bit larger, because of the new screen. CHANGES SINCE V1.1 ARE: -> FF now detects null-named files and directories ( such as hidden dir ). CHANGES SINCE V1.2 ARE: -> Lost S/SX compatibility by including a full screen choose box and enabling RCL, EDIT, EVAL and PROP functions in the choose menu. -> Removed the big GROB to save program size. CHANGES SINCE V1.3 ARE: -> E-mail was added to the table at the 'searching' screen. -> Some keys return to the browser, after execution. -> Added VIEW, PATH, LIST and CNFG keys to the menu browser. -> EDIT was improved to allow file updates. -> PROP screen is totally medium font. CHANGES SINCE V1.4 ARE: -> Converted to library object. -> Added a port search mechanism. -> Added an auto-customizable viewer. -> Removed every fancy features of the 'searching' screen. -> Added a nice 'about' screen. CHANGES SINCE FFind20 ARE: -> Port search bug is solved. -> FFind is now case-insensitive or case-sensitive, it's configurable. -> EDIT function is now customizable. -> Added an input form on start-up ( empty stack or bad args ) -> Added a set of user flags to toggle CASE mode, PORT search and editors. -> Removed a number display bug. -> Optimized text and some code parts also. CHANGES SINCE FFind21 ARE: -> Port search bug is definitely solved. -> Added LIST to the input line menu and to the flag configuration. -> Optimized some code. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Jorge Costa ³ E-mail: l38861@alfa.ist.utl.pt ³ ³ Chemical Eng. Student ³ HP48 page : http://alfa.ist.utl.pt/~l38861 ³ ³ Instituto Superior Tecnico ³ Handheld & Portable Computer Club ( London ) ³ ³ Lisbon - Portugal ³ Member # 946 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ