srec_aomf(5)
π srec_aomf(5) β Intel Absolute Object Module Format π
okay bestie, this is srec_aomf(5) from the File Formats Manual β the Intel Absolute Object Module Format page. Buckle up, we're doing 8051 record layouts and honestly it's iconic π«Ά
πΈ NAME πΈ
srec_aomf β Intel Absolute Object Module Format
β¨ DESCRIPTION β¨
okay so AOMF β the Absolute Object Module Format β is literally a subset of the 8051 OMF. The structure of an absolute object file (meaning the order of the records in it) is similar to that of a relocatable object file. But there are three main differences, and they matter:
- an absolute object file contains one module only
- not all the records can appear in the absolute file
- the records can contain only absolute information
periodt. π
𧬠Generic Record Format π§¬
Every record starts with a record type that tells you what kind of record it is, plus a record length that contains the number of bytes in the record, exclusive of the first two fields. The record ends with a checksum byte which contains the 2s complement of the sum (modulo 256) of all other bytes in the record. Therefore the sum (modulo 256) of all bytes in the record is zero. Cute, right? π
The record length includes the payload and checksum fields, but excludes the type and length fields.
All 16βbit fields are littleβendian. no cap.
βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ
β REC β Record β Payload β CHK β
β TYP β Length β β SUM β
β 8 bits β 16 bits β β 8 bits β
βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ
Here are some of the relevant record types:
0x01β Scope Definition Record0x02β Module Start Record0x04β Module End Record0x06β Content Record0x0Eβ Segment Definition Record0x12β Debug Items Record0x16β Public Definition Record0x18β External Definition Record
Names are not stored as C strings. Names are stored as a length byte followed by the contents. not me expecting C strings π
ποΈ Structure ποΈ
An AOMF file consists of a module header record (0x02), followed by one or more content (0x06), scope (0x01) or debug (0x12) records, and ends in a module end record (0x04).
The records with the following types are extraneous (they may appear in the file but are ignored): 0x0E, 0x16 and 0x18 (definition records). All records which are not part of the AOMF and are not extraneous are considered erroneous.
bestie, if a record is not part of AOMF and is not one of those extraneous ones, it's erroneous. full stop π
π Module Header Record π
βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ
β REC β Record β Module β TRN ID β zero β CHK β
β TYP β Length β Name β 8 bits β 8 bits β SUM β
β 0x02 β 16 bits β β β β 8 bits β
βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ
Each module must start with a module header record. It is used to identify the module for the RL51 and other future processors of 8051 object files. In addition to the Module Name, the record contains:
TRN ID β The byte identifies the program which has generated this module:
0xFDβ ASM510xFEβ PL/M-510xFFβ RL51.
π Module End Record π
βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ
β REC β Record β Module β zero β REG β zero β CHK β
β TYP β Length β Name β 16 bits β MSK β 8 bits β SUM β
β 0x04 β 16 bits β β β 8 bits β β 8 bits β
βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ
This record ends the module sequence and contains the following information: characteristics.
MODULE NAME β The name of the module is given here for a consistency check. It must match the name given in the Module Header Record.
REGISTER MASK (REG MSK) β The field contains a bit for each of the four register banks. Each bit, when set, specifies that the corresponding bank is used by the module:
- Bit 0 (the least significant bit) β bank #0.
- Bit 1 β bank #1.
- Bit 2 β bank #2.
- Bit 3 β bank #3.
π¦ Content Record π¦
βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ
β REC β Record β SEG ID β Offset β DATA β CHK β
β TYP β Length β 8 bits β 16 bits β β SUM β
β 0x06 β 16 bits β β β β 8 bits β
βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ
This record provides one or more bytes of contiguous data, from which a portion of a memory image may be constructed.
SEG ID β This field must be zero.
OFFSET β Gives the absolute address of the first byte of data in the record, within the CODE address space.
DATA β A sequence of data bytes to be loaded from OFFSET to OFFSET+RECORDLENGTHβ5.
π Size Multiplier π
In general, raw binary data will expand in size by approximately 1.02 times when represented with this format. tiny glow-up, honestly β¨
π SOURCE π
http://www.intel.com/design/mcs96/swsup/omf96_pi.pdfftp://download.intel.com/design/mcs51/SWSUP/omf51.exe(zip archive)http://www.elsist.net/WebSite/ftp/various/OMF51EPS.pdf
π COPYRIGHT π
srec_cat version 1.65
Copyright (C) 1998... Peter Miller
The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command.
π«Ά MAINTAINER π«Ά
- Scott Finneran β EβMail:
scottfinneran@yahoo.com.au - Peter Miller β EβMail:
pmiller@opensource.org.au
β¨ later bestie β this page is from the SRecord Reference Manual, page srec_aomf(5), with srec_cat version 1.65 energy. the footer has no date listed, so I'm absolutely not inventing one ππ¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- Copyright (C) 2004, 2006-2011 Peter Miller
- Copyright (C) 1998, 2006-2009, 2014 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms