PDA

View Full Version : RLF versus RLCF



harryweb
- 6th November 2007, 10:26
Hi all,

In my old 16f84, I used this code:

---------------------------
FOR i = 1 TO 8
IF bcounth.7 = 1 THEN
HIGH portb.0
ELSE
LOW portb.0
ENDIF
GOSUB clock 'send a clock pulse
asm
rlf _bcounth,1
endasm
NEXT i
-------------------------

Now I want to use a 18f8520 and rlf doesn't exist any more, so I decide to use the new instruction " RCLF "

rlcf _bcounth,1

But I have now a warning:
Warning[203] c:\pgm.asm 596 : Found opcode in column 1.(rlcf)

In the instruction set, I can see:
(PIC16)
RLF f,d Rotate left f through Carry C
(PIC18)
RLCF f,d,a Rotate left f through Carry C,Z,N
What mean "a" ?
What can I do ?
Regards

Bruce
- 6th November 2007, 12:20
Just move the opcode RLCF out of column 1 to get rid of the warning.

See the Instruction Set Summary section in the PIC18F8520 data sheet for a full explanation of what the 'a' signifies. It has the answers you're looking for.