Josh Koffman wrote: > Hi all. > > I'm a bit confused by exactly what MPLAB will let me do with a macro. > I have a routine that I use for sending data to a shift register. Now > I want to do two separate shift registers (not chained, different > pins). So what I'd like to do is define a macro like this: > > mShiftOut macro _data, _port, _ClockPin, _DataPin, LatchPin > > If I did that, could I then use the following line within the macro? > > bsf _port,_ClockPin > > It seems to assemble, I just don't have my board ready to test it yet. > > Thanks! > > Josh Since it is a macro (which always is expanded into real code) it will work. There will be one BSF instruction for each "call" (which isn't a real call, of course) of the macro. It would not have worked if the BSF was in e.g. a normal subroutine (that is CALL'ed). -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist