Download TR0105 TSK51x/TSK52x Embedded Tools Reference

Transcript
TSK51x/TSK52x Embedded Tools Reference
.SET
Syntax
symbol
.SET expression
.SET symbol expression
Description
With the .SET directive you assign the value of expression to symbol temporarily. If a symbol was defined with the .SET
directive, you can redefine that symbol in another part of the assembly source, using the .SET directive again. Symbols that you
define with the .SET directive are always local: you cannot define the symbol global with the .GLOBAL directive.
The .SET directive is useful in establishing temporary or reusable counters within macros. expression must be absolute and
cannot include a symbol that is not yet defined (no forward references are allowed).
Normally, the defined symbol gets the same type as the result of the expression. However, when the resulting expression has
type "none", the symbol gets no type.
Example
COUNT
.SET
0
; Initialize count. Later on you can
; assign other values to the symbol
Related information
.EQU (Set a permanent value to a symbol)
3−40