There is nothing magic about a macro. Macros are just a preprocessing step performed on the source code. The actual underlying assembler would only "see" the instructions genereated by the macro. Thus, in your example btfss register,bit dosomething args the assembler will _not_ make any changed either to the code outside the macro (btfss register,bits) nor to the code inside the macro (some instructions). Except, of course it will substitute the arguments as needed into "some instructions". Bob Ammerman RAm Systems ----- Original Message ----- From: "Richard Mellina" To: Sent: Friday, July 19, 2002 6:38 PM Subject: [PIC]: Macro question > There's something that has been bugging me lately about macros. > MPASM puts in the macro code where the macro is in the program, right? So if > you have... > > dosomething macro [arguments] > : > : some instructions > : > endm > > main > btfss register, bit > dosomething [arguments] > : > : instructions > : > end > > > ... is MPASM smart enough to change it to... > > > > dosomething macro [arguments] > : > : some instructions > : > endm > > main > btfsc register, bit > goto aftermacro > dosomething [arguments] > aftermacro > : > : instructions > : > end > > ...or would it not change it causing the "btfss register, bit" to only > skip the first instruction in the macro? Any help would be appreciated. > Thanks! > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body