Description: The SEGDEF record describes a logical segment in an object module. It defines the segment's name, length and alignment, as well as the way the segment can be combined with other logical segments at bind, link and load time.

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  ³       ³
       --ÀÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ

SEGDEF segment definition record
Segment Attributes

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

0 1 2 3 4 5 6 7 The new values are A=4 and A=5. Dword alignment is required for 80386 hardware. Page-align maps to the 80386 hardware page size of 4K bytes. C 0 1 2 3 4 5 6 7 B P

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:

  • TYPE $$SYMBOLS CODE32 DATA32 CONST32 BSS32 DGROUP32


    [Back: 96H LNAMES List of Names Record]
    [Next: 9AH GRPDEF Group Definition Record]