2.3 Internal Operation
Hexmate can perform many operations on the HEX file(s) it is processing. An appreciation of the order in which these operations are performed is important, as it can affect the output.
The following Hexmate operations are listed in the order in which they are performed.
- Create an internal master image by merging the data contained in all the input HEX files, processing them in the order in which they appear on the command-line and as per the read specification associated with each file.
- Find values specified using
-find
options in the master image, deleting and replacing these values as requested in the reverse order in which the options were issued. - Insert serial data specified
using
-serial
options into the master image in the reverse order in which the options were issued. - Embed strings specified using
-string
and-strpack
options into the master image in the reverse order in which the options were issued. - Reserve space for hashes
requested using
-ck
options and trailing codes (t
argument to-ck
) in the master image. - Fill unused locations specified
using
-fill
options in the master image in the order in which the options were issued. - Calculate each specified hash from the master image and insert these and any trailing codes into the master image in the order in which the options were issued.
- Encode the final master image
into the Intel HEX file format requested by the
-format
option or a suitable format when this option has not been used, and then output this file as dictated by the-o
option.
Masking of data specified using -mask
options is performed whenever the
master image is modified, whether the written data has come from an input HEX file or
the result of a Hexmate operation being stored in the master image.