
       LhA POWER UTILITIES 1.0, BY KARIM BENADDI & DAVIDE PASCA

 





        CHAPTER 1 .............................. SHAREWARE NOTICES
        CHAPTER 2 .............................. INTRODUCTION
        CHAPTER 3 .............................. INSTALLATION
        CHAPTER 4 .............................. INSTRUCTIONS
        CHAPTER 5 .............................. COMBINATIONS
                    






                           SHAREWARE NOTICES

These utilities are Shareware.  You can redistribute them provided you
don't modify the distribution archive and that all files remain intact.
If you like & use them, you are required to send a contribution to:

Karim Benaddi
Via Albano 48N
00179 - Roma
  ITALIA

You can contact me on ST-PIC BBS at +39-6-7842984 300-19200HST, 2 lines,
24 hours a day (leave message to sysop....me!).  You can use the above
addresses also if you have any suggestions, improvements, bug reports,
or if you just want to get the latest version.



                         INTRODUCTION

What's new?  Everthing's new!  I had this idea a long time ago when the
first PPMORE was released followed by PPANIM and PPSHOW.  I didn't like
the PowerPacker compressor but I did like it's decompression utilities.

Since the old Paolo's LHARC 1.30, which was too slow for my idea, and the
first LhA from Jonathan Forbes, it got me thinking.  As the new .LHA
algorithms with FAAAAAST decompression were released, I started to have a
clear picture of what I wanted from LhA.  When version 1.92 was released, I
thought it was good.  Now I'll put these thoughts together....  I hate
imploder, powerpacker, bytekiller, and any other crunchers.  Why?  Because
I love the amiga, love it's multitasking, love PURE programs, but I hate
trashed memory.

LhA doesn't trash memory.  It just creates a special achived format (nothing
in common with decruncher headers and memory trashing) and is much smaller
than any powerpacker/imploder, yet still pure.  So....

WHY LhA POWER UTILITIES?

I asked myself, why not use the pure and polite LhA files like executables?
I then started to put together these simple utilities.

WHAT DO THEY DO?

They just EXECUTE, PLAY, TYPE, or SHOW any .LHA/.LhAH file without the need
to decompress them first!

                     ------------------------------


                            INSTALLATION

1) Decrunch with your old LhA or with your oldest LHARC 1.30 the included
   LhA192.LhAH.  When decrunched, copy the new "LhA" to your C: directory.

2) Decrunch the MPLAY41.LHA file using "LhA X" and copy the MPLAY file to
   your C: directory.

3) Decrunch the SSHOW.LHA file using "LhA X" and copy the SSHOW file 
   to your C: directory.

4) Now decrunch the LhAPOWER.LHA archive using "LhA X" and copy LhAEXE,
   LhATYPE, LhAPLAY, and LhASHOW to your C: directory.

                         ---------------------



                            INSTRUCTIONS

Now you are ready to EXECUTE, TYPE, PLAY or SHOW .LHA/.LhAH files.  Let's
test it out.  From a CLI/Shell prompt, type:

LhAEXE SYS:AVAIL 

(You should have the AVAIL.LHA archive in the your SYS: directory)
If you have the AVAIL.LHA archive in (for example) DF0:ARCHIVES,
you would type:

LhAEXE DF0:ARCHIVES/AVAIL

What do you get?  The same result as if you had used the normal AVAIL
command.  A bit slower, but the avail you've just loaded is an LhAH or LHA
crunched AVAIL that takes up much less disk space and doesn't trash
your memory as Imploder or Powerpacker does.

What's the syntax?

Easy!  Call LhAEXE with it's argument being the name of the archive, which
MUST ALSO BE the name of the file in the archive!  If the file in the
archive has a different name than the name of the archive itself, you must
use an additional argument with LhAEXE.  If the archive where you put AVAIL
(or Dir, List or whatever you want..) is called UTILITIES.LHA, then you
would type:

LhAEXE DF0:ARCHIVES/UTILITIES AVAIL

The result is as follows (the same result as above):

