
		Back-up Tool v 2.6

April 1997

Sjon C Moore
sirjon@gatecom.com
http://www.gatecom.com/~sirjon/hp/


Files in this zip file

BAKUP26.INF:	Back-up Tool's inf file
BAKUP26.TXT:	This file
BAKUP26.LIB:	Back-up tool library
BZ12.ZIP:	BZ compressor.  If you use a compressor from this zip file,
		be sure to rename it to BZ (from either BZ1 or BZ4).


INTRODUCTION:

	I got very tired of constantly backing up my HP's user memory to 
	my RAM card manually.  I was also sick of backing up the libraries
	I have stored in port 0. In class one day, I wrote a few short 
	programs to do the work for me.  I have since decided to expand them
	and share them with others.

	This library will allow you to back-up all of your user memory as well
	as all of port 0 to another port.  It will also back-up your flags and
	user key assignments.  It also quickly recovers your back-ups if you
	corrupt your memory.  Since it backs-up to another port, you must have
	a RAM card. For those low on memory, a BZ compression option is included
	for compressing backed-up libraries.

	I have tried to consider every possibility when testing this program,
	but I am only human.  ALWAYS BACK UP YOUR MEMORY,  whether to a PC,
	someone else's HP, or simply memorize every program, but just make sure
	you have a back-up.  I accept no responsibility for memory loss due to
	the use of this program.

	You may use the programs contained within this library free of 
	charge.  The selling of this program or any of its documentation,
	without my prior consent is forbidden .  Any alteration or changes
	to this program or its documentation, should not be released to the
	public without my prior consent.


IMPORTANT:	

	    *	Version 2.6 adds an auto-recovery feature.  If you get
		the "Try to Recover Memory?" screen, simply answer no.
		This will cause Back-up Tool to automatically launch
		the OOPS program AFTER the usual warmstart.  Read the
		"Recovering a Back-up" section below for details.

	    *	This program has been tested on a GX Rev R.  I
		do not know how it will function on the SX or other
		ROM versions.  You have been warned.  If users with
		other ROMS find problems (or better yet, no problems),
		please let me know at:	sirjon@gatecom.com	

	    *	Back-up Tool will now work if port 2 does not
		exist.  The BAKPAR list is kept in port 2 by default,
		but will be stored in port 1 if 2 is not present.  But,
		you still MUST HAVE A RAM CARD.

	    *	If you decide to use BZ compression, you must provide
		the compressor yourself.  Also, be sure the compressor
		is named BZ (not BZ1 or BZ4).  You can either have it
		within an existing library (such as Hack), or in HOME.
		This is done to save memory, since many users will
		already have a copy available.


UFL:

	The AboutBK program uses font 1 of the UFL library.  You can obtain a
	copy of the UFL from most ftp sites or the software page of my web
	site at:

		 http://www.gatecom.com/~sirjon/hp/software.html

			or from Andre Schoorl's UFL site:
		
		     http://www.engr.uvic.ca/~aschoorl/ufl/


INSTALLATION:

	1)	If you are using version 2.0 or earlier, you must first
		remove it and any previous back-ups before continuing.
		Please see the section below titled "DELETING THE PROGRAM".
		If you are using version 2.2 or later, simply delete the
		old library (see "DELETING THE PROGRAM" below) and replace
		it with version 2.6.  Immediately perform a full back-up.

	2)	Transfer the library (bakup26.lib) to your HP.  If you don't
		know how to do this, check out my file transfer page at:
			 http://www.gatecom.com/~sirjon/hp/xfer.html

	3)	Choose which port to install the program to.  Do not install
		to port 0.  The purpose of this utility is to make recovery 
		of your memory very quick and easy.  If your memory crashes,
		you'll lose the Back-up Tool and the ability to recover your
		memory using this program.  Enter the number of the port you're
		installing to on the stack and press STO.  Warmstart the
		calculator (ON-C), or turn the calc off then back on.

	4)	It should now be attached and ready to go.


Checksum:	#9782h
Bytes:		2691.5
Lib Number:	1695


