1srec_aomf(5)                  File Formats Manual                 srec_aomf(5)
2
3
4

NAME

6       srec_aomf - Intel Absolute Object Module Format
7

DESCRIPTION

9       The  Absolute  Object Module Format (AOMF) is a subset of the 8051 OMF.
10       The structure of an absolute object file (the order of the  records  in
11       it)  is  similar to that of a relocatable object file.  There are three
12       main differences:  the first is that an absolute object  file  contains
13       one  module  only, the second is that not all the records can appear in
14       the absolute file and the third is that the records  can  contain  only
15       absolute information.
16
17   Generic Record Format
18       Each  record  starts with a record type which indicates the type of the
19       record, and record length which contain the  number  of  bytes  in  the
20       record exclusive of the first two fields. The record ends with a check‐
21       sum byte which contains the 2s complement of the sum  (modulo  256)  of
22       all  other  bytes in the record.  Therefore the sum (modulo 256) of all
23       bytes in the record is zero.
24
25       The record  length  includes  the  payload  and  checksum  fields,  but
26       excludes the type and length fields.
27
28       All 16‐bit fields are little‐endian.
29
30                       ┌────────┬─────────┬─────────┬─────────┐
31                       │REC     │ Record  │ Payload │ CHK     │
32                       │TYP     │ Length  │         │ SUM     │
33                       │8 bits  │ 16 bits │         │ 8 bits  │
34                       └────────┴─────────┴─────────┴─────────┘
35       Here are some of the relevant record types:
36
37                          0x01   Scope Definition Record
38                          0x02   Module Start Record
39                          0x04   Module End Record
40                          0x06   Content Record
41                          0x0E   Segment Definition Record
42                          0x12   Debug Items Record
43                          0x16   Public Definition Record
44                          0x18   External Definition Record
45
46       Names  are  not  stored a C strings.  Names are stored as a length byte
47       followed by the contents.
48
49   Structure
50       An AOMF file consists of a module header record (0x02), followed by one
51       or  more content (0x06), scope (0x01) or debug (0x12) records, and ends
52       in a module end record (0x04).
53
54       The records with the following types are extraneous (they may appear in
55       the  file  but are ignored):  0x0E, 0x16 and 0x18 (definition records).
56       All records which are not part of the AOMF and are not  extraneous  are
57       considered erroneous.
58
59   Module Header Record
60             ┌────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
61             │ REC    │ Record  │ Module  │ TRN ID  │ zero    │ CHK     │
62             │ TYP    │ Length  │ Name    │ 8 bits  │ 8 bits  │ SUM     │
63             │ 0x02   │ 16 bits │         │         │         │ 8 bits  │
64             └────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
65       Each  module  must  starts  with a module header record.  It is used to
66       identify the module for the RL51 and other future  processors  of  8051
67       object files.  In addition to the Module Name the record contains:
68
69       TRN ID  The  byte  identifies the program which has generated this mod‐
70               ule:
71
72                                       0xFD   ASM51
73                                       0xFE   PL/M-51
74                                       0xFF   RL51.
75
76   Module End Record
77        ┌────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
78        │ REC    │ Record  │ Module  │ zero    │ REG     │ zero    │ CHK     │
79        │ TYP    │ Length  │ Name    │ 16 bits │ MSK     │ 8 bits  │ SUM     │
80        │ 0x04   │ 16 bits │         │         │ 8 bits  │         │ 8 bits  │
81        └────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
82       The record ends the module sequence and contains the following informa‐
83       tion:  characteristics
84
85       MODULE NAME
86               The  name  of the module is given here for a consistency check.
87               It must match the name given in the Module Header Record.
88
89       REGISTER MASK (REG MSK)
90               The field contains a bit for each of the four  register  banks.
91               Each  bit,  when  set  specifies that the corresponding bank is
92               used by the module:
93
94               Bit 0 (the least significant bit)
95                       bank #0.
96
97               Bit 1   bank #1.
98
99               Bit 2   bank #2.
100
101               Bit 3   bank #3.
102
103   Content Record
104             ┌────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
105             │ REC    │ Record  │ SEG ID  │ Offset  │  DATA   │ CHK     │
106             │ TYP    │ Length  │ 8 bits  │ 16 bits │         │ SUM     │
107             │ 0x06   │ 16 bits │         │         │         │ 8 bits  │
108             └────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
109       This record provides one or more bytes of contiguous data, from which a
110       portion of a memory image may be constructed.
111
112       SEG ID  This field must be zero.
113
114       OFFSET  Gives  the  absolute  address  of the first byte of data in the
115               record, within the CODE address space.
116
117       DATA    A sequence of data bytes to  be  loaded  from  OFFSET  to  OFF‐
118               SET+RECORDLENGTH−5.
119
120   Size Multiplier
121       In  general, raw binary data will expand in sized by approximately 1.02
122       times when represented with this format.
123

SOURCE

125       http://www.intel.com/design/mcs96/swsup/omf96_pi.pdf
126       ftp://download.intel.com/design/mcs51/SWSUP/omf51.exe (zip archive)
127       http://www.elsist.net/WebSite/ftp/various/OMF51EPS.pdf
128
130       srec_cat version 1.55
131       Copyright (C) 1998, 1999, 2000, 2001, 2002,  2003,  2004,  2005,  2006,
132       2007, 2008, 2009, 2010 Peter Miller
133
134       The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use
135       the 'srec_cat -VERSion License' command.  This is free software and you
136       are  welcome  to  redistribute it under certain conditions; for details
137       use the 'srec_cat -VERSion License' command.
138

AUTHOR

140       Peter Miller   E‐Mail:   pmiller@opensource.org.au
141       /\/\*             WWW:   http://miller.emu.id.au/pmiller/
142
143
144
145Reference Manual                    SRecord                       srec_aomf(5)
Impressum