Type Available   In use   Maximum   Largest
chip    923344   116808   1040152   913216
fast   2142280  2051992   4194272  2047824
total  3065624  2168800   5234424  2047824

Powerful huh?

So, if you type "LhA L SYS:AVAIL" you'll get:

LhA 1.92 Archive/Extract utility - Written By Jonathan Forbes
Copyright © 1990, 1991, Xenomiga technology. All rights reserved.

Listing of archive 'sys:avail.lha'

Original Packed Ratio  Date      Time   Type  CRC  Name
-------- ------  --- --------- -------- ---- ------------
    1964   1231  37% 13-aug-88 18:03:22 -lh5- 53AC Avail
-------- ------  ---         1 file(s)

As you can see, there is the file AVAIL in the archive AVAIL.LHA.  And for
example, if you want to call DPAINT with LhAEXE, you first need to put
DPaint into an archive:

LhA -2 A SYS:DPAINT DF0:DPAINT

...and then type:

LhAEXE SYS:DPAINT

...and you're now running Deluxe Paint from an archive without
decompressing first!!!!  In the first case you are going to add the file
DPAINT to one archive that you've called DPAINT and then you will get the
DPAINT.LHA archive.  But LhAEXE is NOT only for DPaint of course!!

You can use it with all amiga executable files that you want!  If for
example, you have a startup-sequence like this:

--------------------------------------------
echo "Workbench disk release 1.3"
echo " "
setclock l
addbuffers df0: 10
FF >NIL -0
Resident CLI L:Shell-Seg system pure add
etc.
--------------------------------------------

...you could alter your startup and save disk space with LhAEXE:

--------------------------------------------
LhAEXE C:UTILITIES echo "Workbench disk release 1.3"
LhAEXE C:UTILITIES echo " "
LhAEXE C:UTILITIES setclock l
LhAEXE C:UTILITIES addbuffers df0: 10
LhAEXE C:UTILITIES FF >NIL -0
LhAEXE >nil: -RAM L:HANDLERS shell-seg
LhAEXE C:UTILITIES resident CLI ram:shell-seg system pure add
LhAEXE C:UTILITIES delete ram:shell-seg
-------------------------------------------

The result is the same as above, but all files are LhA crunched, saving
disk space.  This can be a bit slow for 68000 users but can be VERY useful
for accelerated Amigas, because the .LHA algorithm is nearly instantaneous
on accelerated machines.

The -RAM (or -ram) flag means that LhAEXE will create in ram: the file you
specify in the second argument of the command line.  In this case:

LhAEXE -RAM L:HANDLERS shell-seg

...and you'll obtain RAM:SHELL-SEG (that is a pure file).  This is the same
result as:

LhA X L:HANDLERS.LHA shell-seg RAM:

...but shorter and faster, since there are not as many arguments and no
screen output.

Note that the decrunched LhA files will use double the memory that the file
would otherwise require while decrunching because LhAEXE and the other
utilities will open a temporary file called POWERTEMP in memory that
maintains part of the data of your archive file.  It will USE your
memory not TRASH it.

Now let's continue with examples:

If, for example, you have a file called POWERDOC.LHA (included in the main
archive - the file you are reading) in your SYS:DOCS/ directory, and you
want to read the docs in the archive without decompressing it.  It MUST
have the name POWERDOC.TXT or the same name of the archive plus the .TXT
extension.  You would type:

LhATYPE SYS:DOCS/POWERDOC

And you'll get these docs............

But if you have an archive file in your SYS:DOCS directory called DOCS.LHA
that contains POWERDOC.TXT you would type:

LhATYPE SYS:DOCS/DOCS POWERDOC.TXT

And you'll get these docs again.......

To pause the display of the text file you have to use the SPACE key and
then the DEL key when you want to resume.  If you want to stop the scroll,
type ^C (CTRL + C).  If you want to read multiple files from an archive,
you would type:

LhATYPE SYS:DOCS/DOCS POWERDOC.TXT MYMANUAL.DOC DONALDDUCK.MSG ...etc...

