Preface
=======

   ShortRel  and  its  documentation is Copyright (c) Short Software, Prague,
Czech Republic.

   This  archive  can be freely redistributed as long as all of its files are
included   in  their  original  form  without  any  additions,  deletions  or
modifications  (excluding addition of other README-style files and icons) and
no  more  than  a nominal fee is charged for its distribution.  All copyright
notices  in  the  programs  and  accompanying documentation files must remain
intact.   It's especially forbidden to add various '.displayme' files and BBS
advertisements.  This style of distribution is generally known as FREEWARE.

   Special permission is given to Fred Fish to distribute this program on his
"Fish Disks".

   This  software  is  provided  "AS IS" without warranty of any kind, either
expressed or implied.  The author is not responsible for any damage caused by
it.


Description
===========

   ShortRel   loads   the  input  file  (must  be  an  executable),  converts
relocations  (32-bit  to  16-bit  or vice versa), strips debug informaion (if
requested)  and  writes  out  the result.  16-bit relocations use 2 bytes per
each one and 32-bit relocations use 4 bytes.  So conversion of any executable
with  many  relocations  from  32-bit to 16-bit relocations saves 2 bytes per
each  one.   Unfortunately,  many  programs  which  directly  scan  the  hunk
structure  (e.g., Imploder 4.0 or PowerPacker 4.3) don't support these hunks.
If  you want to process a file with 16-bit relocations by any of these tools,
you must convert it by ShortRel back to 32-bit.

   The short (16-bit) kind of relocations can be used only if referencing
the first 64KB of any hunk. If there are larger hunks, both types of relocation
structures are created.

   ShortRel  also tries to squeeze the hunks, so hunks which has nulls at the
end are shortened.  It does NOT do either hunk merging or crunching.

   ShortRel executable is PURE and can be made resident.


Requirements
============

   Kickstart  version 37 (2.04) or higher and ss.library V5.0 or higher (from
package  SSLib*.lha).   The  Special  Support Library is Copyright (c) Martin
Mares, MJSoft System Software.

   Programs converted to 16-bit relocations require V37+ LoadSeg to run.

   If you want to see what is happening, try to use Exemine (from the package
Exemine.lha by Martin Mares, MJSoft System Software) or similar tool which allows
to show the hunk structure of executables.


Usage
=====

   ShortRel  can be run from the CLI or the Workbench.  Arguments can be specified as
parameters  from  the command line or as tooltypes from the Workbench.  Also the file
to be converted can be shift-clicked with the ShortRel's icon.

   Argument template: "FILE/A,TO,KEEPDEBUG/S,RELOC32/S,NOEND/S,QUIET/S"

   FILE/A  -  File for converting.  This argument MUST be specified.

   TO   -  Output  file.   If  not  specified,  the  original  file  will  be
overwritten.   Direct  overwritting over the original file is not recommended
before the converted file is tested.
 -=-=-=-=-=-  I'M NOT RESPONSIBLE FOR ANY DAMAGED EXECUTABLES!  -=-=-=-=-=-=-

   KEEPDEBUG/S  -  Default  is to strip all debug information from the file.
When this option is on, debug information will be keeped in the file.

   RELOC32/S  -  Used for conversion 16bit->32bit.  You'll probably need this
function  only  when  the  functionality  under  V36  (or older) kickstart is
required or when some direct hunk loading software don't support HUNK_DREL32.

   NOEND/S  - Don't produce HUNK_END marks between file section.  These marks
there  should  be  but  the  system  LoadSeg  routine  silently ignores them.
Compatible  with  PowerPacker  4.3  but  not  with Imploder 4.0.  Think twice
before  converting  because  these  files  may  not be readable by future DOS
releases (tested with 40.3)!

   QUIET/S  -  Don't write the final message about size gain.

   If you need to know more about structure of executable files, look at the
documentation of Exemine.


Final words:
============

   Thanks to MJSoft for the program idea and the ss.library.
   Thanks to Pavouk for the ShortRel's icon.

   Send all comments and bug reports to short@k332.feld.cvut.cz.
