Sales

Support

Hex/Binary Editing with VEDIT

"The essential features I like and have missed with
other editors are: VEDIT is fast, allows editing with split screen for hex and ASCII,
allows editing of all characters (incl. ASCII-Null), allows arbitrarily long lines."

Anton Wessel, Munich, Germany

Overview of Hex / Binary editing in VEDIT

This is a short introduction to the basics of hex/binary editing with VEDIT.

Press <Alt-\>, the hot-key for {VIEW, Toggle hex-mode
split}. The left window displays in hex and the right window displays in
ASCII with the newline character(s) visible.

Optionally, press <Alt-=>, the hot-key for {VIEW, Toggle binary/text mode},
to switch to "Binary-16" mode in which 16 characters are displayed per line.
This is usually the preferred mode for hex editing.

To remove the hex-split window, press <Alt-\> again. Or select
{VIEW, Reset}; each file will again be displayed in a single window.

NOTE: Even after the hex-mode split, you can toggle any window into other display modes with
<Alt-D>. For example, you can toggle the ASCII window into other ASCII modes or into EBCDIC.

Press <Alt-D>, the hot-key for {VIEW, Toggle display mode}
six times. (You may find the intermediate modes interesting too.) All
characters in the current windows will now be displayed and editable in hex. The status line displays the absolute position of the cursor in the file.

Press <Alt-D> three more times to return to normal editing.

Using <Alt-D> is a quick way to see what characters are really in your file, e.g.
to see what the newline character(s) are. Note that <Alt-D> does not
modify the file.

Press <F2> to start a search. Select the "hex" mode; this is
automatically selected if the file is being viewed in hex.

Enter the desired hex values into the search string,
e.g. you might enter "3A 6F 0D 0A".
Alternatively, you can use the pattern matching code "|hxx" where 'xx'
is one hex code, e.g. you might enter "|h3a|h6f|h0d|h0a".

NOTE: You can search for the "Null" character by searching for "00".
There are many ways to search for control characters, e.g. CR, LF and "any
strange character".
Search for Control Characters.

Select the menu item {CONFIG, File handling} and change "File type"
to the desired number of characters (in the file) to be printed per line.
Typical values would be 16 or 32.

Select the menu item {FILE, Print}. The file will be printed as you
see it on the screen.

>>> To convert all (binary or ASCII) characters into hex codes:

VEDIT can convert a file into hex codes. For
example, the three characters "abc" are converted into the nine characters "61
62 63 ".

Select the menu item {EDIT, Convert, Binary/ASCII to hex}.

Confirm that you want to convert the entire file. Alternatively, you could
have highlighted a block.

The entire file will now be converted. While this may appear to be similar to
toggling into hex mode <Alt-D>, this actually modifies the file.

>>> To convert hex codes into characters (binary or ASCII):

Conversely, VEDIT can convert a file consisting
of hex code back into characters. For example, the hex codes "74 68 65" are
converted into the characters "the".

The codes can be separated with spaces, but need not be.

Select the menu item {EDIT,
Convert, Hex to Binary/ASCII}.

Confirm that you want to
convert the entire file. Alternatively, you could have highlighted a block.

>>> To convert a file to the format seen on the screen:

VEDIT has many display modes. For example, you can view a file in hex and/or
align the records of a file with fixed-length records. These display modes don't
modify the file. Sometimes, you may want to save the file exactly as you see it
on the screen; VEDIT will then convert or translate the file as necessary.

Display the file in the desired mode, e.g. in hex. (Or display an EBCDIC
file in ASCII.)

Select the menu function {FILE, Wysiwyg conversion}. Enter the filename
for the new file.

NOTE: You will understand this useful function better after
experimenting with it a few times.

>>> For more information on VEDIT's hex editing:

Select "Data/Binary; Hex editing" from the {HELP, Tutorial} menu.

Press <F1> for on-line help and select the topic "Control and Graphics
Character Display"; then page down to the heading "Hexadecimal and Octal Mode Editing".