USER FLAGS UTILITY by Scotty Thompson Copyright (C) 1991 All Rights Reserved DOCUMENTATION ----------------------------------------------------------------- COPYRIGHT NOTICE This Software is Copyright (C) 1991 by Scotty Thompson. All Rights are reserved. No part of this Software may be copied or otherwise reproduced, without written consent of the Author, for Profit. This Software is to remain intact in its entirety. No portions of this Software shall be utilized in any manner not intended from this copyrighted algorithm, and no User is authorized to modify the contents or distribute changes. This Software is Shareware, i.e., the User may use this Software provided that he/she register the product. The registration fee is $10.00 U.S. dollars or $5.00 with comments/suggestions. This Software may be distributed AS-IS, provided: (1) This documentation is included with every copy, and (2) distributors may recover the cost(s) of distribution by increasing the registration fee, so long as it is not ambiguous that the above- mentioned registration fees are separate from any costs recouped from the vendor, and that such registration costs are for the exclusive use of the Author. The Author makes no warranty and takes no responsibility for any damages of any kind that this Software may incur. The current Registration Address is: Scott Thompson 1621 West 257th Street #2 Harbor City, CA 90710 ================================================================= OPERATION 1. UPLOADING TO THE HP48SX. This Software is a Directory for the HP48SX containing various operating programs. Select the Main Directory where you wish this Software to be placed as a Sub-Directory. For example, if you are in the {HOME} directory, this will create a sub-directory of {HOME}. If you are in a directory called {A}, this will be a sub-directory of the main {A} directory. This Software will work in any valid displayable directory. It will not work if used as a backup object. You must Upload this Software using Kermit. Use Binary mode for the file transfer. Refer to your calculator's/computer's instructions on how to do this. 2. STARTING THE PROGRAM. You will need at least 30k of memory to run this program. After a successful upload, press "VAR" to get a listing of your variables/programs. Make sure that you are logged-on to the main directory that this Software has become attached. You should see part of the program name with the directory bar indicator above. Press the key that is directly under the program name (the white soft-key). Look for the file in the menu line that says "UFLA" and press the key directly underneath. You should see an initialization screen, followed by: User Flags Utility by Scotty Thompson as well as the following items in the menu line: HELP : REVW : DFLT : SETF : AUTO : EXIT This is the main menu. We will review these keys in order from left to right. HELP: Pressing this key will display a brief description of what these menu keys are. It should be adequate to refresh your memory after you have read these instructions and are familiar with the software. To leave this screen, press the "ENTER" key. REVW: Pressing this key textually reviews the 64 system flags as defined by Hewlett-Packard for the HP48SX Revision A devices. Upon first pressing this key, you may see the message "Creating File..." appear on the screen. This message appears whenever the system flags change from the delta flag in the program. Once this file has been created, the system flags are stored in this area and subsequent reviews will not have to rebuild the file. To maneuver through this level, press the Left or Right graphics cursor movement keys, integer keyboard codes 34 and 36, respectively. In the menu bar, you will see numbers that correspond to the flag(s) affected. For example, the first page will have: 1 : 2 : 3 : 4 : 5-10 : 11-12 in the menu area. The seventh line shows a general cursor movement description. Line six indicates which Binary Base is currently in effect. As can be seen, there are six actual data lines, and the six menu items correspond one-on-one with the data lines, with the left-most menu item corresponding to data line number one. A short beep will be heard if you have BEEPS enabled and you go from the beginning page to the ending page and vice-versa. To Exit this function, press the "DROP" key. You will be taken back to the main screen with the main menu reappearing in the menu area. DFLT: Pressing this key immediately brings-up a Caution screen. This routine will reset the system flags to Hewlett-Packard's defaults, as indicated by the flag- list descriptions for the HP48SX Revision A device. Press "Y" to reset the flags to the default state, or press "N" to leave the flags as they are. You will see an acknowledgment screen shortly after pressing the correct key. Press "ENTER" to leave the acknowledgment screen. You will be taken back to the main screen with the main menu reappearing in the menu area. SETF: Pressing this key is similar to the REVW key above. Refer to its description for explanations of when this Software will create the file and how it knows if it needs to be refreshed. The difference between this routine and the REVW routine is that this will allow you to set/change the various flags using a textual interface. For example, you will be able to change the Clock Format from "24 HR" to "12 HR" instead of "-40 CF". You will see the same textual descriptions that you will see in the REVW option, but you will know for sure that you're in SET/CHANGE mode because there will be a reversed, or highlighted, section of the screen directly positioned on the line that is currently active. You have a sample cursor movement description on line seven for each page. Also, the same flag numbers will appear in the menu area. Just like the REVW option, press the Left and Right graphics cursor movement keys to switch pages, integer keyboard codes 34 and 36, respectively. You will hear a short beep if you have BEEPS enabled and you switch from the beginning page to the ending page or vice-versa. To move the highlighted pointer to select the flag(s) to change, you may press the Up and Down graphics cursor movement keys, integer keyboard codes 25 and 35, respectively. Also, you can press the softkey directly under the flag number to go to that data area on the screen. This is sometimes a quicker method to select the desired flag. Once the highlighted bar is on the flag you wish to change, press "ENTER" and the Flag Name will appear on a new screen highlighted. If the flag is indicated by Hewlett-Packard that it is reserved, or not in use, you will see a screen indicating that these flags may not be set with this program. If you use these flags outside of this program, and select the DFLT option, these flags will be read as zero bits. This program does not alter these unused flags unless the DFLT option is used. Press "ENTER" to return to the flag selection screen. If the flag is a single-bit flag, and in-use, you will see a screen that displays the flag name in highlighted characters. Below this, you will see a "From:" with the current status of the flag, and below this, you will see a "To:" with the optional new parameter to set. Press "Y" if you wish to make the "TO" option the active option, or press "N" if you wish to keep the flag unchanged with the "FROM" option. If the flag is a multi-bit flag, and in-use, you will see a screen that displays the flag name in highlighted characters. Below this, you will see the "From:" and "To:" options as indicated above. However, instead of a 'Yes and No' prompt, there will be in the display area cursor movement instructions. In each of these cursor movement cases, the Software expects you to press the graphics cursor keys. For example, there may be the Left and Right to increment/decrement a number by 10, decimal, and Up and Down to increment/decrement a number by 1. These cursor examples should be self- explanatory. When the "TO" option holds the value that you wish, press the "DROP" key to back-up or 'Drop' a level. Be careful not to hit the "DROP" key twice in a row because from the flag selection screen, Drop is used to exit this routine (see below). When you are satisfied that your flags are the way you like them, press the "DROP" key to exit the routine. When you exit the application, any changes you made here will be reflected in the flags in use. AUTO: This is the AutoSet option. Pressing this key will prompt you through an assortment of options. This routine will: (1) Let you first Review/Set your flags, (2) Allow you to put your flags on a UserKey, (2a) Create a Program that automatically runs a program from the user keyboard and insures that your flags now set replace any that the application run may have changed, and (3) Allow you to create an AutoRun program that doesn't require the UserKey. The First prompt will ask if you wish to Review/Set your flags before continuing. Press "Y" if you want the program to shell to the SETF routine and then continue here, or "N" to continue through the AutoSet routine. If you elected "Y" above, refer to the SETF routine for instructions on how to Set/Change your flags. The Second prompt will ask if you with to put your Flags on a UserKey. The UserKey allows you to program any of the keys on the keyboard, except for the "ON" key proper, to automatically load your flags at any time the USER mode is on and you press the corresponding key. With this option, you can optionally create an autoload key that will automatically run your favorite application program after first setting the flags to your options, then restoring the flags to your options upon return. For example, an application program that displays a calendar and allows you to make/change appointments knowingly changes the system flags to something you don't want. With this option (or, for that matter, the AutoRun option, below), you can simply press your "HotKey" and run your application. When the application is finished, your flags will be set to your preference. Throughout the nodes that require that the USER mode be active, a friendly reminder is displayed with each "FUNCTION COMPLETE!" screen. Referring to the above paragraph, press "Y" if you wish to program a UserKey, or "N" to skip to the next option. If you press "Y", you will be prompted to enter the FULL KEY DEFINITION for the Key that you want to use to store this program. This Full Key Definition means that if the user has to press the Alpha Left- Shift 5 to access the application, you must press Alpha Left-Shift 5 here. If you decide that you don't wish to assign a key after all, make sure that no shifts are active and that alpha is disabled. Press "ENTER" proper if you still with to abort. You needn't worry about wrong keypresses and selecting strange modes. The entire user keyboard is disabled throughout this program, except for the "ON" key. Do not press this key. If you abort with "ENTER" proper, you will see another screen that indicates that this function has been aborted. Press "ENTER" at this point to continue to the next option. Referring to the above paragraph, and assuming that you wished to assign the UserKey, if this Software finds that the key you choose was already assigned, a screen will appear that asks if you wish to replace this key. If you press "Y", the old object assigned to that key will be replaced by a program generated from this application. If you press "N" at this point, the program will cycle to the beginning of the Second option and ask if you wish to assign a UserKey. Upon successful completion of assigning your UserKey, a FUNCTION COMPLETE! screen will appear. Press "ENTER" to continue. If you elected to program a UserKey, and did not abort, you will be prompted on if you'd like to Append a UserFile. Press "Y" to enable this Software to create a program that automatically runs one of your programs from the key you just assigned. The flags will be stored and restored according to your flags options during this session. Refer to the "Select Path" and "Select File" sections on how to maneuver through these sub-sections. Pressing "N" will take you to a "FUNCTION ABORTED!" screen. Press "ENTER" to continue to the next option. The Third option is to create an AutoRun file. This file is not based on the keyboard and resides in the directory of your choice. The file performs a similar operation to the UserFile option above, but resides instead as a separate program with a fixed name. Press "Y" to create the AutoRun program. If you press "N", you will be taken to the FUNCTION ABORTED! screen. Press "ENTER" to leave this screen. The Last screen for the AutoSet option is a summary screen. You will see "AUTOSET STATUS" in reverse, or highlight, at the top of the screen. If BEEPS are enabled, you will hear a series of tones and see four information lines appear from bottom to top. These information lines are: USERKEY INDEX: The Keyboard Code of the UserKey, or "N/A" if no UserKey was assigned during this session. SET USERKEY: This will say "YES" or "NO", depending on if you set the UserKey during this session. If "YES" appears, the UserKey Index, above, will indicate which Key was assigned. APPEND USERFILE: This will say "YES" or "NO", depending on: (1) UserKey was Set, and (2) You successfully appended a UserFile. If both options above are true, a "YES" will appear here, otherwise "NO" will appear. This is handy to remember that you have a program also assigned to the same key as the flag initialization routine. MAKE AUTORUN: This will say "YES" or "NO", depending on if you elected to create an AutoRun program. Press "ENTER" to complete the AutoSet routine. You will return to the main screen with the main menu reappearing in the menu area. EXIT: Press this key to End this session. Any changes to the flags will be current and operational. Any keys assigned will be available, along with any key definitions upon entry to this program. ----- SPECIAL SECTION FOR AUTOSET SELECT PATH: This routine is part of the AutoSet routine. If you elect to add a program to a user key or create an AutoRun program, this will be the first screen that you see. This routine will go through the different directories on your calculator, allowing you to select the path for the program to be run. The first two lines are cursor positioning examples. The third line indicates to press "ENTER" to End. You press this key if you have agreed that the path as indicated under the "MAIN LEVEL" highlighted section is the path that your application will reside. If there is any data in the "SUB LEVELS" section, it is an indication that the directory named in the Main level has directories as indicated in the Sub level. Press the Left and Right graphics cursor positioning keys, integer keycodes 34 and 36, respectively, to cycle the sub-directories listed in the SUB LEVELS section, if any. If this area is blank, it indicates that no sub-directories are present for the directory shown in the Main Level section. Press the Up and Down graphics cursor positioning keys, integer keycodes 25 and 35, respectively, to go up one level in the directory tree (keycode 25) or down one level to that currently displayed in the SUB LEVELS section. Note that pressing Down when no item is displayed in this section will have no effect. Press "DROP" to abort this operation. If you do, you will be returned to the "FUNCTION ABORTED!" screen. Press "ENTER" to leave this screen. Please note that the directory indicated in the MAIN LEVEL will be the active directory for subsequent program listings. If there is a sub-directory of the {HOME} directory, for example, then you MUST press the Down cursor key to make what was in the sub-directory the current, or parent, directory. You may wish to practice this so that you will be confident on this routine's operation. SELECT FILE: This is the Second screen that you'll see if you haven't aborted from the SELECT PATH routine. The First option is to select the search parameter. Press the Left and Right graphics cursor movement keys, integer keycodes 34 and 36, respectively, to cycle the search choices. Pressing "DROP" on this screen will abort the operation and take you to the "FUNCTION ABORTED!" screen. Press "ENTER" to leave this screen. When you have selected a search parameter, press "ENTER". Pressing ENTER will display "WAIT" text directly under the search parameter for a short time. If there are no matches for the type of data you are requesting, the routine will stay on this screen and the "WAIT" text will disappear. If there are matches, a second screen will appear with the search option highlighted at the top of the screen. Line seven will have a cursor positioning example, and towards the middle will be a name of one of the data that met the criteria. Press the Left and Right graphics cursor movement keys, integer keycodes 34 and 36, respectively, to cycle through the options. If you reach the data you want, press "ENTER" and the path and name will be used to create the program for the UserFile and/or AutoRun routine. If you wish to select a different search option, instead, press the "DROP" key at this level and you will be taken back to the Search option screen. If you wish to fully abort, you may press "DROP" on this screen only. Pressing "DROP" on the second screen will simply take you back one level. Like the SELECT PATH routine, you may wish to practice to get used to the "feel" of the software. ----- NOTES ----- If you have already created an AutoRun program and select the AutoRun filename as a new AutoRun name, the AutoRun program will recursively call itself and seemingly lock-up. This is to be avoided. The AutoRun name is displayed at the completion of setting the AutoRun, so do be aware of this possibility. No checking is done in cause the user wishes to modify this AutoRun program and for some reason wishes recursion. It is for this reason that no software check is made to check the reserved AutoRun filename. At no point should the User press the "ON" key during any stage of this program's execution. However, if you do, and you think you're stuck, you're not. Simply press the upper-right most key (where the EXIT menu name appeared) and you will exit the application without any problems. Also, you're flags will remain intact and you shouldn't lose any sleep with the abort. Simply restart the application, if you wish. If you don't restart the application after an accidental abort and exit, there is no worry. All system states are restored with the EXIT routine, which is assigned to that key. I recommend dedicating one UserKey just to initializing the flags. If you wish to append files, select different keys, but keep at least one key not assigned to a program for autoload. This is useful if you simply want to restore the flag states without running another application. This version doesn't allow for multiple flag indexes due to possible size limitations of non-expanded calculators. Every effort was made to keep the size to a minimum and provide fast, powerful and friendly code. Your comments/suggestions are always welcome. I hope you get as much use out of this program as I do. Enjoy.