HEXDUMP

PURPOSE   OPERATION   COMMAND LINES   OPTIONS   RELATED PROGRAMS


Author: Dan Mares, dmares @ maresware . com
Portions Copyright © 1998-2026 by Dan Mares
Phone: 678-427-3275
Last update: 2026-12-02, ver: 26.12.02

This is a command line program.
MUST be run within a command window as administrator.
DO NOT attempt to run this from the RUN menu.
ALSO: remember when entering paths with spaces, they "need to be quoted".


top

PURPOSE

	HEXDUMP:    Is designed to display a file in 

   Hexadecimal                     and           Ascii format.

20496E74 726F6475 6374696F 6E20746F  |    Int rodu ctio n to  |   32
20446967 6974616C 20466F72 656E7369  |    Dig ital  For ensi  |   48




top

OPERATION

This Hexdump program will take a file and print the hexadecimal equivalent of the characters in the file. The program will take wildcard inputs.

It prints 16 characters per line in groups of 4 as shown above.

After it prints the hexadecimal it spaces, and proceeds to print the ASCII equivalent if it is a printable hex character. If it is not a printable hex character, the program prints a dot “.” in the position.

The program then lists at the right side of the line the character count of the last character of the line. The first character of the file is naturally considered to be 1. So there will be 16 characters per line.

Most unprintable hexadecimal characters have values less than 0x19 for those of you used to looking at hex notation.

A common unprintable character often seen is 0x0A, which is used as a line feed or newline character.

The cursor highlights characters on the file pertaining to locations in the data file. The cursor can be moved via the keypad keys, backspace, tab, arrow, or Wordstar (control  ^e,^s,^d,^x) diamond keys.

In the lower right corner of the screen is printed the current position of the cursor. The is very helpful when determining positions(displacements) of certain characters.

The carriage return will get you the traditional next page of data, while the space bar will forward the display one line at a time. (NOTE: On some systems the space bar will actually cause the display to disappear except for the last line of the screen.)

The escape key or control C (^C) will end the program. Escape ends but does not clear the screen, while control C will clear the screen and home the cursor.

You also have control of the page up, page down, home and end. If you preface an arrow key with a number from the keyboard(not keypad) it will multiply the cursor movement by that many lines. The maximum is a single digit move of 9 lines.

You can also use the Wordperfect shortcut (home home up-arrow) and (end end down-arrow) to get to the beginning and end of the file.

ENHANCMENTS:

Some of the items described below may no longer be included. Test the items to determine if they fit your needs.

December 2026 Hexdump was rebuilt for evidentiary viewing, meaning it now resets the NTFS last access date of files being viewed. This is a useful enhancement when an investigator needs to view a file and not alter the last access date of evidence.

Some subtle enhancements made to the HEXDUMP program which are:

An additional counter in the lower right hand corner of the screen just above the one which indicates the current file position. This additional counter shows the cursor position relative to the 1st character on the screen. So no matter where you are in the file, this counter references screen position. This is useful when the 1st screen character happens to be the start of a record.

Another enhancement tied to this additional counter is the ability to reset this counter. When the cursor is placed on a character and the ‘r’ key is hit (reset) this second counter is reset to zero. From then on, that character is counted as zero. This is especially useful when locating the beginning of a record, resetting the counter (r), and then moving the cursor to another character location and have it automatically calculated for you.


top

COMMAND LINE

C:> hexdump  infile  -e
/* EBCDIC conversion*/

C:> hexdump  infile  -p
/* pause after each page*/

C:> hexdump  infile  -pe   /* combined both above*/

C:> hexdump  infile  -z
/* start count at 0 */

Here is a sample of what the program will deliver.

50726f67 72616d2e 2e2e2e2e 2e2e2e2e |Prog ram. .... ....| 16
2e2e2e2e 2e2e2e2e 2e46696e 64726563 |.... .... .Fin d re| 32

Notice that the 0x0a’s are represented as a “.” dot(period) on the right side of the screen. They are unprintable so they have been represented by the dot.


top

OPTIONS

-d + #:   Starts the processing # bytes from the beginning of the file.

-D + #:  Starts the processing # bytes BEFORE the end of the file.

-e:  Converts EBCDIC input file to ASCII before doing the dump.

-P:  After each page of data, DO NOT pause and wait for carriage return to continue. (default pauses approx. every 24 lines.)

/p:  If environment variable PAUSE was set, then DO NOT pause. The PAUSE environment variable, if set, will automatically install the -p option whenever the program is run. On occasions when the -p is not needed, use the /p to turn off pausing, or remove the PAUSE variable from the environment.

-w:  Use this as a phantom record width to determine at which record number (displacement) to start. Works with either the forward -d or reverse -D option.

-z:  Begins the character count listing at zero instead of one. This is to facilitate finding displacements from zero instead of having to always subtract one from the listing.


top

Other Hex Edit PROGRAMS

HxD Hex Edditor