HEXDUMP: To display a file in Hexadecimal format. HEXDUMP2: Display a file in Hexadecimal frmat. HEXDUMP1: Version of HEXDUMP that prints similar to mainframes with zone punches HEXEDIT: File editor.
This Hexdump program will take a file and print the hexadecimal equivalent of the characters in the file. The program will take wildcard inputs. Under NTFS the 32 bit version can display a file of any size as long as its visible by the operating system.
It prints 16 characters per line in groups of 4.
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.
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.
HEXDUMP2 has a minimal string search capability built into it. Use of a -s option followed by the string you wish to locate will find and position you at that place in the file. If the string is not located, the program begins at the beginning of the file. A -s is case insensitive, and a -S is case sensitive.
Hexdump2 is designed to be the succsssor of hexdump. It has a few enhancements worth noting that are not on the help screens.
When viewing a file, if you enter a ‘b‘ the binary bit pattern of the character under the cursor will be shown.
If you enter an ‘n‘ the next 4 bytes are interpreted as a ‘C’ programming long integer, and the value is decoded and displayed.
If you enter an ‘h‘ the next 4 bytes are interpreted as a binary long integer and the value is decoded and displayed.
The screen automatically pauses every page. The -p option causes the screen to continuously scroll until a space bar is hit. A control P (^P) will allow you to change scrolling speed on some computers.
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.
-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.
-m: Forces display to act as monochrome. (not available after 1/98 )
-P: After each page of data, DO NOT pause and wait for carriage return to continue.
/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.
-s or -S + string Will do a string search for string in the file. the upper case -S is case sensitive, lower case -s is not. (With hexdump2, a control L (^L) will continue the same search. (not available after 1/98 )
-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.