A macro will shove a chunk of code in everytime you use it, so if its a long macro your code will grow quickly.
I dont like using macros over a few lines (maybe 2 or 3), id rather use subroutines for anything over that length.
Macros are nice to say things like "led_on" instead of "bcf PORTA,2" or something like that, and since the macro is only one line it makes no difference...
A macro will shove a chunk of code in everytime you use it, so if its a long macro your code will grow quickly.
I dont like using macros over a few lines (maybe 2 or 3), id rather use subroutines for anything over that length.
Macros are nice to say things like "led_on" instead of "bcf PORTA,2" or something like that, and since the macro is only one line it makes no difference...
I concur with both above. Macros are short and subroutines are long. My best and most utilized of very few macros are:
MOVF_F REGISTER1, REGISTER 2
LOADF REGISTER, LITERAL
SWAPF REGISTER1, REGISTER 2
Personally, the least macros the better and the purer the assembly code. I believe that a major portion of Microchips popularity is attributed to their 35 instruction set, a set that actually consumes only 5 to 10 different instructions in a program. Logically, macros jeoperdize computed goto(s) because you may forget how much space the nearby macros actually consume.