9.24.2.1 Macros

The macro syntax used on the MSP 430 is like that described in the MSP 430 Family Assembler Specification. Normal as macros should still work.

Additional built-in macros are:

llo(exp)
Extracts least significant word from 32-bit expression 'exp'.
lhi(exp)
Extracts most significant word from 32-bit expression 'exp'.
hlo(exp)
Extracts 3rd word from 64-bit expression 'exp'.
hhi(exp)
Extracts 4rd word from 64-bit expression 'exp'.

They normally being used as an immediate source operand.

         mov	#llo(1), r10	;	== mov	#1, r10
         mov	#lhi(1), r10	;	== mov	#0, r10

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.