User`s manual
Chapter 8, GHEX
and STOHEX
GHEX.EXE is a program provided for you to be able to convert a binary
file into an INTEL.HEX file. This capability is built–in to the PGMX.COM
program, but you may want to use it for convenience.
General usage is:
C>GHEX filename.ext<cr>
OR
C>GHEX filename.ext offset <cr>
Offset is an ASCII–HEX number (0–9 and/or A–F) that specifies the
load address used on the first hex record.
C>GHEX filetest.bin<cr>
Will result in an Intel Hex file being created on your disk by the name
filetest.hex. The load addresses begin at 0000H since no offset was
specified. GHEX does not destroy the input file.
C>GHEX filetest.bin AA55<cr>
Will result in an INTEL.HEX file being created on your disk by the name
filetest.hex, just like before except the load addresses start at AA55H.
GHEX is provided as a convenience now , since the PGMX program
can handle transferring in Intel Hex or Binary code. PGMX will also
handle any offsets into the code too.
One thing you have to remember when using GHEX is that any code
that you run GHEX on should be an exact multiple of 128. If your binary
file is not an exact multiple, then GHEX will fill out to an even multiple
of 128 with nulls.
STOHEX.COM is a program will take a Motorola Hex file and convert
it to an Intel Hex file. It takes input from the keyboard and outputs it to
the console. To modify whole files, use the DOS redirection com-
mands:
C>STOHEX <moto.mik >intel.hex
The above example will take a Motorola mik or ptp file by the name of
moto.mik and convert it to an Intel hex file by the name intel.hex on
your disk. STOHEX returns the DOS errorlevel set to 0 if the conversion
was done with no errors. An errorlevel of 1 is set if some kind of error
Model 9000 Ghex & Debug Chapter 8
Page 31