                            Hex Editor v2.4
                            ---------------

First, let me thank those of you who e-mailed suggestions on how to improve Hex.
Even if your suggestion was not incorporated into this version, I no doubt learned
something when I thought about how to incorporate the feature.


*
What follows is an edited version of the original readme. There is a section devoted
to the changes that have been made, and how they work.
*



Hex is freeware.  It works fine for me, but I make no guarantees or take any
responsibility for what happens.  You use this product at your own risk.  If 
there is a problem, let me know, and I will attempt to fix it.

You can do just about whatever you want with Hex.  You can give it to anybody
or upload it to any archive or BBS, provided that the original files as supplied
by me remain intact and no charge is made.

Hex doesn't have to be registered, and you do not need to buy a license to use it.
If, however, you want to send me money, I won't stop you.

Hex may not be distributed with any commercial product without a prior license
agreement with me.  If you want to distribute Hex with free products, go ahead.

Hex was written in C and compiled with Borland Turbo C++.
Minimum requirements are a 386 running DOS 5.0 (should work with 3.3), and it
will run under Windows 3.1 & 95.  I have not tried Hex with NT, but I have been
informed that it will work.

I wrote Hex because I needed a portable binary editor that could handle very
large files.  At the same time, I wanted some basic functionality like 
searching and jumping (and now deleting and inserting!).


I hope you will find Hex to be a useful tool.


Features
--------

- Files up to 2 gigs in size can be edited
- Unsaved changes are highlighted (including deletes)
- You can undo changes in the order they were made, or you can undo
  a specific change
- Current address is displayed
- Current byte, word, and dword are displayed in hex, decimal (signed and unsigned),
  octal and binary.
- You can jump to any address in the file
- Pop-up ASCII Character Table can be viewed at any time.  Codes are given
  in hex, decimal, octal, binary, and displayed as a character
- You can search for a hex sequence or an ascii string (case sensitive or not)
- Calculate the Hex/Decimal/Octal/Binary equivalent of a number
- If a file is read only, you can view the file without making changes
- Files can be resized (insert/delete bytes)
- Hexdump files


  Changes to the Original Release
  -------------------------------

1 The ability to delete and insert bytes has been added to this version.  Many people
  felt this was the major shortcoming of Hex, and I hope the solution I have come up
  with will work well.

  Deletion (DELETE) is treated like an edit, and will be highlighted (YELLOW).  The 
  deletions are not written to disk until you save the file.

  Insertion (INSERT / ALT-INSERT) works differently.  Insertion can only be done on a 
  file that has no outstanding changes, and it modifies the file by inserting however
  many bytes you wish.  The bytes inserted have the value of zero, and can then be 
  edited to any value needed.  There is a limit to how many can be done at a time, but
  this is because of the size of internal buffers that are used to read ahead in the 
  file to make sure that nothing is overwritten.  For example, if the limit is 3000 
  bytes, and you needed to add 5000 bytes, you would have to add 3000 bytes and then 
  add 2000 bytes.  Using Insert will insert the bytes AFTER the current cursor location.
  Using Alt-Insert will insert the bytes BEFORE the current cursor location.  I added
  the Alt-Insert because of the special case of inserting at the beginning of the file.

  A side-effect of adding insert is Hex's ability to now open 0 length files.  
  Previously, Hex would terminate if you tried to open a 0 length file, because there 
  was nothing that the program could do.  Hex will only terminate if an unexpected
  error occurs at start up.


2 Hexdump (F8)  This feature gives you the ability to hexdump the file you are editing
  to a text file. 


3 The hexadecimal, decimal (signed and unsigned), octal, and binary values of the current
  byte, word, and double word are now displayed at the bottom of the screen.  It was
  suggested that this would be a helpful addition to the program, and I agree.
  Please note that the Little Endian convention is used.  
  This means that if the following hex sequence is contained in a file:  02 3A 4F 2B  
  the byte is 02, the word is 3A 02, and the double word is 2B 4F 3A 02
  Please also note that the signed decimal value appears in parenthesis.


