(Comp.sources.hp48) Item: 77 by erikmb@etek.chalmers.se Author: [Erik Bryntse] Subj: Gateway codelock program v2.8 (beta) Date: Sun Mar 08 1992 [Note: This is an upgrade from GATEWAY.LIB version 2.7 that was on Goodies Disk #3. Also see CODELOCK.LIB on this disk. -jkh-] Finally, a new version of the Gateway codelock program is finished. The problems that people reported with v2.7 were mainly: 1) Gateway crashed when you have a null-named object in the current path. 2) Gateway did not work OK with alarms that adjust the clock. 3) The copyright message is displayed every time I turn my calculator on. 4) It is difficult to know when one can press the first key of the code, and sometimes the first key is lost. I have fixed these problems in version 2.8, and I now release a beta version, for final testing. If you are not afraid of a memory lost, try it! If it works OK, please let me know! If you have problems with it, please send me a description of what problems you have and when they occur. Also tell me your calculator version and what programs you have that may cause conflicts. Thanks! Erik. GATEWAY-48 Codelock Program ver 2.8 (beta) ========================================== GATEWAY-48 is a codelock program for your HP48SX. When your HP48SX is turned on, it displays a startup message (for example your name and phone number) and prompts you for a 4-digit code. If you key in the correct code, your 48 is turned on just like usual. Other- wise it is turned off again. With GATEWAY-48 you have complete software security and enough hardware security to keep people from messing with your calcu- lator. If you know how, you CAN get in without knowing the right code, but the memory will be cleared in the process. All normal stuff such as ON-C and ON-A-F will not work. A lot of work has been spent on the user interface and ruggedness of GATEWAY-48. This means that ¯ You can easily change the password. ¯ There is a built-in program to redefine the OFF key. ¯ You can provide a startup message like "Owned by XXYY". ¯ All is contained in one library, which cannot be modified. ¯ The code cannot be accidentally changed, since it is stored with a checksum. ¯ Alarms can be disabled when the codelock is enabled (ie the 48 is turned off). They will execute as soon as the 48 is turned back on. ¯ If alarms are allowed to execute when the codelock is enabled, the calculator is turned off again after the alarm is finished. ¯ There is a built-in program to remove GATEWAY-48 from your 48. INSTRUCTIONS ============ If you have something you do not wish to lose in your calculator, make a backup, just in case... Also remove any old versions of Gateway that you might have. Download the library into your 48. Store the library with 0 STO. Turn off your 48, then on again. You will see a short message when the library installs. Now press the LIBRARY menu key. There will now be a menu named GATEWAY-48. In this menu you will find the following programs: ASSIGN ------ Assigns the off key to the new off program OFFC. Turns on USER mode. NEWCODE ------- Enables you to enter or change the code. Run this after installing GATEWAY-48. The first time you run it, it will only prompt you for the new code, but normally you must key in the old code as well. REMOVE ------ Uninstalls the GATEWAY-48 library and clears key definitions. Also removes the hidden code. OFFC ---- The main code program. Turns off your 48 enabling the codelock. When you turn it back on, you have to key in a four-digit code to gain access to your 48. Note that it will not work if you haven't selected a code using NEWCODE. OWN --- If you press this key with a string in level 1, this string will be displayed when the calculator is turned on. If the argument is an empty string (""), the default message will be displayed. ALARM ----- Toggles the setting of the Gateway alarm flag. If alarms are disabled, then no alarms will be allowed to run while the calculator is turned off. They will instead execute when the calculator is turned on again. If alarms are enabled, they will execute, but the 48 will be turned off immediately afterwards. Note that this flag has no effect when the calculator is on! ADDITIONAL INFORMATION ====================== The codelock is not activated when the HP48 turns itself off to preserve battery. The OFFC user key assignment is sometimes cleared by other pro- grams or actions. Pressing the USR key once or twice (depending on the state of flag -61) or running the ASSIGN program will restore it. If you use an alarm that adjusts the clock (to keep the clock accurate) you should disable alarms with the ALARM key, otherwise you will get unpredictable results. The Gateway library has ID number 873. [Note: this is the same as the ID of the CODELOCK library, also on this disk. Do not have both libraries in memory at the same time! -jkh-] I will not provide source code. ---------------------------------------------------------------- GATEWAY-48 is Copyright Erik Bryntse 1991, 1992. Non-commercial distribution permitted. Use this program at your own risk! ---------------------------------------------------------------- This program has been tested by people with different calculator versions and different software and hardware. Much work have been spent on this. Thank you all who have helped me with this! Please send bug reports, questions, or suggestions to Erik Bryntse SHPRF (the HP User Club of Sweden) Box 15061 S-700 15 OREBRO SWEDEN erikmb@cd.chalmers.se erikmb@etek.chalmers.se