WHATS IT GOT?:

	
   CNFG		The configuration program.  This will create the BAKPAR list
		in port 2 if it's present, or port 1 if not.
   SAVE		This is the program for saving user mem and port 0 mem.  The
		SAVE program is slightly different from versions 2.0 and earlier.  
		Please read the "Saving a Back-up" section below.
   OOPS		This is the memory restoring program. 
   SAVEALL	This command forces a back-up of user and port 0 memory, user
		flags, and key assignments.
   SAVEFK	Saves user flags and user key assignments into same port as
		the BAKPAR list. 
   RCLFK	Allows the user to reset key assignments and flags to previous
		saved settings.
   UBZ		The uncompressor.
   SW		A nice program that allows the user to change the 
		write-protection setting on a RAM card on the fly.  It was
		originally named SWITCH, but had no documentation, so I 
		can't give credit to the author.
   AboutBK	This is the "about" program.  



HOW DOES IT WORK?:

	For Back-up Tool to work properly, you must do things in the
	proper order.  You must first configure the program (CNFG), then
	save a back-up (SAVE), then you may recall a back-up (OOPS) if
	necessary.  The key is the BAKPAR list which is created by CNFG.
	If this file is corrupted, you must delete it, then re-run CNFG.
	Also, if you decide to change any of the information in the
	CNFG form, you must immediately make a full back-up with the new 
	configuration.  Also, Back-up Tool will not delete your old back-ups.
	If you change the name of your User mem back-up object, or the port
	you are backing-up to, you will need to manually purge your old
	back-ups.


   Configuring the program

	To configure, first remove the write-protection on your RAM card,
	then launch the CNFG program.  If you forget to remove the protection,
	an error message will appear and the SW program will be initiated. 
	Change the switch setting at this time.  You will see three fields.
	The USER MEM field is the name that Back-up Tool will give your user
	memory back-up object. The default is BAKSJ.  The second field, PORT ?,
	tells Back-up Tool where to place the back-up objects. The default is 2.
	The last field will tell the program whether or not to compress 
	backed-up libraries with the BZ compressor.  A check mark enables BZ.
	The default is NO (remember, you must provide BZ if you use this option).
	When done, press OK.  A list called BAKPAR will be stored in port 2 by
	default, or in port 1 if port 2 is not present. Do NOT make changes
	to this list unless you are certain you know what you're doing.  Back-up
	Tool does not perform error checking on the BAKPAR contents.

   Saving a Back-up

	Before saving a back-up object, you must be sure that your card is
	not write-protected. If you fail to do so, an error message will
	appear.  The SW program has been activated, thus allowing you to change
	the setting at this time.  To back-up your user memory AND port 0 memory
	AND user flags AND key assignments, you must enter a 1 onto the stack.
	This will tell the program that you wish to back-up port 0, flags, and key
	assignments.  If the stack is empty, or level one contains an object
	other than 1, only HOME will be backed-up.  This is for speed.  Since
	key assignments, flags, and port 0 libraries don't change often, and
	these tend to be very slow to archive, you shouldn't need to back them
	up very often.  Now press (or enter onto the stack) SAVE.  That's it.
	If you are performing a full back-up, and compressing your libraries,
	the back-up may take some time.  If you are simply archiving home,
	back-up time should be no more than a few seconds.

	If you find placing a 1 on the stack to be a problem, you can use the 
	SAVEALL command to perform a full back-up always.

   Recovering a Back-up

	To recover your memory, either press the OOPS key, or type OOPS into
	the stack and press enter.  This version will attempt to purge port 0
	libraries.  If it cannot delete one (such as Java), it will immediately
	error.  The length of time for restoration depends on the size of the
	back-ups, whether BZ was used to compress your libraries, the number
	of key assignments you have, and the amount of time your warm-starts
	usually last. Note to Java users:  Since Back-up Tool recalls your flag
	settings, you will no longer need to manually start Java.  Also, Java's
	AUTOEXEC program will still automatically run.

	Version 2.6 adds the ability to automatically recover your memory in
	the event you have a memory crash.  If you get the "Try to Recover
	Memory?" screen, answer NO.  After the usual warmstart, Back-up Tool
	will automatically launch OOPS, thus recovering your memory for
	you.  *IMPORTANT* In the event that you have a faulty auto executing
	program (such as AUTOEXEC from Java) that causes a complete memory
	crash, it is possible that you will create an endless loop of
	crash-reset-crash-reset.  In such an event, do NOT answer NO to the
	"Try to Recover Memory?" screen.  Instead, answer YES.  This will
	disable the auto resetting feature within Back-up Tool, and hopefully
	save the memory in your RAM card.



