D Diver300 Well-Known Member Most Helpful Member Apr 11, 2008 #1 I have come across a problem with a PIC24FJ32GA002. I need to rotate a bit into a 64 bit number. The 64 bit number is held in four 16 bit registers, with w3 pointing to the least significant one. So I wrote:- Code: repeat #3 rlc [w3], [w3--] That worked in the simulator but seems rotate in only zeros, when in the real PIC. So I changed it to:- Code: rlc [w3], [w3--] rlc [w3], [w3--] rlc [w3], [w3--] rlc [w3], [w3--] Which seems to work fine. Is there anything wrong with using the repeat command in this way?
I have come across a problem with a PIC24FJ32GA002. I need to rotate a bit into a 64 bit number. The 64 bit number is held in four 16 bit registers, with w3 pointing to the least significant one. So I wrote:- Code: repeat #3 rlc [w3], [w3--] That worked in the simulator but seems rotate in only zeros, when in the real PIC. So I changed it to:- Code: rlc [w3], [w3--] rlc [w3], [w3--] rlc [w3], [w3--] rlc [w3], [w3--] Which seems to work fine. Is there anything wrong with using the repeat command in this way?