SLAU131V October 2004 – February 2020
The assembler allows you to specify that an operand should be used as an immediate value by using the # sign as a prefix. For instance, you can use immediate values with the .byte directive to load values into the current section. It is not usually necessary or permitted to use the # prefix in directives. Compare the following statements:
ADD.W #10, R11
.byte 10
In the first statement, the # prefix is necessary to tell the assembler to add the value 10 to R11. In the second statement, however, the # prefix is not used; the assembler expects the operand to be a value and initializes a byte with the value 10.