home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / m68k / 1521 < prev    next >
Encoding:
Text File  |  1993-01-08  |  4.9 KB  |  158 lines

  1. Newsgroups: comp.sys.m68k
  2. Path: sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!brtph560!nrtpa038!nrtpa16!sherlock
  3. From: sherlock@nrtpa16.bnr.ca (Steve Holmes x4807)
  4. Subject: Motorola S-Record Formats
  5. Message-ID: <1993Jan8.125442.5349@nrtpa038.bnr.ca>
  6. Keywords: Motorola S-Records Object 
  7. Sender: cadnews@nrtpa038.bnr.ca (netnews posting host)
  8. Reply-To: sherlock@bnr.ca
  9. Organization: Bell-Northern Research, Research Triangle Park, NC
  10. Date: Fri, 8 Jan 1993 12:54:42 GMT
  11. Lines: 145
  12.  
  13. /*P  Motorola (S) record layouts */
  14. /*+***************************************************************
  15.  
  16.   The general layout of an S record is as follow:
  17.  
  18.   S rr ll xx xx xx xx xx ..... cc
  19.     || || ||                   ||
  20.     || || ||                   ====  Ones compliment checksum
  21.     || || =========================  Data of length ll - 1
  22.     || ============================  Length of bytes to follow
  23.     ===============================  Record type
  24.  
  25.   S records are in displayable  ascii characters.
  26.   The 'S' and record type are NOT included in the checksum.
  27.   The checksum is a Ones compliment checksum, such that after
  28.   the checksum is computed the one's compliment of the sum
  29.   is compared to the checksum byte.
  30.  
  31.   Record Types:
  32.   -------------
  33.  
  34.   Note: 'll' is the length of data to follow
  35.         'cc' is the ones compliment checksum
  36.  
  37.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  38.  
  39.   0: Comment Record.
  40.      Normally the first record of the load, but optional.
  41.      Some linkers imbed the name of the load in this record.
  42.      The Microtec Linker always builds the same S0 record.
  43.  
  44.   S0 ll xx xx xx xx .... cc
  45.          \_____________/
  46.                 |
  47.                 +---------------  optional (comments)
  48.                                   defined by linker
  49.  
  50.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  51.  
  52.  
  53.   1: Data Record (2-byte address field).
  54.      This record contains the actual load data.
  55.  
  56.   S1 ll aa aa dd dd dd dd .... cc
  57.         \___/ \______________/
  58.           |          |
  59.           |          +----------  actual load data
  60.           +---------------------  16-bit destination address
  61.  
  62.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  63.  
  64.  
  65.   2: Data Record (3-byte address field).
  66.      This record contains the actual load data.
  67.  
  68.   S2 ll aa aa aa dd dd dd dd .... cc
  69.         \______/ \______________/
  70.            |            |
  71.            |            +--------  actual load data
  72.            +---------------------  24-bit destination address
  73.  
  74.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  75.  
  76.  
  77.   3: Data Record (4-byte address field).
  78.      This record contains the actual load data.
  79.  
  80.   S3 ll aa aa aa aa dd dd dd dd .... cc
  81.         \_________/ \______________/
  82.              |             |
  83.              |             +-----  actual load data
  84.              +-------------------  32-bit destination address
  85.  
  86.  
  87.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  88.  
  89.  
  90.   5: Record Count.
  91.      This record contains the total count of S1, S2 and S3
  92.      records that have been sent prior.  The loader will
  93.      verify that the count does indeed match with how
  94.      many have been received.  The size of the count
  95.      field is based upon the length of the record.
  96.  
  97.   S5 ll rr ... rr cc
  98.         \_______/
  99.             |
  100.             +---------------- 16,24 or 32-bit record count
  101.  
  102.  
  103.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  104.  
  105.  
  106.  
  107.   7: End of Load record.
  108.      This record signals the end of the load.  The record
  109.      contains a 4-byte transfer address (entry point).
  110.  
  111.      Note: some linkers will set the transfer address to
  112.            zero, while others allow it to set via linker or
  113.            assembler options.
  114.  
  115.            The Microtec linker allows you to either specify
  116.            a START option in the linker control file,
  117.            or the Microtec Assembler allows an assembler
  118.            option where the transfer address is specified
  119.            on the END statement on any ONE module.
  120.  
  121.  
  122.   S7 ll aa aa aa aa cc
  123.         \_________/
  124.              |
  125.              +---------------------  OPTIONAL 32-bit Entry Point
  126.  
  127.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  128.  
  129.  
  130.  
  131.   8: End of Load record.
  132.      This record signals the end of the load.  The record
  133.      contains a 3-byte transfer address (entry point).
  134.  
  135.   S8 ll aa aa aa cc
  136.         \______/
  137.            |
  138.            +---------------------  OPTIONAL 24-bit Entry Point
  139.  
  140.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  141.  
  142.  
  143.   9: End of Load record.
  144.      This record signals the end of the load.  The record
  145.      contains a 2-byte transfer address (entry point).
  146.  
  147.   S9 ll aa aa cc
  148.         \___/
  149.           |
  150.           +---------------------  OPTIONAL 16-bit Entry Point
  151.  
  152.  
  153.  *-***************************************************************/
  154.  
  155.  
  156. steve holmes                       BNR
  157. email: sherlock@bnr.ca             Research Triangle Park, NC
  158.