4 In addition to being able to search with the F5 key, Shift-F5 will allow for case
  insensitive searches from the ASCII area.  Shift-F5 will have no effect from the 
  Hex area.
  Alt-F5 will repeat the previous search, provided that you are in the same area (hex
  or ascii).  IMPORTANT - The repeated search begins at one location past where the 
  previous search took you.  So, even if you move the cursor, Alt-F5 begins from the
  last spot, and it does not wrap around to the beginning of the file.


5 If you attempt to open a file that does not exist, you will be asked if you would
  like to create the file.


6 I have been informed that Hex will work on NT.  It was requested that the program
  offer the ability to be configured to display in 43 & 50 line mode.  Unfortunately,
  because of the way certain values were hardcoded, this change was not feasible at 
  this time.


7 The Limitation Section of the readme file (see below) has been edited in reference 
  to the number of changes that can be made before a save is needed.  Originally, I 
  placed the number at approximately 4500.  It is now approximately 4200.  This is 
  because of adding the Delete feature, but I think it is well worth the trade-off.



  BUG FIXES
  ---------

  In the original version, if you went passed address 0x8000 and moved the cursor 
  over an edited BYTE, the highlight would disappear.  This has been fixed.  (For 
  those of you who noticed that 0x8000 is decimal 32768, the answer is yes, I forgot 
  to cast a 16-bit short to a 32-bit integer in that portion of code.  Cut and paste 
  can be a useful tool, but sometimes ...)



Limitations
-----------

All the edits that are made (including deletes) are stored in the internal heap
of the program.  This means that there are no temporary files, and this is partly 
what gives Hex the ability to work with files that are up to 2 gigs in size.  
However, this limits the amount of editing you can do before a save is necessary.  
I don't really think this is a problem, because you can make approximately 4200 
changes to a file before you will run out of heap space.  Even once you run
out of space, the program won't crash.  A window will pop up explaining that
you must save your work before making any further changes (saving frees up
the memory that the changes are temporarily stored in).  Even if you decide
not to save, you can still browse, search, and jump around the file.


Usage
-----
hex <filename>
    or
hex


Special Keys
 -----------------------------------------------------------------------------
 |      KEY     |                     FUNCTION                               |
 |----------------------------------------------------------------------------
 |              |                                                            |
 |      TAB     |            Toggle between HEX and ASCII                    |
 |              |                                                            |
 |      F1      |                       Help                                 |
 |              |                                                            |
 |      F2      |                   Save Changes                             |
 |              |                                                            |
 |      F3      |               Goto Specified Address                       |
 |              |                                                            |
 |      F4      |            Display ASCII Character Table                   |
 |              |                                                            |
 |      F5      |             Search from current position                   |
 |              |              HEX area -> Find HEX Sequence                 |
 |              |              ASCII area -> Find String (Case Sensitive)    |
 |              |                                                            |
 |   Shift-F5   |             Search from current position                   |
 |              |         ASCII AREA ONLY -> Find String (Case Insensitive)  |
 |              |                                                            |
 |    Alt-F5    |  Repeat the last search one position past last occurence   |
 |              |                                                            |
 |      F6      |           Decimal/HEX/Octal/Binary Converter               |
 |              |                                                            |
 |      F7      |                   Undo Last Change                         |
 |              |                                                            |
 |   Shift-F7   |             Restore (undo) Selected Change                 |
 |              |                                                            |
 |      F8      |                       Hexdump                              |
 |              |                                                            |
 |      F9      |                        About                               |
 |              |                                                            |
 |    Delete    |               Delete the current byte                      |
 |              |                                                            |
 |    Insert    | Insert bytes into the file (inserts after current position)|
 |              |                                                            |
 |  Alt-Insert  |         Insert before the current position                 |
 |              |                                                            |
 |     ESC      |                  QUIT (No Save)                            |
 |              |                                                            |
 -----------------------------------------------------------------------------


How to Install
--------------

Put Hex in a directory on your computer or run it off a floppy drive.


Contacting Me
-------------

Questions or Comments?
  Don't understand one of the features?
  Think Hex needs another feature?
  You found a bug?!

Marc Bellusci
marcjb@yahoo.com
