Hexed is a command line Hexadecimal File Editor.

The source code is written to use an ANSI C99 compatible compiler for portability between Operating Systems.

Hexed is released under the BSD license

Latest Updates
May 6, 2014
hexed help screen now shows the version number.

May 6, 2014
Bugfix: #1 - Added bfcntl to set _fmode to _O_BINARY in MinGW as 'r+b' in fopen was

January 23, 2014
Modified the Makefile. It now has fewer options and should be a cleaner build process.

May 7, 2014

Hexed bugfix #1

Hexed had a problem on Windows with CR, LF line conversion. Hexed opened the file using the ‘r+b’ file mode but MinGW seemed to ignore the file mode and opened the file in text mode. I’m now setting the _fmode from fcntl.h to _O_BINARY. This fix only compiles on Windows for the MinGW compiler and is done in a separate file, bfcntl.c, to stop any warnings about DLL settings.

Hexed now also shows the version number on the help screen with the command hexed -?

The last thing is I’ve added a Support section to the Sourceforge site for hexed. This should be used to report bugs and request new features.

March 14, 2011

hexed – commands move & word

The last few commands have been added to hexed today, these are move, move overwrite and word size. Move is similar to the copy command with 2 modes of operation, while the word command sets the word size between 8 bit, 16 bit, 32 bit and 64 bit word sizes.

The Command List

Move: -m

Moves data from the source to the destination

-m 100 200 20

Will move 32 bytes from 0x100 to 0x200 and move everything from 0x120 to 0x220 down by 32 bytes.

Move Overwrite: -mo

Moves the data from the source to the destination over writing the original data at destination

-mo 100 200 20

This will move 32 bytes from 0x100 to 0x200 but will insert zeroes into the file below the destination. This way the data will appear where you expect it to be after the move.

Word size: -w

Sets the data word size for most commands like dump, enter, insert etc.

-w 2

This will set the word size to 16 bit so when used with a command like dump will display the data as 2 bytes long as in this example:

hexed -w 2 -e 18 ffff abcd 1234 dead -d
00000000  0000 0000 0000 0000  0000 0000 0000 0000  ................
00000010  0000 0000 0000 0000  ffff abcd 1234 dead  ............4...

The next step is to implement a simple console editor.

February 13, 2011

hexed – command copy

The copy command was added to hexed a little while ago. This command has 2 modes of operation: copy (c) or copy overwrite (co).

The Command List

Copy: -c

Copies data from the source inserting it at the destination

-c 100 200 20

This will copy 32 bytes from 0x100 to 0x200 moving everything at 0x200 up by 32 bytes.

Copy Overwrite: -co

Copies data from the source overwriting the destination

-co 100 200 20

Copy 32 bytes from 0x100 to 0x200 overwriting the original data.