Rev 835 | Blame | Compare with Previous | Last modification | View Log | Download
2.5.1 Object Module FormatThe first line of an object module contains the [XDQ][HL]format specifier (i.e. XH indicates a hexidecimal file withmost significant byte first) for the following designators.2.5.2 Header LineH aa areas gg global symbolsThe header line specifies the number of areas(aa) and thenumber of global symbols(gg) defined or referenced in this ob-ject module segment.2.5.3 Module LineM nameThe module line specifies the module name from which thisheader segment was assembled. The module line will not appearif the .module directive was not used in the source program.2.5.4 Symbol LineS string DefnnnnorS string RefnnnnThe symbol line defines (Def) or references (Ref) the symbol'string' with the value nnnn. The defined value is relative tothe current area base address. References to constants andexternal global symbols will always appear before the first areadefinition. References to external symbols will have a value ofzero.2.5.5 Area LineA label size ss flags ffThe area line defines the area label, the size (ss) of thearea in bytes, and the area flags (ff). The area flags specifythe ABS, REL, CON, OVR, and PAG parameters:OVR/CON (0x04/0x00 i.e. bit position 2)ABS/REL (0x08/0x00 i.e. bit position 3)PAG (0x10 i.e. bit position 4)2.5.6 T LineT xx xx nn nn nn nn nn ...The T line contains the assembled code output by the assem-bler with xx xx being the offset address from the current areabase address and nn being the assembled instructions and data inbyte format.2.5.7 R LineR 0 0 nn nn n1 [n1x] n2 xx xx ...The R line provides the relocation information to the linker.The nn nn value is the current area index, i.e. which area thecurrent values were assembled. Relocation information is en-coded in groups of 4 (possibly 5) bytes:1. n1 (and optionally n1x) is the relocation mode and objectformat:1. bit 0 word(0x00)/byte(0x01)2. bit 1 relocatable area(0x00)/symbol(0x02)3. bit 2 normal(0x00)/PC relative(0x04) relocation4. bit 3 1-byte(0x00)/2-byte(0x08) object format forbyte data5. bit 4 signed(0x00)/unsigned(0x10) byte data6. bit 5 normal(0x00)/page '0'(0x20) reference7. bit 6 normal(0x00)/page 'nnn'(0x40) reference8. bit 7 LSB byte(0x00)/MSB byte(0x80) with 2-bytemode9. bit 8 1 or 2 (0x00)/3-byte (0x100) object formatfor byte data.10. bit 9 LSB or MSB (middle byte) (0x00) or byte 3(real MSB) (0x200) for 3-byte mode.If the upper four bits of n1 are set (i.e.(n1 & 0xf0) == 0xf0), it is taken as an escape character,and the relocation mode will consist of the lower four bitsof n1 left shifted 8 bits or'ed with the value of n1x. Ifthe upper four bits of n1 are not all set, then it is not anescape character, and the n1x byte is not present.This escape mechanism allows a 12-bit relocation mode value.Note that in byte mode, when 3-byte mode is used (bits 0and 8 are both set), the MSB bit (bit 7) really refers tothe 16 bit MSB (the middle byte of the 24-bit value) whilethe "byte 3" bit (bit 9) refers to the 24-bit MSB.2. n2 is a byte index into the corresponding (i.e. pre-ceeding) T line data (i.e. a pointer to the data to beupdated by the relocation). The T line data may be1-byte or 2-byte byte data format or 2-byte wordformat.3. xx xx is the area/symbol index for the area/symbol be-ing referenced. the corresponding area/symbol is foundin the header area/symbol lists.The groups of 4 bytes are repeated for each item requiring relo-cation in the preceeding T line.2.5.8 P LineP 0 0 nn nn n1 n2 xx xxThe P line provides the paging information to the linker asspecified by a .setdp directive. The format of the relocationinformation is identical to that of the R line. The correspond-ing T line has the following information:T xx xx aa aa bb bbWhere aa aa is the area reference number which specifies theselected page area and bb bb is the base address of the page.bb bb will require relocation processing if the 'n1 n2 xx xx' isspecified in the P line. The linker will verify that the baseaddress is on a 256 byte boundary and that the page length of anarea defined with the PAG type is not larger than 256 bytes.The linker defaults any direct page references to the firstarea defined in the input REL file. All ASxxxx assemblers willspecify the _CODE area first, making this the default page area.