piclist 2006\01\28\105414a
>
Thread:
Macros won't work
www.piclist.com/techref/microchip/devices.htm?key=pic
BY
:
John Nall email (remove spam text)
Phil Cross wrote:
> I am trying to reorganise a monolithic program into modules, and use MPLINK
> to link the object files. At the same time, I am trying to make the code
> relocatable.
>
> Now I find that macros are not executed. I can define them in a module, call
> them in the body of the module, and MPASM doesn't object. But execution
> never enters the macro body.
>
It may be that I just don't understand your question. A macro is
merely a way to give a name to a set of instructions. When the
assembler comes across an op-code (instruction) that it does not
recognize, it checks to see if that op-code has previously been defined
(within that module, of course) as a macro. If so, then it replaces it
with the body of the macro. If not, then it flags it as an illegal
instruction.
John
<43DB93A4.2020000@comcast.net> 7bit
In reply to: <BAY110-F29117D46681C9F2F462185F4170@phx.gbl>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the
piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
month overview.
new search...