The SET directive assigns a value to a label. This label can then be used in later expressions. Unlike the .EQU directive, a label assigned to a value by the SET directive can be changed (redefined) later in the program.
Syntax:
.SET label = expression
Example:
.SET FOO = 0x114 ; set FOO to point to an SRAM location
lds r0, FOO ; load location into r0
.SET FOO = FOO + 1 ; increment (redefine) FOO. This would be illegal if using .EQU
lds r1, FOO ; load next location into r1