Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>segment initiate segment definition directive</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SEGMENT          Initiate Segment Definition                        Directive

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

    Marks the beginning of a segment. For the 80386: you can specify 16- or
    32-bit segments with the USE16 or USE32 keywords (the default is
    32 bits). For example, to specify 16-bit segments, you would add this:

                        CODE_SEG    SEGMENT   USE16

    In TASM Ideal mode, the name of the segment comes after the keyword
    SEGMENT, like this: SEGMENT name arguments.


       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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson