



              ͻ
               HEXADECIMAL EDITOR by Thuan-Tit Ewe 
              ͼ


                Copyright (C) 1990 by Thuan-Tit Ewe.
              Please read the copyright notice below.



Ŀ
 Introduction                                                       

Heditor is a manual,  interactive binary file  editor that lets you  edit
both hex and in ASCII.  It was written to  fill the need for  hexadecimal
editors that will work only with disk sectors but not files.


Ŀ
Operation of Hexeditor                                              

  F1    Help key
  F2    Brings out pull down menu
  F9    Switches between files
  Tab   Switches back and forth between hex and ASCII
  Ctrl-Left &
  Ctrl-Right Moves the page up or down with skip increments.
  Esc   Returns to DOS prompt or exit


Ŀ
 Menu options                                                       

  File
  Option
  Setup
  Structures
  Help

These are the 5 main pull down  menus. The operation of these menus  will
be describe later.

  File option:
    Open, Chain, Switch, close, lseek, write, shell, eXit.

    Open: Use this  option to open  files to edit.  The opened file  will
replace the current opened file which  is closed. To open a file  without
closing  the  current  file,  use the chaining command below.

    Chain:  Opens  another file without closing the current file. You can
then flip back and forth with the  F9 key. Heditor supports a total of  8
opened files or available file handles which ever is less.

    Switch: You can also use this option to switch between files.

    Close: Close current  file. If you  have opened  only one file,  this
option is null.

    lseek: Seek to different position in the file.

    Write:  Write the current block in to file. Remember heditor does not
automatically  write the edited file. You this option when you  are happy
with the edit and before  moving to the next  block or page. If you  exit
heditor, you WILL loose your changes.

    Shell:  Shell   commands  from   the heditor.  This program uses  the
swapping mechanism to swap itself out  of memory before execution of  the
shell. The swap drive is either  the current drive or the path  specified
in the "TMP" environment variable.

    Exit: You this option to exit  the current session of heditor or  use
the <ESC> key whichever is more convenient.


  Option:
    String: Displays and allows you to edit with the line editor a string
terminated with null.

    Short: Displays and allows you to edit the next 2 bytes as short.

    Long: Displays and allows you to edit the next 4 bytes as long.

    Open Struct File: A structure file can be set up to  instruct heditor
to display certain fields in  structure. Currently the heditor will  only
break up field from the top of the block. The cursor position is ignored.
You the skip to the position you want to break using Crtl-left  and Crtl-
Right along with the skip increments.

Some field are not displayed properly and currently does not allow you to
edit the fields directly.  Future releases may fix  this. Tell me if  you
really, really want this feature.

    String search:  Search  for string  in  the  file. To  specify  ascii
character, use  quotes in  order  as not  to  confuse the  simple  minded
parser. For example,  to search  for "Hello",  type in  exactly with  the
quotes, "Hello".  If you want to search for "Hello" followed with a null,
enter this:

"Hello", 0

The search mechanism will search from the beginning of the current block.
To continue searching, page to the next block and search,   otherwise the
search would have found the current one. Will be fixed in later versions.

    Browse file: The option allows you to use the integrated file browser
to browse text  files. The  browser will browse  both UNIX  and DOS  text
files correctly. The browser allows you to browse more than one  file and
flip between  them for  you to  compare files.  See Appendix  B for  more
details.

    Ascii table: A simple minded ascii  table along with hex, octal,  and
mnemonics and the characters itself.

    Calculator: See appendix for calculator operation.

  Setup: Skip: This  is the  skip value whenever   you  use crtl-left  or
crtl-right. It is set by default to 24, which is a line, so when you type
crtl-left if moves the block  one line up and  likewise one line down  if
you type crtl-right.

  Structures: If  you  have  entered  a  structure  file.  The  names  of
structures will  appear in  this menu  and you  can select  to break  the
current page into whatever  structure you want.  Use "sample.str" to  see
how a structure  file is written.  There are  also several constructs  in
sample.str that may not look like C. Those are constructs to help heditor
break the structure and  format the print.  Most of those constructs  are
parsed but not honored. Future versions may correct this.

  Help: This  option  gives you  the  version  number of  heditor  you're
running  and  also  licensing  information  regarding  the  use  of  this
software.


Ŀ
 Working with the line editor in heditor                            

  The build line editor  comes up every time  you are prompted an  option
