foucher@caen.engin.umich.edu (Bradley S Foucher) (02/21/91)
Greetings, A few weeks ago, someone posted a question as to whether or not libraries could be archived to a PC when ARCHIVE was used. Obviously, ARCHIVE doesn't do this. This program, called ARCHER, does. It requires a list of libraries (to be described in more detail later) and recalls them, then stores them in a list before archiving. The accompanying program, RESTARC, which is run after RESTORE'ing the Backup HOMEDIR, unpacks the libraries and STO's them where they were when you ARCHER'd. You are then instructed to turn off and then turn on you calculator to install the libraries.NOTE: Apparently, not all libraries install themselves when you turn the calc off, then turn it back on. These libraries will have to be ATTACHED. This program does not do this, but can be modified to do so. In order for this program to work, you must create a list of your libraries with the name 'LIBSLIST' in the following format: { (:port#:library#)1 (:port#:library#)2 ... (:port#:library#)n } An example 'LIBSLIST' is included in the directory at the end of this post. It contains the correct sequence for Eric Bryntses Gateway and Bill Wickes' Strange Case 998 libraries. You can either use this list (which will work correctly for you only if you have those two libraries) or you can make your own. The ARCHER program recalls your libraries and stores them in a list called 'LIBSTO', then executes ARCHIVE. Before you execute ARCHER, you should have your computer ready to receive the file. After the ARCHIVE is done, it erases 'LIBSTO' - you don't need it anymore. I've set the name of the target file on the PC to ARCMEM, but you can change this too. When you need to restore your memory, simply download the file ARCMEM (or whatever you've named it) and type RESTORE, like normal. The REST directory will appear with the rest of your files. Select that directory, then press the 'RESTARC' menu key. The 'LIBSTO' file, which was created by ARCHER, will be used and PURGE'd. You will then be instructed to turn your calc off, then on again. You may have to attach some libraries by hand or alter 'RESTARC' so it will. If you have any questions, feel free to email me... Save the following under 'REST' and download to your calc... %%HP: T(3)A(D)F(.); DIR RESTARC \<< 1 LIBSTO 1 GET FOR L LIBSTO L 2 * 1 + GET LIBSTO L 2 * GET STO NEXT 'LIBSTO' PURGE "TURN CALC OFF" "THEN BACK ON" "TO INSTALL LIBRARIES" \>> ARCHER \<< -40 CF LIBSLIST SIZE \-> siz \<< siz 1 siz FOR L LIBSLIST L GET DUP OBJ\-> SWAP DROP STR\-> SWAP RCL NEXT siz 2 * 1 + \->LIST 'LIBSTO' STO \>> :IO: ARCMEM @ Target file for PC... ARCHIVE @ You can change this if you like 'LIBSTO' PURGE \>> LIBSLIST { :0: @ Example LIBSLIST - you may need to 873 :0: 998 } @ alter this to match you configuration END @ of libraries Brad Foucher The University of Michigan Nuclear Engineering Dept. foucher@caen.engin.umich.edu
sburke@jarthur.Claremont.EDU (Scott Burke) (02/22/91)
Hi. I would make one suggestion for ARCHER--namely, that it be given some more intelligence. For someone on a tight RAM budget, it is not going to be possible to make copies of all the libraries in a new directory/file for transmission during backup. I would suggest that ARCHER scan the ports with PVARS and automatically loop through, recalling a library to the stack, then purging it from the port, then storing it in a variable. Unless you are incredibly short of RAM, this method will work without any user manipulation or intervention. Then continue on as before, backing up all the data (since the libraries are now stored in variables). Modify the RESTORE version of ARCHER to figure out where to put all the libraries, and so on. Scott. sburke@jarthur.claremont.edu