Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

od(1)

image(1M)

elf(3E)





   hex(1)                                                               hex(1)


   NAME
         hex - translates object files

   SYNOPSIS
         hex [-flr023tB] [-n number] [-s address] ifile

   DESCRIPTION
         hex translates file ifile into ASCII format suitable for Motorola S-
         record downloading.  Unless the -f option is used, ifile must be an
         executable ELF object file.

         If a starting addresses is not specified, an executable will be
         loaded according to the ELF program header.  By default, S1 records
         are produced when the load address can be represented in 16 bits, S2
         records are produced when 24 bits are required and S3 records for 32
         bit addresses.  A trailing S7, S8 or S9 record is produced containing
         the entry address.

   OPTIONS
         -f           Ship the file ``as is'' without treating it as an object
                      file.  The -s option should be used to specify a load
                      address, otherwise 0 will be assumed.

         -l           Output "Loading at" message.

         -n number    Output number data bytes per record.  (number is
                      decimal).  The default is 12.

         -r           Output a carriage return at the end of each S-record
                      (instead of a newline).

         -0           Output a leading S0 record.

         -2           S2 or S3 records only (no S1 records are produced).

         -3           S3 records only (no S1 or S2 records are produced).

         -t           Do not output a trailing S7, S8 or S9 record.

         -s address   Start loading at address (in hex).  If an executable has
                      multiple entries in its ELF program header, the first
                      loadable segment is loaded at address and other segments
                      maintain their appropriate relative offsets.

         -B           Byte reverse the data.

   EXAMPLE
               hex objfile





   7/91                                                                 Page 1









   hex(1)                                                               hex(1)


         where objfile is the object file to be downloaded.

   SEE ALSO
         as(1), od(1), image(1M), elf(3E).

















































   Page 2                                                                 7/91





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026