that requires  you to  type. More  often than  not, a  default string  is
already sitting there, if you do not want the string, type any  key other
than the usual editing key and the default string is discarded.

  Insert, left and right arrow keys work as you would expect them  to and
crtl-left and crtl-right will skip  recognizable words. If you're at  the
end of the line, the display will horizontal scroll as you time.

  The default is  setup as  non insert  mode and  you can  shift it  into
insert mode by pressing the Ins key.

  Press enter when you're  though editing or Esc  if you want to  discard
the operation.


Ŀ
 Working with a mouse                                               

  You can use the  pull down menus  with a mouse.  The mouse driver  must
first be installed. To  invoke menus. Move mouse  cursor to the top  line
and press the left mouse button. You can now hold down the button to view
all option menus and select operation.

  Since the mouse  support is  only partial, certain  operations may  not
work with the mouse. Future releases may fix this.


Ŀ
 Appendix A                                                         

Calculator: Pop up calculator for heditor.

Usuall programmers' calculator with
  o       Base conversion to and from hex, oct, dec and binary
  o       Constant calculation
  o       Memory
  o       Shift operations
  o       Logical functions like and, or, xor, neg
  o       Shift operations for shifting right and left

Keys:
  Alt-H Converts current value into hex
  Alt-O Converts current value into oct
  Alt-B Converts current value into binary
  Alt-D Converts current value into decimal
  Alt-F To set number of decimal place. See note.

  m     Store current value in memory
  r     Recall value from memory

  0-9.  decimal numbers
  -+/*  Mathematical operations
  ^|&~  Logical operations
  <>    Shift operations. Will shift right or left according to the
        arrow.
  <Esc> Gets out of calculator
  <Backspc> Deletes the previous digit

Note:
  To set the number of decimal places, first enter Alt-F followed by
a number. For example, <Alt-F> <2>  will set the number of decimal  place
to 2.

Limitations:
  All operations are done either in double or long, which means this will
be a limiting factor to the calculator.


Ŀ
 Appendix B                                                         

  The file browser is a mini environment for browsing of text  and binary
files. In the browser this keys are activated:

  F2            Flips the browser from text->binary->hex->text....
  F3            Cycle through files
  UP            Scroll up one line
  DOWN          Scroll down one line
  Crtl-left     Scroll left
  Crtl-right    Scroll right
  Esc           Returns to the hexeditor

  The cursor is sitting on a command interpreter that lets you search for
strings. To search for "hello" for example just enter:

  "hello" <ENTER>

  This will search for the first occurrence of "hello"

  You can also browse another file while browsing the current one and you
do this by type

  f <filename>

  on the command line.

  To return to the hex editor, press the <Esc> key.


Ŀ
 Appendix C                                                         

  Incompatibilities:
    If you're using nnansi.sys, "cls" (clear screen) first before
    executing heditor. Heditor does NOT use BIOS for screen access
    therefore bypassing nnansi. Future revisions will correct this.

  Problems:
    If you have any questions or comments drop a line to,

      Thuan-Tit Ewe
      P.O. Box 1016
      Capitola 95010


Ŀ
 Appendix D                                                         

Files:

SAMPLE.STR          Sample struct file.
HEDITOR.DOC         This document

In previous version
SCAL.MAP            Map file for calculator
                    Current versions has this file inlined in the
                    binary.

In DOS version
HEDITOR.EXE         The real mode editor

In OS/2 version
HEDITORP.EXE        Both protected and real mode versions of the
                    editor are combined into a same executable.


ͻ
 Technical data                                                     
ͼ
   C  source   compiled  with   Microsoft  C  v5.10 and assembler  source
assembled with Microsoft Assembler v5.10.

   The  editor  has been successfully  ported with  all it's grandeur  to
OS/2,  Microport   UNIX  System  V Release 3.0 and  Release 2.0 and  UNIX
System V Release 3.2.


ͻ
 Copyright                                                          
ͼ
Thuan-Tit Ewe and CompuTech Software Systems disclaims all  warranties as
to  this  software,  whether   express  or  implied,  including   without
limitation to any  implied warranties of  merchantability, fitness for  a
particular purpose, functionality or data integrity or protection.

This  software   has  NOT   been and WILL NOT  be released to the  public
domain.

You're  authorized   to  make   copies  and   use this software only  for
noncommercial  purposes   and provided  that no fee  is charged for  use,
copying or distribution, nor the program modified in any way.


      
        
        
              
                
          
               This software is Copyright 1988-1990
                  Thuan-Tit Ewe
        
