Tag directive – Zilog ZUSBOPTS User Manual
Page 269

UM017105-0511
Directives
Zilog Developer Studio II – ZNEO™
User Manual
241
YEAR
DS
2
DSIZE
.ENDSTRUCT
DATE
Directives allowed between
.STRUCT
and
.ENDSTRUCT
are directives that specify size,
principally
DS
,
ALIGN
,
ORG
, and
.TAG
and their aliases. Also,
BLKB
,
BLKW
, and
BLKL
direc-
tives with one parameter are allowed because they indicate only size.
The following directives are not allowed within
.STRUCT
and
.ENDSTRUCT
:
•
Initialization directives (
DB
,
DW
,
DL
,
DF
, and
DD
) and their aliases
•
BLKB
,
BLKW
, and
BLKL
with two parameters because they perform initialization
•
Equates (
EQU
and
SET
)
•
Macro definitions (
MACRO
)
•
Segment directives (
SEGMENT
and
FRAME
)
•
Nested
.STRUCT
and
.UNION
directives
•
CPU instructions (for example,
LD
and
NOP
)
.TAG Directive
The
.TAG
directive declares or assigns a label to have a structure type. This directive can
also be used to define a structure/union element within a structure. The
.TAG
directive
does not allocate memory; however, the
.TAG
directive inside a structure reserves space in
the structure.
The
.TAG
directive to define a structure/union element has the following form:
[stag]
.STRUCT
[offset | : parent]
[name_1]
DS
count1
[name_2]
DS
count2
...
[tname]
.TAG
stagx [count]
...
[ssize]
.ENDSTRUCT
[stag]
The
.TAG
directive to assign a label to have a structure type has the following form:
[tname]
.TAG
stag
; Apply stag to tname
[tname]
DS
ssize
; Allocate space for tname
Note: