Xdef, Xref, Structures and unions in assembly code – Zilog EZ80F916 User Manual
Page 230: Xdef xref structures and unions in assembly code

UM014423-0607
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
210
A 26 ALIGN 2
000004 A 27 _pass_str:
000004 07 A 28 DB
STRVAR
XDEF
Defines a label or list of labels in the current module as external symbols that are to be
made publicly visible to other modules at link time. The operands must be labels that are
defined somewhere in the assembly file.
Synonyms
.global
,
GLOBAL
,
.GLOBAL
,
.public
,
.def
,
public
Syntax
<xdef_directive> =>
XDEF
<ident list>
Example
XDEF label
XDEF label1,label2,label3
XREF
Specifies that a label or list of labels in the operand field are defined in another module.
The reference is resolved by the linker. The labels must not be defined in the current mod-
ule. This directive optionally specifies the address space in which the label resides.
Synonyms
.extern
,
EXTERN
,
EXTERNAL
,
.ref
Syntax
<xref_directive> =>
XREF
<ident list>
Example
XREF label
XREF label1,label2,label3
XREF label:ROM
Structures and Unions in Assembly Code
The assembler provides a set of directives to group data elements together, similar to high-
level programming language constructs like a C structure or a Pascal record. These direc-
tives allow you to declare a structure or union type consisting of various elements, assign
labels to be of previously declared structure or union type, and provide multiple ways to
access elements at an offset from such labels.