home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HEXEDIT
-
-
-
- DOS File Editor
-
-
-
- Version 2.0
-
-
-
- Copyright 1991,1992 by Larry Michaels
-
-
-
-
-
-
-
-
-
-
- Table of Contents
-
-
- INTRODUCTION...................................1
-
- SHAREWARE NOTICE...............................1
-
- REGISTRATION FORM..............................2
-
- NOTES ON USING HEXEDIT.........................3
-
- FILES........................................3
-
- CHANGING FILE READ/WRITE MODE................3
-
- CHANGING FILE HIDDEN ATTRIBUTE...............4
-
- EDITING ANOTHER FILE.........................4
-
- IMPORTING FILES..............................4
-
- DISPLAYING THE DIRECTORY.....................4
-
- CONFIGURATION FILE...........................4
-
- SCREEN LAYOUT................................5
-
- EDITING......................................5
-
- CURSOR MOVEMENT..............................5
-
- SEARCH AND REPLACE...........................6
-
- BLOCK OPERATIONS.............................6
-
- PRINTING.....................................6
-
- FILE TRUNCATION..............................7
-
- REPEAT CHANGE................................7
-
- UNDO.........................................7
-
- SCREEN ATTRIBUTES............................7
-
- HELP.........................................7
-
- DOS SHELL....................................7
-
- LIST OF HEXEDIT COMMANDS........................8
-
-
-
- 1
-
-
- INTRODUCTION
-
- HEXEDIT is a simple, easy to use editor with which you can create,
- view, and edit DOS files in both hex and ASCII formats. I wrote
- HEXEDIT to fill a need which I often have to be able to create and
- edit binary files such as the input and output files for other
- applications which I am developing. After looking through both the
- commercial and shareware markets, and asking other software developers,
- I came to the conclusion that there was no product available for
- editing binary files as easily as text files. I added a few special
- features such as the ability to set read/write and hidden attributes,
- jump to any file offset, search for/replace strings in both hex and
- ASCII formats, insert the contents of another file into the file being
- edited, and truncate the file after the cursor to facilitate specific
- tasks which frequently need to be done.
-
- I hope that you will try out HEXEDIT, and find it usefull. I am
- anxious to receive comments and suggestions from users. Version
- 2.0 includes a few new features not in version 1, as well as a few
- bug fixes. This document describes HEXEDIT's features. While running
- HEXEDIT, help can be obtained by pressing F1.
-
-
- SHAREWARE NOTICE
-
- HEXEDIT is SHAREWARE software. This means that you are free to
- try it out for 30 days to decide whether or not you wish to use it.
- If you decide to use it, you are urged to please send a very modest
- $16 US registration fee, along with any comments or suggestions you
- may have. Your registration will inform me that you are using my
- software, and help pay my rent. Software development is my only
- source of income, so your cooperation in registering will be greatly
- appreciated. A registration form is included in this document, and
- can also be printed out by pressing 'P' from the startup screen.
-
- You are free (and encouraged) to distribute HEXEDIT to friends,
- co-workers, neighbors, etc. with the following conditions:
-
- - This file (HEXEDIT.DOC) is included, and the files are left as they
- are without any modifications,
- - If any fee is charged, it should be minimal,
- - The recipients know, or are informed about, the shareware concept.
-
- I have made a sincere effort to remove all bugs from this software.
- If any bugs are found however, I apologize and request that they be
- brought to my attention. No warranty, either explicit or implied
- is (or can be) made on this software. I assume no financial
- responsibilty for any loss of data, time, profits, or other damages
- resulting from the use (or misuse) of HEXEDIT.
-
- Thank you for trying HEXEDIT; I hope that you will find it useful.
-
- Larry Michaels
- P.O. Box 59379
- Chicago, IL 60659 U.S.A.
-
- A registration form can be printed by pressing 'P' from the startup
- screen. A copy of the form is also included on the following page.
-
-
-
- INVOICE FOR HEXEDIT VER 2.0
-
- Remit to: From:
-
- Larry Michaels _______________________________
- P.O. Box 59379
- Chicago, IL 60659 _______________________________
-
- _______________________________
-
- _______________________________
-
- _______________________________
-
- _______________________________
-
- Phone:_________________________
-
-
- Where did you get your copy of HEXEDIT? ________________________
-
-
- Registration $16US per user Quantity:____ x $16 = ___________
-
- IL residents add 7% sales tax: ___________
-
- Total: ___________
-
-
- Comments:
-
-
- 3
-
-
- NOTES ON USING HEXEDIT
-
- FILES
-
- HEXEDIT will accept any file which can be opened and read by DOS. The
- file name may be supplied on the command line. If no file name or an
- invalid file name is specified, the file "NONAME.###" will be created
- (or opened, if it already exists). If a non-existent file is
- specified, a new file will be created. For files which do not have
- write permission, HEXEDIT will display the file, but will not accept
- any commands to alter it. On the top line, the words "READ ONLY" will
- appear. The read/write mode of the file can be changed to allow
- editing using the Change File Mode command described later.
-
- For files which are not read-only, HEXEDIT automatically creates a
- backup file upon startup. All changes are made to the backup file,
- and the original file is not altered until the user presses a save
- key (Alt S or Alt Z). If HEXEDIT detects upon startup that there is
- not enough disk space to create a backup file, it will open the file
- in read-only mode.
-
- The backup file is given the same name as the original file with the
- file extension ".BAK". If the original file has the extension ".BAK"
- the backup file is given the extension ".BAC".
-
- During an edit session, HEXEDIT may create a temporary storage file
- with the same name as the original file and the extension ".$@!".
- This file is automatically deleted upon exit. If HEXEDIT runs out of
- disk space during a disk write, the user will be informed, and the
- results may be unpredictable. The user should make sure that there is
- at least enough free disk space to accommodate a backup file of the
- same size as the original plus a temporary file of about 120 Kbytes.
- Large block operations will require more disk sapce.
-
- To save the file (ie. update the original file) without leaving
- HEXEDIT, Alt S is used. Alt Z will save the file and exit. Alt A
- will save the file under a new name provided by the user.
-
- HEXEDIT may be exited without affecting the original file (providing
- that Alt S has not been pressed already) by pressing Alt X. If any
- changes have been made during the editing session (or since the last
- save), the user will be prompted whether or not those changes should
- be abandoned. Pressing "Y", will cause HEXEDIT to close without
- saving, while "N" will cause the file to be updated. ESCAPE will
- cancel the request.
-
-
- CHANGING FILE READ/WRITE MODE
-
- As mentioned, HEXEDIT will open both files with read-write and
- read-only permission. The user may change the read/write permission
- mode of the file by pressing Alt M and selecting the desired file
- mode. A read-only file which is changed to read-write will be changed
- immediately to read-write, a backup file will be created, and
- modifications will then be allowed. A file with read-write permission
- which is changed to read-only will not actually be changed until one
- of the save commands are issued by the user. Therefore, changes to the
- file will still be allowed until the file is saved.
-
- 4
-
-
- CHANGING FILE HIDDEN ATTRIBUTE
-
- HEXEDIT provides the facility to set the hidden attribute bit of the
- file being edited. Files with their hidden attribute bit set will not
- be listed by the DOS DIR command nor by many other applications. The
- user may set this attribute by pressing Alt H. When the file's
- hidden attribute is changed, HEXEDIT will indicate the change on the
- top line by placing parentheses around the file name (for hidden files),
- or by removing the parentheses.
-
-
- EDITING ANOTHER FILE
-
- At any time, the user can switch to a different file for editing by
- pressing Alt E. If changes have been made to the current file since
- the last save, the user will be prompted as to whether or not the
- changes should be abandoned. The user will then be prompted to enter
- a file name. If a valid file name is entered, the current file will
- be closed, the specified new file will be opened (or created), and
- editing will proceed with the new file.
-
-
- IMPORTING FILES
-
- HEXEDIT can insert the contents of any file into the file currently
- being edited. When Alt I is pressed, the user will be prompted for
- the name of the file to import. The contents of that file will be
- inserted in the current file, starting at the current offset.
-
-
- DISPLAYING THE DIRECTORY
-
- Whenever the user is in a file name prompt field (import file,
- save as, edit another file), the contents of the directory can be
- displayed by either pressing F7, or by entering a path name on the
- prompt line and pressing ENTER. Disk drive specifiers can be
- included in the path. Up to about 4500 files per directory can
- be displayed. The names of hidden files and directories (ie.
- those which have their hidden attribute bit set) are displayed
- enclosed in parentheses. The upper left corner of the directory
- screen shows the current drive and directory.
-
- While viewing the directory, the arrow keys, PgUp, PgDn, Ctrl PgUp,
- and Ctrl PgDn are be used to move around the directory. The TAB key
- is used to toggle between the directory display and the prompt line.
- By entering a different path on the prompt line, a different
- directory can be displayed. The currently selected file can be
- deleted by pressing DELETE.
-
-
- CONFIGURATION FILE
-
- HEXEDIT reads and writes a startup file named HEXEDIT.CFG. This file
- specifies the screen attributes and the printer setup parameters. Upon
- startup, HEXEDIT looks in the current directory for this file and if
- it is not found there, it searches the DOS path for it. If the file
- is not found, default values are used. Upon exit, HEXEDIT updates
- this file if any configuration changes have been made, or creates a
- new file if none already exists.
-
- 5
-
-
- SCREEN LAYOUT
-
- The HEXEDIT screen is broken into three main sections. The top line
- displays the name of the file being edited on the left side, and the
- Insert/Overtype mode on the right. If the file's hidden attribute bit
- is set, the file name will appear enclosed in parentheses. The bottom
- line normally displays the file offset of the byte at which the cursor
- is positioned. This line is also used to prompt the user for
- information and to display messages.
-
- The main part of the screen is broken into three columns. On the
- left of each row is displayed the file offset of the first byte on
- that line. In the middle are the hex representations of up to 16
- bytes, while on the right, the ASCII character repesentations of
- the same bytes are displayed. The cursor may be positioned on any
- byte in either the hex of ASCII fields. The cursor can be toggled
- between fields by pressing ALT T.
-
-
- EDITING
-
- The actions taken upon a keystroke depend on the current location of
- the cursor and the Insert/Overtype mode. When the Insert mode is set
- and the cursor is in the hex portion of the screen, only they keys
- 0-9, a-f (besides control keys) are accepted. If the cursor is on
- the upper nibble of a byte, a new byte will be inserted with the
- lower nibble the same as the original byte and the upper nibble
- depending on the key pressed. The cursor will then be positioned at
- the lower nibble of the new byte. The next keystroke will set the
- lower nibble of that byte. If the cursor is on the lower nibble of
- a byte when a key is pressed, a new byte will be inserted with the
- upper nibble the same as the original byte, and the lower nibble
- depending on the key pressed. In Overtype mode, the nibble at which
- the cursor is positioned will be overwritten.
-
- If the cursor is in the ASCII field when a key is pressed, a new byte
- will be inserted at the current position. Any byte value (0-255) will
- be accepted in this field. In Overtype mode, the current nibble or
- byte will be overwritten with the new one.
-
- The Insert/Overtype mode can be toggled by pressing the INSERT key, and
- is displayed on the top line of the screen.
-
- In Insert mode, pressing the DELETE key will cause the current byte to
- be deleted. In the hex field, BACKSPACE will cause the previous byte
- to be deleted. In the ASCII field however, since Backspace is a valid
- ASCII byte, pressing BACKSPACE will cause a backspace byte (08h) to be
- inserted. To backspace in the ASCII field, Shift BACKSPACE is used.
-
-
- CURSOR MOVEMENT
-
- The arrow keys move the cursor one byte, nibble, or line at a time.
- Page Up and Page Down will position the cursor one page up or down.
- Ctrl Pg Up moves to the beginning of the file and Ctrl Pg Dn moves to
- the end of the file. The Home key causes the cursor to be positioned
- on the first byte on the current line, while the End key positions the
- cursor at the last byte on the line. Alt T toggles the cursor between
- the hex and ASCII fields.
-
- 6
-
-
- SEARCH AND REPLACE
-
- HEXEDIT allows the user to jump to any given file offset or search for
- a string of bytes. Strings may also be replaced one at a time or
- globally.
-
- To go to a particular byte offset, Alt G is used. The user will be
- prompted for an offset value which must be given in hex. Preceeding
- zeroes need not be entered. Pressing ESCAPE while in the will prompt
- field will cancel the operation while ENTER will execute the operation.
-
- Strings for search and replace may be specified in either hex or ASCII.
- To specify a search string in hex, the F2 key is used, while Alt F2
- is used for ASCII. The keys F3 (hex) and Alt F3 (ASCII) request
- search and replace. When entering a string in ASCII format, to escape,
- backspace, or execute, Shift ESCAPE, Shift BACKSPACE, and Shift ENTER
- resectively must be used since the ESCAPE, BACKSPACE, and ENTER keys
- produce valid bytes which will be included in the strings.
-
- After a match of the search string has been found, the next or
- previous matches may be found by pressing F4 or Ctrl F4 respectively.
-
- HEXEDIT will also search the file to count the number of occurrences
- of a string. The keys F9 (hex) and Alt F9 (ASCII) are used. This
- function works much the same way as a global string replace, except
- that occurrences of the string are counted, but not replaced.
-
- For all string search and replace functions, searching begins at the
- current offset and proceeds in the forward direction. To search the
- file before the current offset Ctrl F4 (find previous) is used.
- Whenever the current offset lies within a selected block when a search
- is initiated, the user will be prompted whether the entire file should
- be searched, or only the block. If the user selects the block only
- option, further F4 (find next) commands will only cause the blocked
- part of the file to be searched.
-
-
- BLOCK OPERATIONS
-
- Any section of the file may be blocked. Blocks may be created and
- resized using Alt B, or by using the cursor control keys while holding
- the Shift key. To copy a block into the block buffer Alt C is used.
- Shift DELETE will cause the block to be deleted and copied into the
- block buffer. To remove the block highlight (unblock), Alt R is used.
-
- Once a block has been copied or deleted, Shift INSERT will cause the
- block to be inserted at the current offset.
-
-
- PRINTING
-
- HEXEDIT can print all or part of the file being edited. Alt P causes
- the entire file be printed, while ALT L prints only the blocked bytes.
- The file is printed in the same format as is displayed on the screen
- with the exception that bytes with values below 20h and above 7fh are
- replaced with space characters in the ASCII field to avoid confusing
- the printer.
-
- The printer port, lines per page, and end of page character can be set
- by pressing ALT O. These values are stored in the startup file
- HEXEDIT.CFG, and read upon startup.
-
- 7
-
-
- FILE TRUNCATION
-
- HEXEDIT provides a fast and simple way of truncating a file. By
- pressing F10, the file will be truncated following the cursor (ie.
- the current byte will become the last byte of the file).
-
-
- REPEAT CHANGE
-
- Single-byte changes can be repeated an indefinite number of times by
- pressing F8. In Insert mode, the last byte inserted or changed (ie.
- the new value) will be inserted at the current cursor position. In
- Overtype mode, the current byte will be changed to the value of the
- last changed or inserted byte. This feature is useful for entering
- multiple instances of special bytes which can not otherwise be
- produced with a single keystroke, such as those entered using the
- numeric keypad with Alt.
-
-
- UNDO
-
- Pressing Alt U will cause the last change to be undone. This works
- for single byte changes as well as replaces and block insertions and
- deletions.
-
-
- SCREEN ATTRIBUTES
-
- The screen attributes may be changed by pressing F5 (foreground) and
- F6 (background). The foreground and background attributes of the
- top and bottom lines (and help screens) are changed with Alt F5 and
- Alt F6.
-
-
- HELP
-
- Help screens can be displayed by pressing F1.
-
-
- DOS SHELL
-
- A DOS shell may be opened by pressing Alt D. Typing "ESCAPE" at the
- DOS prompt while in the shell will return control to HEXEDIT. Be
- careful not to alter the file being edited, the backup file, or the
- temporary file ("xxx.$@!") while in the DOS shell as the results will
- be unpredictable.
-
- 8
-
-
- The following is a list of HEXEDIT commands:
-
- Change Scrn FG color F5 Changes the foreground color of the screen.
- Change Scrn BG color F6 Changes the background color of the screen.
- Change Scrn FG color Alt F5 Changes the foreground color of lines 1&25.
- Change Scrn BG color Alt F6 Changes the background color of lines 1&25.
- Configure Printer Alt O Allows printer parameters to be set.
- Copy Block Alt C Copies the selected block to the block buffer.
- Count Occurrs (ASCII) Alt F9 Counts the # of occurrences of an ASCII str.
- Count Occurrs (hex) F9 Counts the # of occurrences of a hex string.
- Delete Block Shift DEL Moves the selected block to the block buffer.
- DOS Shell Alt D Goes to DOS.
- Edit Another File Alt E Opens a different file for editing.
- Find Next F4 Finds next occurrence of search string.
- Find Previous Shift F4 Finds previous occurrence of search string.
- Goto File Offset Alt G Jumps to to given file offset
- Help F1 Displays help screens.
- Import File Alt I Inserts the contents of the specified file.
- Insert Block Shift INS Inserts the contents of the block buffer.
- Print All Alt P Prints entire file.
- Print Block Alt L Prints selected block.
- Quit Alt X Quits without saving.
- Remove Block Markers Alt R Unselects block.
- Repeat Last Byte F8 Repeats last byte insert/change
- Replace ASCII String Alt F3 Searches for and replaces an ASCII string.
- Replace Hex String F3 Searches for and replaces a hex string.
- Save and Quit Alt Z Saves file and quits.
- Save As Alt A Saves file under specified name.
- Save File Alt S Saves file and continues.
- Search for ASCII Str Alt F2 Searches for a string entered in ASCII format.
- Search for Hex Str F2 Searches for a string entered in hex format.
- Set Block Marker Alt B Sets and moves block start and end.
- Set File Mode Alt M Sets the current file's read/write mode.
- Set File Hidden Attr Alt H Sets the current file's hidden attribute.
- Show Directory F7 When in file name fields displays directory.
- Toggle Field Alt T Toggles between hex and ASCII fields
- Togl Ins/Ovrtype mode INSERT Toggles between Insert and Overtype modes.
- Truncate File F10 Truncates the file after the current offset.
- Undo Alt U Undoes last change/insert/delete.
-
-