Vector – Zilog ZUSBOPTS User Manual
Page 265

UM017105-0511
Directives
Zilog Developer Studio II – ZNEO™
User Manual
237
VAR
The
VAR
directive works similarly to an
EQU
directive except you are allowed to change
the value of the label. In the following example,
STRVAR
is assigned three different values.
This would cause an error if
EQU
was used instead of
VAR
.
Synonym
.VAR, SET, .SET
Syntax
<label> VAR <expression>
Example
A 6 SEGMENT NEAR_DATA
A 7 ALIGN 2
000000FF A 8 STRVARVAR FFH
000000 FF A 9 DBSTRVAR
A 10 SEGMENT ROM_TEXT
000000 A 11 L__0:
000000 4641494C 4544 A 12 DB"FAILED"
000006 00 A 13 DB0
A 14 SEGMENT NEAR_DATA
A 15 ALIGN 2
00000000 A 16 STRVAR VAR L__0
A 17
000002 A 18 _fail_str:
000002 00 A 19 DBSTRVAR
A 20 SEGMENT ROM_TEXT
000007 A 21 L__1:
000007 50415353 4544 A 22 DB"PASSED"
00000D 00 A 23 DB0
00000007 A 24 STRVAR VAR L__1
A 25 SEGMENT NEAR_DATA
A 26 ALIGN 2
000004 A 27 _pass_str:
000004 07 A 28 DBSTRVAR
VECTOR
Initializes an interrupt or reset vector to a program address.
The CPU directive is used to determine the physical location of the interrupt vectors.
Syntax
<vector_directive> =>
VECTOR
<vector name>
=
<expression>