Hello, I think I'm doing an stupid question, but there's a way to swap the contents of W and a file on a single instruction? I want to shift the values inside a buffer and I know I can do: MOVF buf1,W MOVWF buf0 // buf0 = buf1 MOVF buf2,W MOVWF buf1 // buf1 = buf2 MOVF buf3,W MOVWF buf2 // buf2 = buf3 MOVF buf4,W MOVWF buf3 // buf3 = buf4 CLRF buf4 // buf4 = 0 But I was thinking if it's possible to make such a thing like: MOVLW 0; swapwf buf4; // w=buf4 buf4=0 swapwf buf3; // w=buf3 buf3=buf4 swapwf buf2; // w=buf2 buf2=buf3 swapwf buf1; // w=buf1 buf1=buf2 swapwf buf0; // w=buf0 buf0=buf1 I know that the PIC have no instruction like SWAPWF, but... Best regards, Brusque ----------------------------------- Edson Brusque Research and Development C.I.Tronics Lighting Designers Ltda Blumenau - SC - Brazil www.citronics.com.br Say NO to HTML mail ----------------------------------- -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.