The first ^C will stop the display of the typing sequence.  Let's continue
with the other utilities:

                           --------------

To hear the supplied music module SAM.LHA, you MUST have the utility MPLAY
in your C: directory.  LhAPLAY will load MPLAY and play the module in the
.LHA/.LhAH archive. I decided to use a completed program like MPLAY since it
plays different formats of SoundTracker/NoiseTracker/Startrekker/ProTracker
modules, and also MED/OKTALYZER/FUTURESOUND modules that can be played with
proper LhAPLAY arguments.

So to hear the modules MOD.SAM in the SAM.LHA archive, you would type:

LhAPLAY SYS:SAM

(Just press the left mouse button to gradually and softly stop the music.)

If you don't use arguments, the name of the file in the archive MUST be the
same name as the archive with a prefix of "MOD".  For example, if you
have an archive called KWIK.LHA/LhAH, the module in the archive must have
the name MOD.KWIK

This can be very useful for Sysops that want to hear modules without
decrunching them.  What if the name of the module in the archive does not
have the prefix of MOD.??????......  Let's imagine an archive in
SYS:MODS/ called MYMODULES.LHA and in it, a module called BACH.OKT).  You
would type:

LhAPLAY SYS:MODS/MYMODULES BACK.OKT

And you can hear 8 voice music....

LhAPLAY will use FASTRAM while decrunching modules, and since modules
require chip memory to run, LhAPLAY will not trash or use any module's
memory.

                         -----------------

And at last, now we want to see the picture in the archive called
THUMPER.LHA.  This picture has the name THUMPER.PIC, so the picture must
have the same name as the archive plus the .PIC extension:

LhASHOW SYS:THUMPER

And we will see the picture.  Exit with the ESC key.  The above syntax will
show any IFF or HAM picture.  It will load the utility SSHOW from the C:
directory (supplied in the archive).  And also as in previous examples, you
can use arguments for pictures with different extensions and different
archive names:

LhASHOW SYS:PICTURES/COLLECTION NICEGIRL.IFF

If you want to show .GIF pictures, all you have to do is to replace the
supplied SSHOW utility with your favorite GIF viewer (Showgif and Turbogif
tested) by simply renaming it as SSHOW in your C: directory.  But don't
forget that you can't supply any argument for any picture viewer since they
are filtered through LhASHOW.

                        -------------------


                           COMBINATIONS

The following are some examples of different applications of LhAPOWER
UTILITES.  Here's a scriptfile that will compile your program.c in the
current directory:

------------------------------------------------------
LhAEXE -RAM SYS:LATTICE/LATTICE BLINK
LhAEXE -RAM SYS:LATTICE/LATTICE LC1
LhAEXE -RAM SYS:LATTICE/LATTICE LC2
LhAEXE -RAM SYS:LATTICE/LATTICE LCERRS.TXT 
LhAEXE -RAM C:UTILITIES assign
ram:assign env: ram:
ram:assign include: sys:lattice/compactH
ram:assign lib: sys:lattice/lib
ram:assign LC: ram:
LhAEXE C:UTILITIES delete ram:assign
LhAEXE SYS:LATTICE/LATTICE LC -L program.c
LhAEXE C:UTILITIES delete ram:blink ram:lc1 ram:lc2
-------------------------------------------------------

You may be thinking that this method will be very slow, but just think how
useful it is to run pure programs without trashing memory in this manner,
if you have for example, a 68030.  Imagine that programs with unlocable
hunks such as DPAINT or BBS programs, can be compressed because they will
get their data from the POWERTEMP file that the LhAPOWER UTILIES creates in
memory when you load the packed files.

LhAPOWER UTILITIES are pure, and can be made resident with the AmigaDos
resident command.  (Be sure their pure bit is set.)  In another example,
you may want to make the LhAPOWER utilities resident like this:

