I want to make a macro and in part of it I need to the parameter into W.
If the parameter is a literal I need to do "MOVLW param1", but if it is a register I need to do "MOVF param1,W".
How can I determine what was passed ?
Bean
One way is to add another parameter to your macro which is then the 'switch' to select either the MOVLW or the MOVF instruction. This works for me because i know
at the time i insert the macro in the code what is required.