This declares a macro with 4 parameters.
.macro Add16 add @0,@2 adc @1,@3 .endmacro
Call in the assembler source:
Add16 ZL,ZH,_HA0,_HA1
When using a parameter naming in a macro, the number of parameters to the call is compared and an error message when difference.
This declares a macro with 4 parameters.
.macro Add16(dReg0,dReg1,sReg0,sReg1) add @dReg0,@sReg0 adc @dReg1,@sReg1 .endmacro
Call in the assembler source:
Add16(ZL,ZH,_HA0,_HA1) ;with or without brackets