Menu

hexed – commands help, dump & enter

Command control has been added to hexed and the first 3 commands are help, dump and enter. Command control is handled by a Command struct and a Cmdoptions struct. Each command is set with an ID, flags and any options in the Cmdoptions area. Cmdoptions is general purpose and shares common names for values between all the commands. Any extra data is stored in a buffer before being copied to the file. Multiple commands can be set on the command line and these are performed in the order they are found.

hexed -d 0 100 -e 40 10 20 30 40 -d 0 100 test.hex

This will display the file test.hex, enter 4 values at 0x40, display the file again then save the file and quit.

The Command List

Help: -?

Help simply displays the command list and how to use each command:

hexed - Hexadecimal File Editor

Usage:
  hexed [options] [file]

Options:
  -?                            Shows this help screen
  -d [src] [len]                Display hex values from [src] for [len] bytes
  -e [dest] [...]               Enter hex values [...] at [dest]

Dump: -d

The dump command displays a range of values and their ascii symbols:

-d 0 100

Displays values starting from 0x0 for 0x100 (256) bytes, all options to commands are set in hex values.

Enter: -e

Enter adds new values to a file, overwriting any values that were already at the address:

-e 100 10 20 30 40

Enters the values 0x10, 0x20, 0x30 and 0x40 starting at 0x100. If a file name is set then the values will be automatically saved to the file.

Leave a Reply

Your email address will not be published. Required fields are marked *