Sir, May i know the 8051 c program for the instruction rlc a (rotate accumulator left through carry) Is there any operator for this insruction like shift operator
thanks & regards Rijo
That sounds like an odd question. I can see no practical need for such knowledge. Except, perhaps, homework. Anyway, a left shift of a 16-bit variable might generate code that would use this instruction to perform the shift.
In Standard C, No there is no keywords to do this. You can code it and see if the compiler is smart enouht to see and use it in the ASM. Optionally you can call an ASM function that does it.
Check the manual and see if there a built in function for it.
Indeed.
So, Rijo Sebastian, what is your reason for asking this? What do you hope to achieve with this knowledge?
www.catb.org/.../smart-questions.html
Or standard C code can be written that will result in a variable ending up with the same contents as if a rotate through carry had been made. After all, C code isn't expected to care about contents of flag registers, but what contents we end up with in the actual variables.
... common excersize in C 101
Erik
aka "intrinsic" function.
Please visit the Site Contestcollectiva <a href='contest.collectiva.in/.../FundamentalsofC.aspx' target='_blank'>To learn Fundamentals of C Video Training (in Tamil)</a>