Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.