DELETING THE PROGRAM:

	If for some strange reason, you decide to delete this amazing
	program :) simply delete the library, the back-up objects it has
	created, the BAKPAR list, the backed-up flags (FLAGSJ), and the
	backed-up key assignments (KEYSJ).  Follow these steps to
	accomplish this:

		1)  	Enter :&:1695 onto the stack.  Press enter again.
			DETACH, then PURGE.  The library is now gone.
		2)	Enter :&:BAKPAR onto the stack then PURGE.  The BAKPAR
			list is now gone.
		3)	Enter :&:KEYSJ onto the stack then PURGE.  The backed-up
			key assignments are now gone.
		4)	Enter :&:FLAGSJ onto the stack then PURGE.  The backed-up
			flags are now gone.
		5)	Now you must delete the back-up objects the library
			created.  I think you can follow the above examples
			to figure this part out.  Besides, I don't know what
			you decided to call them, or where you put them :)


THANKS:

	I would like to thank the following people for their help with this
	project:

		Jack Levy	For his help with determining a ports write
			    	protection status.
		
		Georg Zotti	For his help with error trapping.
		
		Mika Heiskanen 	For the Jazz library which made this project
				possible.  Also for the BZ compressor.

		Andre Schoorl	For helping with the UFL compliance of this
				program, as well as his many helpful suggestions.

		Nate Morriss	For suggesting the automatic recovery code.


REVISION HISTORY:


	v2.6 (4/24/97)  Upon suggestion from Nate Morriss, I added a segment of
			code to the $CONFIG that will automatically recall your
			saved back-up in the event you have a memory crash.  This
			code was taken from Andre Schoorl's Hack library.  Also
			updated some errors in the bakup26.txt file.


	v2.52 (2/4/97)	Made a slight change in the code in two areas to make Back-up
			Tool work with the Win48 emulator.


	v2.51 (1/14/97) Fixed a bug in 2.5's ability to work from slot 1.


	v2.5 (1/12/97)	Many new features have been added and limitations have
			been overcome.  This version employs the following 
			improvements:

			-	Will accept back-up objects in port 0.  Previous
				versions would not handle anything but libraries
				in port 0.

			-	Will now work if your RAM card is in slot 1 OR 2.

			-	The OOPS command will now attempt to clear port 0
				before restoring memory.  If it is unable (due to
				libraries such as Java), it will error out.  This
				will allow you to type OOPS even with your current
				memory intact, in order to reset your memory to the
				last saved copy.

			-	Will now archive flag settings and user key
				assignments, then recall them.  Previous versions
				left this to the user. 

			-	The internal BZ has been replaced by UBZ, for a
				savings of 1200 bytes.  The user is expected to
				provide BZ in either a library or the HOME directory
				if compression is to be used.

			-	Significant code improvements.



	v2.4 (1/5/97)	This version was greatly due to the efforts and
			suggestions of Andre Schoorl.  2.4 eliminates problems
			with the UFL compliance of versions 2.3 and earlier.
			Coding was further optimized, and error messages were
			reworked to shed about 500 bytes.


	v2.3 (12/27/96)	Maintenance release.  Removed:  UBZ, SAVEHOME command,
			help file (second page of About).  Several small bugs
			fixed, code optimization, and 900 bytes trimmed (that's
			a decrease of almost 20%).


	v2.2 (12/22/96) Added the BZ compression option to version 2.1.


	v2.1 (12/17/96)	(never publicly released) Added the SAVEALL and 
			SAVEHOME commands.  SAVE command now backs-up home
			only, unless a 1 is on stack level 1, in which case
			it backs-up port 0 also.  


	v2.0 (12/1/96)	Converted to Sys-RPL.  Added the SW program.


	v1.1 (10/20/96)	Released about 8 hours later.  Added a routine to
			check for write-protected (or missing) RAM cards.
			Before, you were required to do some clean-up if 
			you screwed up.


	v1.0 (10/20/96)	Initial Release




BUGS, COMMENTS, SUGGESTIONS?:

	Feedback is always essential.  If you have a problem, comment or
	suggestion for improving this program, I'll be glad to hear them.


Sjon C. Moore
sirjon@gatecom.com
http://www.gatecom.com/~sirjon/


