Keil Logo

XREF Assembler Directive

Abbreviation

XR

Arguments

None.

Default

No cross-reference table is generated.

µVision

Options — Listing — Assembler Listing — Cross Reference.

Description

The XREF directive instructs the assembler to generate a cross-reference table. The cross-reference table lists symbols, types, values, attributes and line numbers where the symbol is referenced. For Example:

XREF SYMBOL TABLE LISTING
---- ------ ----- -------

N A M E             TYPE   VALUE     I  ATTRIBUTES

?C_CLRMEMSECSTART.  WORD   ----         EXT    867 867# 909 910
?C_ENDINIT . . . .  WORD   ----         EXT    1109 1109#
?C_INITSECSTART. .  WORD   ----         EXT    981 981# 1026 1027
?C_MAINREGISTERS .  RBANK               REGBANK   551# 849
?C_PAGEDPP0. . . .  DATA16 ----         EXT    837 837# 842

A number sign ('#') following a line number indicates the symbol is defined on that line.

Note

  • The NOPRINT directive overrides the XREF directive.
See Also

NOPRINT, NOXREF

Example
A51 SAMPLE.ASM XREF

$XR
  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.