Glen wrote: > I have a delay & want to toggle 2 o/ps together. > =======vars===== > on equ b'00110000' ;set portb 4 & 5 to 1 > off equ b'00000000' ;set portb 4 & 5 to 0 > toghv equ 0x04 > toglv equ 0x02 > ====prog==== tog MOVLW on MOVWF PORTB MOVLW toghv > MOVWF togh > delh DECFSZ togh > GOTO delh MOVLW off MOVWF PORTB MOVLW toglv > MOVWF togl > dell DECFSZ togl > GOTO dell > BTFSC PORTB,3 ;skip next if 0 , checks for 0 ac cycle > GOTO tog > RETURN Your "togh" and "togl" register locations could be combined to one called "count" or similar. Shadow registers are only required where you don't know what the values of all output pins need to be at each stage, so the ones you don't know are stored in the shadow. Where you know the desired states of *all* the outputs at each step, you just set the port to that value as above. If you have to do that often, you set a macro such as: MOVLF MACRO lit,file MOVLW lit MOVWF file ENDM .. which now allows you to say: MOVLF on,PORTB or even more specific: SETPTB MACRO lit MOVLW lit MOVWF PORTB ENDM .. so you can say: SETPTB on Standard warning: You often can't use a conditional skip in front of a macro. -- Cheers, Paul B.