Zilog EZ80F916 User Manual
Page 234

UM014423-0607
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
214
EMPLOYEE .STRUCT
NAME DS NAMELEN
SOCIAL DS 10
START .TAG DATE
SALARY DS 1
ESIZE .ENDSTRUCT EMPLOYEE
NEWYEARS .TAG DATE
NEWYEARS DS DSIZE
The
.TAG
directive in the last example above creates the symbols
NEWYEARS.MONTH
,
NEWYEARS.DAY
, and
NEWYEARS.YEAR
. The space for
NEWYEARS
is allocated by the
DS
directive.
.UNION Directive
The
.UNION
directive is similar to the
.STRUCT
directive, except that the offset is reset to
zero on each label. A
.UNION
directive cannot have an offset or parent union. The key-
word to terminate a
.UNION
definition is
.ENDSTRUCT
.
The .UNION directive has the following form:
[stag]
.UNION
[name_1]
DS
count1
[name_2]
DS
count2
[tname]
.TAG
stagx [count]
...
[name_n]
DS
count3
[ssize]
.ENDSTRUCT
[stag]
An example of the
.UNION
directive usage is as follows:
BYTES .STRUCT
B0 DS 1
B1 DS 1
B2 DS 1
B3 DS 1
BSIZE .ENDSTRUCT BYTES