> > >> So this is what I want to do: >> >>prepara_pacote_loop: >> >> incf RAM_INDEX_R,1 >> movf RAM_INDEX_R,0 >> >> movwf FSR >> movf INDF,0 >> >> call Packet_Send >> >> decfsz RAM_COUNTER,1 >> goto prepara_pacote_loop >> >> call Packet_End >> call delay >> >> goto loop >> >> >> >You do not have to save the state of anything unless the calling function >modifies it. In your case you are loading FSR with a variable each loop, >rather than incrementing it, so unless your Packet_Send function is >modifying RAM_INDEX_R then you shouldn't need to save anything. What you >must check is that IRP bit in the status register is set correctly according >to the bank that your array is in. Have you tried simulating this? > I'm quite sure Packet_Send does not touch RAM_INDEX_R. I did not check IRP neither simulated the program (as far as i know we can't simulate serial devices). But the point is that i tried to send the character that will be sent to the radio via the serial port, and it works. This is what makes the problem strange. Isolated Packet_Send works, and isolated the loop in the memory works too, but they do not work together. []s Rafael. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.