XDEF - External Symbol Definition

Syntax
  XDEF [.<size>] <label>[,<label>]...
  
  
  where 
  <size> = B(direct), W (default), 
  L or S or T
  
  
Synonym
  GLOBAL, PUBLIC
  
  
Description

This directive specifies labels defined in the current module that are to be passed to the linker as labels that can be referenced by other modules linked to the current module.

The number of symbols enumerated in an XDEF directive is only limited by the memory available at assembly time.

The S and T size designators are only available for RS08, and result in marking the symbol as short or tiny.

Example

See the following listing for the case where the XDEF assembler directive can specify symbols that can be used by other modules.

Listing: Using XDEF to create a variable to be used in another file

        XDEF Count, main
        ;; variable Count can be referenced in other modules,

        ;; same for label main. Note that Linker & Assembler

        ;; are case-sensitive, i.e., Count != count.

Count:  DS.W  2

code:   SECTION

main:   DC.B 1