-----Original Message----- From: Shannon Spurling To: PICLIST@MITVMA.MIT.EDU Date: Tuesday, November 04, 1997 17:04 Subject: Re: RRF and RLF instructions >At 02:33 PM 11/4/97 -0500, you wrote: >> I am a little confused about these two instructions. I know what they >>do, but my confusion is in the handling of the carry flag. The manual says >>shift through carry, which I interperate to meaning that if bit 7 is set and >>you RLF the carry flag is set. But when I read the MPASM manual it has a >>diagram that suggests if you set the carry flag and RLF bit0 of the file >>register is set, is this what happens? It would be very usefull for my >>purposes if this is how it worked. TTYL > >This is really stands for rotate through carry. You roll the bits out the >one side, into the carry bit, and back in the other side. Most MPUs,CPUs, >and MCUs have a similar instruction. A shift is just moving the bits out of >the byte with out moving any thing in, or moving it in from a bit flag. Two >different but similar concepts, but the documentation seams to have them >confused. OK, so does the carry count as the 9th bit? So instead of rotating from bit7 to bit0, bit7 goes to carry and what was in carry goes to bit0? Thanks in advance. TTYL BTW. The reason I care is because I am using the instructions for serial purposes and if they did behave the way I just described it would be much easier for me to implement my routines. TTYL