From: Erik Bryntse <erikmb@etek.chalmers.se>
Subject:  v04i014:  gateway_eb - Gateway codelock program v2.8 (beta), Part01/01
Newsgroups: comp.sources.hp48
Organization: Chalmers University of Technology, Gothenburg, Sweden
Followup-To: comp.sys.hp48
Approved: spell@seq.uncwil.edu

Checksum:  914719877 (verify with brik -cv)
Submitted-by: Erik Bryntse <erikmb@etek.chalmers.se>
Posting-number: Volume 4, Issue 14
Archive-name: gateway_eb/part01


BEGIN_DOC gateway.doc
Finally, a new version of the Gateway codelock program is
finished. The problems that people reported with v2.7 were
mainly:

1) Gateway crashes when you have a null-named object in the
current path.

2) Gateway will not work OK with alarms that adjust the clock.

3) I don't want to see the copyright message 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!

If I don't hear of any serious problems, I will release the final
version in a few weeks.

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 code.
- 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 string at the end of this message to your 48. Compile
it using ASC->. Store the resulting library with 0 STO. Turn off 
your 48, then on again. You will see a short message when the lib-
rary 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 number 873.

The program ASC->, written by William C Wickes, has been posted 
several times and is available from many FTP-sites.

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
END_DOC

DOWNLOAD FILE IN ASC-FORMAT

BEGIN_ASC gateway.asc
%%HP: T(3)A(D)F(.);
"04B20B1110A074144554751495D24383A0963E101000000ABF00126008963500
[encoded data, 4355 characters]
00094000F30002200083000A60000ECD3F02"
END_ASC

BYTES: #20F3h 2196.5

BEGIN_UU gateway.uue
begin 644 gateway
M2%!(4#0X+45`*[`1`0I'051%5T%9+30X"FGC`0$``*#[`"$&@&E3`)TMX&$C
M):$AZ0)IHP!(+F`P-!0C,T-SN!]4-H+D`@5#0UE%4WDVTLP@_"H0`(/D`@5#
M0UE%4X?[X>\@S0SB.QJ2+I`V#I!C(RLQ@&E#`)TMX&$C0*$QDP("``````!S
M"'P4(ND"::,`="J`Y`(&0T,Q,C,T2"Y0,#24532%Y`((04Q-04Q,3U=(+E#P
M=.54)+42`_X.`A0:,RD0```````PD8!4(C,I$````````&)9+1P2F'%_&3,I
M8)D``````!#@]1N<--+9`AXV(I<9_"H0`#.3`@(``````',(A_OA[R#^#I)C
M(RLQ,"\J@\?ACQG8^Y%C(RLQP*("?P```@("`@)R%$15=!64U4*#HX`RE@)2
M))>V!B(DE^=&-U<&$I.3(Z/@Y^?GY^?GY^<GXX(CYN?GY^?GY^?GAVES`)TM
MX&$C+"H0`0!7<F]N9R%'HT)8&C,ID)D``````(#P<1HY-K(2`Y@V`]#9`AXV
M@H4:DBZ0-@:0+"J$I5$2&I(ND#8*,.PB2"Y@,#04(S-#<[@?ALLQDP(!````
M`````G+IH>\BG2W`H@(5`/#$1@8R]$96AC`JA*4AZ0)I@P##+A)V'OHN(ND"
M:<,`M2\BZ0)I<P#5+[(2`[4OTMD"V/LAZ0)IPP`K,5#](KZCD6,C*S'`W`+_
M`("_>0;X/F&`]/@5$8"`#P4$J`_ZH2_Z(Q!#,:4_`C\G!(J'84LCD[#J`AC3
MVQJ_$`!!CX!808U?#@%#-2?!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