<label>: SET <expression>
None
Similar to the EQU - Equate symbol value directive, the SET directive assigns the value of the <expression> in the operand field to the symbol in the <label> field. The <expression> must resolve as an absolute expression and cannot include a symbol that is undefined or not yet defined. The <label> is an assembly time constant. SET does not generate any machine code.
The value is temporary; a subsequent SET directive can redefine it.
See the following listing for examples of the SET directive.
Abs. Rel. Loc Obj. code Source line ---- ---- ------ --------- ----------- 1 1 0000 0002 count: SET 2 2 2 000000 02 one: DC.B count 3 3 4 4 0000 0001 count: SET count-1 5 5 000001 01 DC.B count 6 6 7 7 0000 0001 IFNE count 8 8 0000 0000 count: SET count-1 9 9 ENDIF 10 10 000002 00 DC.B count
The value associated with the label count is decremented after each DC.B instruction.