Macro: it expands inline. E.g.
macro herp
instruction1
...
instructionN
end macro
main:
asd
fgh
herp <---
jkl
qwe
herp <---
Will expand to:
main:
asd
fgh
instruction1
...
instructionN
jkl
qwe
instruction1
...
instructionN
With procedures, instead:
proc derp
instruction1
...
instructionN
end proc
main:
asd
fgh
herp <---
jkl
qwe
herp <---
Will turn into:
main:
asd
fgh
call herp <---
jkl
qwe
call herp <---
herp:
instruction1
...
instructionN
ret
It depends on:
- Your task size
- Number of different places you will be using it from
So if your task is composed by only a few instructions which are not worth the overhead of a function call (set up stack frame, jump, destroy stack frame, return...), use a macro. If it is a more involved task, some long operation, and you will be calling it from a lot of different places then I'd probably go for the procedure, since macro-ing it would result in a much bigger code