Rlcf instruction with pic 18F4550 in C compiler

I am new to hardware programming with the c compiler for PIC 18F4550 from Microchip.

My question is: can someone give me an example of "how to rotate bits and get added wrapping, with this instruction" rlcf "(c-compiler)

This instruction shifts the bits to the left and puts the leftmost bit in Carry, and you must read this value from the carry.

I know how it works. But I can not find any example code to run it on my path to the code.

What data entry I get. It needs to be converted to binary values ​​and then rotate it. unsigned int red = 1206420333240;

Thanks in advance!

+3
source share
1 answer

C, , .

int PIC18, 16- 65535, 0xFFFF hex.

C, . Hitech C

asm("RLCF REG,0,0");//replace REG with your register and consider the d and a flags.
asm("BC 5"); //branch if carry

, , . , 16- .

+4

All Articles