[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SEGMENT          Initiate Segment Definition                   MASM Directive

  name      SEGMENT   [align] [combine] ['class']
  name      ENDS

    Marks the beginning of a segment.

       Notes:     A segment is a collection of instructions or data whose
                  addresses are all computed relative to the same segment
                  register.

                  Your program may have more than one segment definition
                  using the same name. The assembler treats all segments
                  having the same name as one segment.

                  The align, combine, and class parameters should be
                  specified in the order outlined above, if they are
                  included.  All of these parameters are optional.

                  The align parameter, if included, tells the assembler
                  how to select a starting address for the segment. See
                  each of the following options for a more detailed
                  description: BYTE, WORD, PARA, and PAGE.

                  The combine parameter, if included, tells the assembler
                  how to handle multiple segments of the same name. See
                  each of the following options for a more detailed
                  description: PUBLIC, STACK, COMMON, MEMORY, and AT.

                  The 'class' parameter, if included, tells LINK which
                  segments are to be loaded into contiguous memory blocks,
                  one after the other.  The class name must be enclosed
                  within single quotation marks.  Unless /ML or /MX is
                  used, the class name is case-insensitive.  Note that a
                  class name can not be assigned to any other symbol in a
                  program.

See Also: BYTE WORD PARA PAGE STACK COMMON MEMORY AT
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson