Keil Logo

EXTERN Assembler Statement

Arguments
EXTERN <[>DPPn<]> symbol: type <[>, symbol: type ...<]>
Description

The EXTERN statement (which may appear anywhere in the assembler source file) specifies symbols that the current source file uses but which are defined in other object modules. The module where the symbols are defined must export them using GLOBAL or PUBLIC statements. The EXTERN statement specifies the symbol and its type.

Following is a list of valid types:

type Description
BIT A bit variable.
BIT WORD A bit-addressable word.
BYTE A byte variable.
DATA3 A 3-bit constant.
DATA4 A 4-bit constant.
DATA8 An 8-bit constant.
DATA16 A 16-bit constant.
DATA32 A 32-bit constant.
DATA64 A 64-bit constant.
FAR A far label.
INTNO A symbolic interrupt number.
NEAR A near label.
REGBANK A register bank name.
WORD A word variable.

The EXTERN statement may appear anywhere in the assembler source file

The linker resolves all external symbols and verifies that the types match.

See Also

EXTRN, GLOBAL, PUBLIC

Example
EXTERN   TRAPX : INTNO
EXTERN   yvar  : WORD
EXTERN   ExBit : BIT, FProc : FAR, NProc : NEAR
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.