Tamas Rudnai wrote: > So how would you handle this code with your macros if you modify that with > James' suggestion: > > setb PORTB,0 > setb PORTA,1 > nop > clrb PORTC,0 > clrb PORTD,1 > > ? > > Tamas > > > Tamas, my macros are defined like this now: setb macro pin bsf portbbuf, pin movff portbbuf, PORTB endm clrb macro pin bcf portbbuf, pin movff portbbuf, PORTB endm But like Wouter and Robin reminded me, this PIC has the LAT registers that can be safely used with read-modify-write operations. Much nicer. - Martin -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist