Everything

.PUBLIC


Declares to the optimizing linker that the symbol described in the operand field is a symbol to be referenced from another module.

[Syntax]

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

[Function]

-

The .PUBLIC directive declares to the optimizing linker that the symbol described in the operand field is a symbol to be referenced from another module.

[Use]

-

When defining a symbol to be referenced from another module, the .PUBLIC directive must be used to declare the symbol as an external definition.

[Description]

-

When the symbol(s) to be described in the operand field isn't defined within the same module, a warning is output. The symbol name is output in the error message.
When the symbol(s) isn't defined in any module, it will cause an error during linking.

-

The following symbols cannot be used as the operand of the .PUBLIC directive:

(a)

Symbol defined with the .SET directive

(b)

Section name

(c)

Macro name

[Example]

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