II.1.10 The HEXBIN Utility
Most EPROM programmers are accepting the
where <hex> is the input file in
If you want a file name to have no extension, terminate it with a '.'! Instead of file names you may also specify device names to redirect the output to character I/O ports. Device names may be terminated with a ':'! It is not checked, whether the device is existing or suitable for the task.
The binary file output can also be controlled with the options /OFFSET, /FILL and /LENGTH.
Normally the first byte in the binary file is the first byte of the HEX record with the lowest load address. If a number of dummy bytes is to be inserted on top of the file (e.g. for alignment in an EPROM image), this can be performed with the /OFFSET option:
would insert 4096 dummy bytes before the first byte of the first HEX record loaded. The offset must always be specified as a hex number. The default offset is 0./OFFSET:1000
Since there may be peepholes between the HEX records, a fill byte value can be defined with the /FILL option:
would fill all peepholes between the HEX records with zero bytes as well as all the dummy bytes that might have been inserted with the /OFFSET or /LENGTH option. The fill byte value must always be specified as a hex number. The default fill byte is the EPROM-friendly FFH./FILL:0
By default the last byte in the binary file is the last byte of the HEX record with the highest load address. If the binary file should have a well defined length, then a number of dummy bytes can be appended to the file (e.g. for exactly matching an EPROM length), this can be performed with the /LENGTH option:
would append as many dummy bytes behind the last byte of the file, that the total file length becomes exactly 32768 bytes. The file length must always be specified as a hex number./LENGTH:8000
When HEXBIN has been invoked with all the above options, it may display a file conversion report like this:
Hex File Converter HEXBIN V2.3 offset: 1000H bytes first address: 9000H last address: A255H fill peepholes with: 00H binary image length: 8000H bytesThe /QUIET option suppresses this console output, while error messages are displayed regardless.
Options may be abbreviated as long as they remain unique!
0.) HEXBINWhen invoked without parameters, HEXBIN displays a help screen:Hex File Converter HEXBIN V2.3 usage: HEXBIN <hexfile> [<binary>] [options] options: /OFFSET:offset /LENGTH:length /FILL:fillbyte /QUIET1.) HEXBIN PROGRAMwill convert the
When terminating HEXBIN returns an exit code to the operating system:
There is also a Win32 console-mode version of HEXBIN: HEXBINW.EXE!