Keil™, An ARM® Company

Ax51 User's Guide

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