beautypg.com

Zilog EZ80F916 User Manual

Page 231

background image

UM014423-0607

ZiLOG Developer Studio II

eZ80Acclaim!

®

User Manual

211

The assembler directives associated with structure and union support are listed in the fol-
lowing table:

These directives are described in the following sections:

“.STRUCT and .ENDSTRUCT Directives” on page 211

“.TAG Directive” on page 213

“.UNION Directive” on page 214

“.WITH and .ENDWITH Directives” on page 215

.STRUCT and .ENDSTRUCT Directives
A structure is a collection of various elements grouped together under a single name for
convenient handling. The

.STRUCT

and

.ENDSTRUCT

directives can be used to define the

layout for a structure in assembly by identifying the various elements and their sizes. The

.STRUCT

directive assigns symbolic offsets to the elements of a structure. It does not allo-

cate memory. It merely creates a symbolic template that can be used repeatedly.

The

.STRUCT

and

.ENDSTRUCT

directives have the following form:

[stag]

.STRUCT

[offset | : parent]

[name_1]

DS

count1

[name_2]

DS

count2

[tname]

.TAG

stagx [count]

...

[name_n]

DS

count3

[ssize]

.ENDSTRUCT

[stag]

The label stag defines a symbol to use to reference the structure; the expression offset, if
used, indicates a starting offset value to use for the first element encountered; otherwise,
the starting offset defaults to zero.

Assembler Directive

Description

.STRUCT

Group data elements in a structure type

.ENDSTRUCT

Denotes end of structure or union type

.UNION

Group data elements in a union type

.TAG

Associate label with a structure or union type

.WITH

A section in which the specified label or structure tag is implicit

.ENDWITH

Denotes end of with section

This manual is related to the following products: