How do I implement rotate through carry (RLC A, RRC A) in C (Keil C51) ? This is useful for bit banging operations in 12 bit serial Adc's , serial EEprom's . Now I use the assembly routines as it seems easier to do. any suggestions ?
"Now I use the assembly routines as it seems easier to do. any suggestions ?" Keep doing it in assembler! Just make the assembler routines callable from 'C' - see the Manual. In Keil C51, you could use a bit-addressable variable, and the standard 'C' shift operators - again, see the Manual.
If it is speed you want, then you may find the following useful: http://www.programmersheaven.com/zone5/cat27/31937.htm And maybe here too: http://www.8052.com/challengesview.phtml?idChallenge=4