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:
Extracts least significant word from 32-bit expression 'exp'.
Extracts most significant word from 32-bit expression 'exp'.
Extracts 3rd word from 64-bit expression '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 |
; is the line comment character.
The character $ in jump instructions indicates current location and implemented only for TI syntax compatibility.
General-purpose registers are represented by predefined symbols of the form rN (for global registers), where N represents a number between 0 and 15. The leading letters may be in either upper or lower case; for example, r13 and R7 are both valid register names.
Register names PC, SP and SR cannot be used as register names and will be treated as variables. Use r0, r1, and r2 instead.
As destination operand being treated as 0(rn)
As source operand being treated as @rn
Skips next N bytes followed by jump instruction and equivalent to jCOND $+N+2
Also, there are some instructions, which cannot be found in other assemblers. These are branch instructions, which has different opcodes upon jump distance. They all got PC relative addressing mode.
A polymorph instruction which is jeq label in case if jump distance within allowed range for cpu's jump instruction. If not, this unrolls into a sequence of
jne $+6 br label |
A polymorph instruction which is jne label or jeq +4; br label
A polymorph instruction which is jl label or jge +4; br label
A polymorph instruction which is jn label or jn +2; jmp +4; br label
A polymorph instruction which is jlo label or jhs +2; br label
A polymorph instruction which is jge label or jl +4; br label
A polymorph instruction which is jhs label or jlo +4; br label
A polymorph instruction which is jeq +2; jge label or jeq +6; jl +4; br label
A polymorph instruction which is jeq +2; jhs label or jeq +6; jlo +4; br label
A polymorph instruction which is jeq label; jlo label or jeq +2; jhs +4; br label
A polymorph instruction which is jeq label; jl label or jeq +2; jge +4; br label
A polymorph instruction which is jmp label or br label