[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
EXTRN            Define External                               MASM Directive

  EXTRN     name:type,,,

    Defines a variable, label, or symbol as external.  An external item is
    one that is defined in another program module, but is used in the
    program module containing the EXTRN directives.  There must be a
    corresponding PUBLIC directive in the module that defines the item.

       Notes:     The type of name must match the type originally used to
                  declare it in the external module. Legal types are BYTE,
                  WORD, DWORD, QWORD, TBYTE, NEAR, FAR, and ABS.

                  If the EXTRN directive is placed in a segment, the
                  external item is assumed to be in that segment.  The
                  item's PUBLIC directive in another module must also be
                  in the same segment.  If the EXTRN directive is not in
                  any segment, the corresponding PUBLIC directive can be
                  anywhere in the other module.

                  All characters in name are forced into upper-case when
                  writing the object file out.  Use of the MASM switches
                  /ML and /MX can be used to preserve lower-case.

                  The ABS type is used for symbols that represent absolute
                  numbers.

See Also: PUBLIC BYTE WORD DWORD QWORD TBYTE NEAR FAR
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson