
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   +                                                      +
   +        GEMHEXED hex file editor version 1.02         +
   +        Freeware, August 1996 by Mark Slagell         +
   +                                                      +
   +            Based on XXED by Jim Charlton             +
   +       Used by permission, all rights reserved        +
   +                                                      +
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++


 What it is
 ==========

GEMHEXED is a GEM-based hex file editor for Atari ST/STe/TT/Falcon
computers.  It allows you to view, create, and edit files of any
format, and runs in any resolution.


 Loading and viewing a file
 ==========================

To load a file, select 'Open...' from the 'File' menu, then choose a
filename using the fileselector.  The chosen file is loaded and its
contents appear in a resizeable, scrollable window.  Each line of the
window shows sixteen bytes of the file in hex and ASCII form.  The
title line of the window shows the filename.  Immediately to the left
of the filename a small triangle appears; it indicates that the window
is in 'protected' mode, so it is not possible yet to edit the file. 
By default, protected mode is engaged whenever a new file is loaded,
though you can change that if you wish (see "Configuration").

Movement around the file using the mouse is accomplished in the ways
you expect if you are used to the GEM environment.  From the
keyboard, you can use arrows alone to move by row or column, shifted
vertical arrows to move by page, shifted horizontal arrows to move to
the start or end of a line, <Home> to move to the start of the file,
and <Shift>-<Home> to move to the end.

Additional files may be loaded simultaneously.  Each is displayed in
its own window.  As many windows may be open as your operating system
will support.


 Editing a file
 ==============

There are two cursors in each window, one in the hex area and the
other in the ascii area.  When one is active, appearing as a filled
rectangle, the other is inactive, appearing as a hollow box.  To
toggle between hex and ascii modes, either click in the desired area
of the window or press <Esc>.

As with most text editors, you may edit either in 'insert' or
'replace' mode.  The height of the active cursor indicates which mode
is in effect: full character height means replace mode, half height
means insert mode.

In hex mode, enter a byte into a file by placing the cursor where you
want it and typing a two-digit hex numeral.  The first time you try
this, you will be warned that the window is in protected mode; if you
choose to proceed, no further warning will be given.  You can avoid
the protected-mode warning by turning off the protect flag first via
the 'Edit' menu.

In ascii mode, enter any alphanumeric character by typing its key. 
Most key combinations not assigned to some other purpose in the
program are legal entries in ascii mode.

Examples:

  key combo    hex value
  =========    =========
   ^A - ^Z      01 - 1A  (only when menu is configured to use alt key)
    ^Esc          1B
     Tab          09
    Return        1D
   ^Return        0A  (linefeed)
     ^.           0E  (left half of fuji symbol)
     ^/           0F  (right half of fuji symbol)


Cut, Copy and Paste all work in conventional ways via a cutbuffer in
memory.  You can mark a block by dragging the mouse pointer from its
start to its end (or vice versa), or invoking the "Mark start" and
"Mark end" menu items after positioning the cursor.  The GEM system
clipboard is not (yet) supported in this version; but you should find
it possible to pass data between multitasking applications using "Save
as" and "Merge".

In replace mode, "Paste" overwrites rather than inserts.  Since that
makes it the complement of "Copy" rather than "Cut", you are prompted
to switch to insert mode whenever you cut in replace mode.


 Creating a new file
 ===================

To create a new file, select "Open..." as above, then type a filename
not currently in use.  A window with that name in its title line will
appear, ready for ascii text or hex data entry.  It begins in insert
mode with the protect flag off, and in ascii or hex mode according to
the global configuration flag.


 Configuration
 =============

There are six global switches in the "Configure..." dialog:

1. After any cursor movement, especially a search, a flashing cursor
is easier to locate than a solid one.  In GEMHEXED the cursor only
flashes a few times, then goes solid after a short period of no input.

2. Jump scrolling speeds up screen response somewhat when you are
holding down one of the unshifted vertical arrow keys.  This may be
helpful on 8mhz machines, or those without software screen
accelerators (NVDI, Warp 9, Turbo ST, etc.) installed.

3. By default, menu items are selected by pressing <Control> along
with the key shown in the item text.  Configuring the menu to respond
to <Alt> frees up some <Control> key combinations for ascii entry.

4-6. The configuration switches for ascii/hex, insert/replace, and
protect/edit are global defaults; they affect only files loaded after
exiting the configuration dialog.  Each window has its own switches
for these options.

Saved settings go into a file named XXED.INF in the current working
directory, and are reloaded the next time the program runs.  Along
with the switches listed above, the case sensitivity flag from the
search dialog is saved in the configuration file.


 The command line
 ================

If you place one or more filenames in the command line when starting
GEMHEXED, the corresponding files are immediately loaded.  The
following switches are supported as well, and may appear anywhere in
the command line: -a (ascii), -h (hex), -i (insert), -r (replace), -p
(protect), -e (edit), and -n (noprotect; same as -e).  These set the
global switches described above.

Consider the command line "foo.dat -ae foo.txt".  Both files are
loaded on program entry.  FOO.DAT's window flags are set according to
the last saved configuration.  FOO.TXT's window is in ascii mode, with
the protect flag off.

More simply, any file icon may be dragged onto GEMHEXED.PRG's icon
from the desktop; multiple icons may be dragged together if your
desktop supports it.


 Revision history
 ================

v1.02, August 1996:
  1.  Moved position/length display from menu bar to window info line;
      changed these from decimal to hex format.
  2.  Added absolute jump to hex position feature.
  3.  Removed a couple of less useful features to save space and
      simplify the menu structure.
  4.  Relaxed restrictions on window resizing.

v1.01, October 1995:
  1.  Now understands AP_TERM message from dispatcher.
  2.  Added trap for undefined search string.  (This was present in
      XXED, and I inadvertently had removed it.)
  3.  Fixed bug: null bytes were not always being properly displayed
      in the ascii half of the window.

v1.00, August 1995: first release.


 Credit where credit is due
 ==========================

This program is based on Jim Charlton's excellent XXED editor, and is
revised and distributed under this name with his permission.  Please
direct suggestions and bug reports only to me; I've reworked most of
the code, so whatever problems exist in it are probably my doing. 

Use GEMHEXED at your own risk.  I accept no responsibility for the
consequences of its use or misuse.


    Mark Slagell           (sluggo@ames.net)
    3716 Ross Road
    Ames, IA  50014