-------------------------------------------------------
LhAEXE >nil: -RAM L:HANDLERS shell-seg
LhAEXE C:UTILITIES resident CLI ram:Shell-seg pure add
LhAEXE C:UTILITIES delete ram:shell-seg
LhAEXE C:UTILITIES mount newcon:
LhAEXE C:UTILITIES newshell
LhAEXE C:UTILITIES resident C:LhAEXE pure add
LhAEXE C:UTILITIES resident C:LhATYPE pure add
LhAEXE C:UTILITIES resident C:LhAPLAY pure add
LhAEXE C:UTILITIES resident C:LhASHOW pure add
LhAEXE C:UTILITIES endcli >nil:
-------------------------------------------------------

Heres how my startup-sequence looks:

--------------------------------------------------------
LhAEXE C:UTILITIES stack 50000
LhAEXE C:UTILITIES run >nil: LhAEXE C:UTILITIES setclock l
LhAEXE C:UTILITIES addbuffers dh0: 500
LhAEXE C:UTILITIES addbuffers dh1: 500
LhAEXE C:UTILITIES dh1:bbs/utilities add
LhAEXE C:UTILITIES prompt "-->> "
LhAEXE C:UTILITIES netpnet-server unit 1
LhAEXE -RAM C:UTILITIES assign fms: sys:fms
ram:assign bbs: dh1:bbs
ram:assign xenolink: bbs:
LhAEXE C:UTILITIES cd xenolink:
ram:assign T: sys:t
ram:assign MSG:        xenolink:messages
ram:assign XLOG:       xenolink:log
ram:assign XFIDONET:   xenolink:fidonet
ram:assign XFILECAT:   xenolink:filecatalogue
ram:assign XTEXT:      xenolink:text
ram:assign XBULLETINS: xenolink:bulletins
ram:assign XMENUS:     xenolink:menus
ram:assign XMENUTEXT:  xenolink:menutext
ram:assign XCONFIG:    xenolink:configuration
ram:assign XQUEST:     xenolink:xquest
ram:assign XIN:        xenolink:in
ram:assign XOUT:       xenolink:out
ram:assign XUSERS:     xenolink:users
ram:assign XSCRIPTS:   xenolink:scripts
ram:assign XWAITMAIL:  xenolink:waitingmail
ram:assign doors: bbs:doors
ram:assign DOWNLOADING: xenolink:downloading
ram:assign xmsgdl: doors:msgdl
ram:assign poll: doors:poll
ram:assign ncomm: sys:modem
ram:assign pd: xenolink:downloading/amiga
ram:assign pc: xenolink:downloading/ibm
ram:assign modules: xenolink:downloading/modules
ram:assign pictures: xenolink:downloading/pictures
ram:assign elite: xenolink:downloading/elite
ram:assign text: sys:text
ram:assign prg: sys:prg
LhAEXE C:UTILITIES delete ram:assign
LhAEXE C:UTILITIES run LhAEXE BBS:UTILITIES mt
LhAEXE C:UTILITIES wait 7
doors:xed/xedconfig
LhAEXE C:UTILITIES run LhAEXE BBS:UTILITIES xenolink -i 1
LhAEXE C:UTILITIES wait 4
LhAEXE C:UTILITIES run LhAEXE BBS:UTILITIES xenolink -i 2
---------------------------------------------------------

And it's pretty fast...  But I've got a 68030 at 33mhz :^)

LhAPOWER UTILITES work fine with DirectoryOpus and DirectoryOpusPro
arguments.

               ----------------------------------------



                             THE FUTURE

We are working on the LhAPOWER SHELL, which is powerful beyond your wildest
dreams.  It may or may not be finished...... It depends on how much support
we get for LhAPOWER UTILITIES 1.0.

Send any suggestions, donations, comments to:

                           Karim Benaddi
                          Via Albano 48N
                           00179 - ROMA
                              ITALIA

Or on my BBS in Rome at +39-6-7842984.
You can contact me also at:

                          The Mouse Trap BBS
                       in San Diego, California, USA
                             619-464-2134
                          1200/2400/9600HST
                Over 230 megabytes of downloads for all!

              English documentation edited by Bruce Lawson


======================================================================
Originally this was concepted for LZ and not for LhA, so do not wonder
if there is written about LhA v1.92, etc.
