Object records that follow the SEGDEF record can refer to it to identify a particular segment. The SEGDEF records are ordered by occurrence and are referenced by segment indexes (origin 1) in subsequent records.
1 byte 2 bytes ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂ--- ³ 99 ³ Record ³ ³ ³ Length ³ ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁ--- <variable> 4 bytes 1 or 2 1 or 2 1 or 2 1 byte --ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿ ³ Segment ³ Segment ³ Segment³ Class ³Overlay³Chk Sum³ ³ Attribute ³ Length ³ Name ³ Name ³Name ³or 0 ³ ³ ³ ³ Index ³ Index ³Index ³ ³ --ÀÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
The segment attribute is bit-significant; the layout is:
<-3 bits-> <-3 bits-> <-1 bit -> <-1 bit -> 2 bytes 1 byte ÚÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ¿ ³ A ³ C ³ B ³ P ³ Frame ³ Offset ³ ³ ³ ³ ³ ³ Number ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÙ <cond> <cond>
The fields have the following meaning:
A
If zero, then segment is no larger than 64K (if data) and 16-bit addressing and operands are the default (if code). This is a Use16 segment.
if not zero, this is a 4Gbyte segment Use32 segment.
Note that this is the only method for defining Use32 segments.
Segment Length
The Segment Length is a 4 byte numeric quantity and specifies the number
of bytes in this program segment.
NOTE: If segment is exactly 4Gbytes in size, segment length should be set
to zero and the B field in the ACBP byte should be set to 1.
Complete Segment Name
The three name indices refer to names that appeared in previous LNAMES record(s). The linker ignores the overlay name index. The full name of a segment consists of the segment and class names. Segments in different object modules are normally combined according to the A and C values if their full names are identical. These indices must be nonzero, although the name itself may be null.
The segment name index identifies the segment with a name. the name need not be unique -- other segments of the same name will be concatenated onto the first segment with that name. The name may have been assigned by the programmer, or it may have been generated by the compiler.
The class name index identifies the segment with a class name (such as CODE, DATA or STACK). The linker places segments with the same class name into a contiguous area of memory in the run-time memory map.
The overlay index is ignored by the linker.
notes:
The linker imposes a limit of 255 SEGDEF records per object module.
The following name/class combinations are reserved: