The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


HexEdit - Edit a file in Hexadecimal format

Summary

HexEdit enables you to perform a low level edit of a file - either in hexadecimal or ASCII formats.

Icon

Command Line Format

Usage: HexEdit <File>

Description

HexEdit allows you to edit a file in hexadecimal or in normal ASCII. The data is displayed in both hexadecimal and ASCII. The TAB key switches between hex and ASCII editing modes. When you are editing in hexadecimal, you may only enter hex values ('0'-'9','A'-'F'). In the ASCII editing mode it is possible to use all ASCII keys. The cursor control keys are active in both modes. The Control-Home keys take you to the beginning of the file and the Control-End keys take you to the end. The Page-Up and Page-Down keys move you one page up or down respectively.

The bytes which have been changed are displayed in yellow. You are always prompted before any data is written back to the file. You have the option of discarding the data, saving the data or continuing to edit the data.

When HexEdit is editing a file, you will see a window similar to the following:

When HexEdit is editing a file, the function keys listed below have the following functions associated with them.

F1 - Help

The help for HexEdit is accessed by pressing the F1 key. You will see this dialog box:

F2 - Toggle mask state

The F2 key to toggles the mask state. When masking is on, only normal ASCII characters are displayed. The default is no mask. With masking off, all characters with the exception of character zero are displayed.

F3 - Go to a location

Use the F3 key to move to a specific location within the file. The following dialog box will be presented to you:

Here you may enter a direct address in hexadecimal. This is particularly useful if you want to move to the middle of a very large file.

F4 - Search for data

The F4 key is used to search for a particular sequence of bytes. You may enter data in ASCII text form or in hexadecimal. The Tab key switches between entering data in ASCII and hexadecimal.

When you have finished entering the bytes, press the Enter key. Pressing Escape aborts the search. If you pressed Enter HexEdit will then begin to search for your data. The search performed is case insensitive. If HexEdit finds a match it will display the address at which the match was found, and then wait for a key to be pressed. It will then take you to that address. If no match was found, HexEdit will tell you that it searched to the end of the data (or file), prompt you for a key press and leave you where you were.

F5 - Continue search

If you wish to search for another occurrence of the same data use the F5 key. If no search data has been entered the F5 key will not continue the search. It will prompt you to enter the data and thus begin the search.

F10 - Exit

The F10 and Escape keys exit the HexEdit program. If needed, you will be prompted to save any unsaved data.

Examples

HexEdit charset.dat
HexEdit will edit the sample file provided: charset.dat.
HexEdit C:\OS2BOOT
This will probably fail with the error:
SYS0005: Access is denied.
This is because, by default, the file OS2BOOT is protected by the Read-Only attribute. HexEdit needs write access to edit a file, and if a file is marked as Read-Only you will get this error. Use FA to change file attributes.