Everything

.EXTERN


Declares to the optimizing linker that a symbol in another module is to be referenced in this module.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.EXTERN
symbol-name
[; comment]

[Function]

-

The .EXTERN directive declares to the optimizing linker that a symbol in another module is to be referenced in this module.

[Description]

-

The symbol specified in the operand field can be referenced in the current module.

-

The following cannot be written as an operand.

(a)

Symbol defined with the .SET directive

(b)

Section name

(c)

Macro name

-

No error is output even if a symbol declared with the .EXTERN directive is not referenced in the given module.

-

The .EXTERN directive may be described anywhere in a source program.

[Example]

Referring program

         .EXTERN  PSYM01
         .EXTERN  PSYM02
         MOV      A, ES:!PSYM01
         BR       !PSYM02

 

Defining program

         .PUBLIC  PSYM01
         .PUBLIC  PSYM02
PSYM01:  .DB      0x10
PSYM02:  MOV      A, #0x4D