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>extrn define external directive</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
EXTRN            Define External                                    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 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

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